enhance(cli): Add import-edn command

Works for both current and local graphs. Addresses CLI and API for
https://discord.com/channels/725182569297215569/1365819617079066744/1365819617079066744
This commit is contained in:
Gabriel Horner
2025-11-06 16:01:35 -05:00
parent 085f9093c3
commit 0bc0892b8a
8 changed files with 75 additions and 4 deletions

8
deps/cli/README.md vendored
View File

@@ -31,6 +31,8 @@ query [options] Query DB graph(s)
export [options] Export DB graph as Markdown
export-edn [options] Export DB graph as EDN
append [options] Appends text to current page
mcp-server [options] Run a MCP server
import-edn [options] Import into DB graph with EDN
help Print a command's help
$ logseq list
@@ -120,7 +122,11 @@ Exported 41 pages to yep_markdown_1756128259.zip
# Export DB graph as EDN
$ logseq export-edn woot -f woot.edn
Exported 16 properties, 16 classes and 36 pages
Exported 16 properties, 1 classes and 36 pages to woot.edn
# Import into current graph with EDN
$ logseq import-edn -f woot-ontology.edn
Imported 16 properties, 1 classes and 0 pages!
# Append text to current page
$ logseq append add this text -a my-token