Command Line Interface to open folders (and files) in Obsidian from the terminal

Just in case its not entirely obvious, if you are in windows and you want a command line option for opening to a vault or a file, you can of course just build a batch file to do it for you.

Thus the command line is simply (with %20 being where spaces are):

start  obsidian://open?vault=My%20Dev%20Vault

For instance, here is a autobuilder batch file in plugin development to automatically launch obsidian and then select a plugin to build and then starts a build watch. See obsidian-z2k-utils/AutoBuilder.bat at main · z2k-gwp/obsidian-z2k-utils · GitHub for how it is done. Note: if you put it in a batch file, you’ll need to double up the %% for any %20 used for spaces.

7 Likes