Why doesn’t the obsidian team think this is a desirable feature (the original 4+ yo feature request for a CLI)? Is there some security or architecture or reliability reason? All my other note-taking tools accept command line args and parameters so that they can be used within an ecosystem of other command line tools.
I’d love to see the Obsidian team implement a command-line interface (CLI) option!
This is a fundamental feature for any serious editor — tools like BBEdit, IntelliJ, and Sublime Text all support launching the app with a specified path via the command line. It’s a small addition that would make a big difference for workflow efficiency.
At-least something of this nature - let’s say I want to open my markdown files at /usr/local/markdown, and below command should open that folder with Obsidian:
/Applications/Obsidian.app/Contents/MacOS/Obsidian "/usr/local/markdown"
It would be a dream come true if that happens!! Obsidian team.. please…!!!
You can use Obsidian URI via command line
If anyone else is having issues opening vaults or specific *.md files from the linux command line, here are some bits of information that will help you understand why it simply won’t work sometimes. It’s frustrating because Obsidian assumes a couple of odd behaviors.
If you installed Obsidian using official and well curated package managers, the following should work:
xdg-open obsidian:///path/to/my/vault
open obsidian://open?vault=VAULT_NAME&file=relative/path/to/specific/file.md
They require the correct mime settings declared in your *.desktop files, and those should have been correctly configured during the installation process. If you can see Obsidian listed in the your desktop environment’s application menu, that usually means you’re good to go.
HOWEVER!!!
Another requirement is that the vault should have already been opened at least once using the GUI interface.
Techincally, the vault must be listed in your ~/.config/obsidian/obsidian.json so it can be found by name, id or path when the command line URL is parsed by Obsidian, otherwise you will see this error message:
You should also be aware that Obsidian is excessively micro-managing obsidian.json. When launching any instance, it will review obsidian.json every time and remove vaults from the list that are no longer accessible. That means if you have vaults that were mounted from remote hosts (sshfs or samba shares), Obsidian will remove these vaults from your list if these paths cannot be reached at the time it is being launched. The next time you try to use the command line, it might not be there anymore and the vault will be unknown. You will need to open it again using the GUI interface buttons to navigate directories and find it again.
No need to wait for Obsidian to implement this - you can use this open-source python CLI: New Obsidian CLI
Will be implemented V1.12.x. No ETAs.
Obsidian 1.12 includes the official Obsidian CLI.

