Command Line to Export Pages and Data

I’d love to be able to access Export public pages, Export as JSON, etc via a command line interface.

The ability to automate exporting would pair really nicely with the logseq/publish project. I’d use this to create a custom autopublishing blog sourced from my own knowledge base.

This would also pair nicely with GitHub Actions, so we could generate public pages every time we commit.


I would like to second this … something like

logseq --graph=/path/to/graph --export-graph --as=public --destination=/path/to/html/dir

would be very nice. Note that I need --graph=/path/to/graph as I might be working on several graphs.

I would use this from cron so that I can update a local HTML repository … I have other users that need to see a read-only view of my graph.

1 Like

--graph=/path/to/graph and --destination=/path/to/html/dir are self explanatory. But what would the --export-graph and --as=public options do?