Previously the only folks who wants headless mode is the ones who wants to run sync from outside obsidian, but now with the landing of the cli, for now it is only a “remote control” of the gui app, it would make a lot of sense to have a native way to run obsidian headless
possible use cases:
for those who already work in the cmdline, to quickly capture project ideas into notes.
for sync case as described above.
for other editor integration, for example, a vscode plugin to spawn obsidian headless to store some project notes, and I am the maintainer of obsidian.nvim, and many of the features that are not worth rebuilding in lua is now possible, like bases, can now be just created and queried, but requiring to open obsidian GUI first gives friction.
for AI agents, to really make agent workflow seamless, it will be good to have the ability to just get the query result instead of accidentally open a obsidian session from cmdline and feed logs to AI.
Proposed solution
Current workaround (optional)
Possibility reference what neovim does, to have a --healess flag.
#2 is a NO GO for me. Soon as my paid for sync service is opened up like a few have been proposing, I will go to local only and use backups to “sync”; albeit slowly. Some things are sacred and I suspect that is a more widely held view.
I don’t think a headless sync client has any particular additional security implications. Maybe I am missing something. Anyway keep the convo about headless sync in its thread thanks!
As a command line user it would be great to perform some operations directly there, including when connecting to my machine over SSH, and through CLI agents and automated workflows.
Also as @zzt42 mentioned obsidian.nvim is an incredible extra interface for Obsidian and being able to use things like Bases and other functionality through that would be glorious.
I found a workaround for using the Obsidian CLI over SSH on Linux (.deb install). Adding --ozone-platform=headless to the command resolves the segfault when no display is available, e.g., obsidian --ozone-platform=headless version.
No D-Bus session forwarding is needed. This allows tools like Claude Code over SSH to use the Obsidian CLI. However, this still requires a desktop session with Obsidian running on the remote machine.
Note: this is not tested with the Flatpak version.
It would be ideal to interact with vaults via a standalone CLI that is completely independent of the GUI. Specifically, a downloadable binary that doesn’t require being installed and registered from within the app itself.
Currently, using Obsidian with WSL is difficult. There isn’t a simple way to query the vault without installing the app directly inside WSL or relying on PowerShell (a non-option for me). A standalone CLI would make this more accessible terminal heavy usage.
There is currently a command line interface (CLI) executable, referred as Obsidian CLI, that acts as a companion terminal based control system to the main GUI app (which must be running in the background).
There is also a separate product, called “Obsidian Headless”, that implements client side functionality for Sync and soon Publish. Obsidian Headless is independent from the main app and it is purely terminal-based application.
Some folks, like @dinosaur-tuxedo right above, have devised a way to run the main GUI app even when a graphics environment/screen is not present. This may work, however it is currently officially unsupported. So you are on your own if you choose to go down that path.
I’ve just switched to using headless sync on my desktop linux machine, so I can edit files using nano/vim/anything if I’m SSH’d into the machine. I still use the GUI app when I’m at home, but have the sync plugin disabled.
It would be great to be able to control the headless sync client from the GUI, so I can still change config settings, view logs, and have the sync icon work. I suppose that would mean completely separating the sync system from the GUI, in a client-server style, with the GUI and obsidian-headless controlling the same sync daemon.
For me its option B I’m looking for. The Obsidian Headless is great for Sync, but it misses the options like doing queries. If I can use Obsidian CLI with Obsidian Headless (with the vault index + bases + auto link update, basically a pure Obsidian without UI) that would be amazing! This is something you could work with indeed thru SSH or have an AI Agent interact with the Vault in a more integrated way.