Obsidian CLI
Controls the running Obsidian desktop app from your terminal. Everything you can do in the app, you can do from the command line.
Obsidian Headless
A standalone client that runs independently of the desktop app. Sync vaults and publish sites from any server or CI environment.
Obsidian CLI
Obsidian CLI lets you control Obsidian from your terminal for scripting, automation, and integration with external tools — including developer commands to inspect elements, take screenshots, reload plugins, and run JavaScript in the app console.Install Obsidian CLI
1
Update Obsidian
Upgrade to the latest Obsidian installer version (1.12.4 or above).
2
Enable the CLI in settings
Go to Settings → General and enable Command line interface.
3
Register the CLI
Follow the prompt to register Obsidian CLI. This adds
obsidian to your system PATH.The Obsidian app must be running for CLI commands to work. If it’s not running, the first command you execute will launch Obsidian automatically.
Run commands
Run a single command directly from your terminal:obsidian with no arguments. The TUI supports autocomplete, command history, and reverse search (Ctrl+R):
Parameters and flags
Commands accept parameters (key-value pairs) and flags (boolean switches):Target a vault
If your terminal’s current working directory is inside a vault, that vault is used automatically. Otherwise, the currently active vault is used. To target a specific vault explicitly:Everyday examples
Developer examples
Key command categories
Files and folders
Files and folders
Daily notes
Daily notes
Search
Search
Plugins and themes
Plugins and themes
Workspace and tabs
Workspace and tabs
Tasks
Tasks
Bases
Bases
Bookmarks
Bookmarks
Links
Links
Properties
Properties
Sync commands (in-app)
Sync commands (in-app)
These commands control Sync within the running Obsidian app. To sync without the desktop app, see Obsidian Headless.
Publish commands (in-app)
Publish commands (in-app)
Vault
Vault
Developer commands
Developer commands
TUI keyboard shortcuts
Navigation
Editing
Autocomplete
History
Other
Troubleshooting
Windows
Windows
Obsidian CLI on Windows requires the 1.12.4+ installer. When you install Obsidian 1.12.4+, the
Obsidian.com terminal redirector is added in the folder where you installed the Obsidian.exe file. This redirector connects Obsidian’s GUI process to stdin/stdout, which is necessary because Obsidian normally runs as a GUI app incompatible with terminal output on Windows.macOS
macOS
CLI registration adds the Obsidian binary to your PATH via For other shells (bash, fish), add the same path to
~/.zprofile. If the obsidian command isn’t found, check that this line exists in ~/.zprofile:~/.bash_profile or run fish_add_path /Applications/Obsidian.app/Contents/MacOS.Linux (AppImage)
Linux (AppImage)
Registration creates a symlink at If missing, create it manually:If the symlink was placed in
/usr/local/bin/obsidian. Verify it exists:~/.local/bin/ instead, ensure that directory is in your PATH.Linux (Snap)
Linux (Snap)
If the CLI doesn’t detect the insider Add this to
.asar, set XDG_CONFIG_HOME to point to the Snap config path:~/.bashrc or ~/.zshrc to make it persistent.Linux (Flatpak)
Linux (Flatpak)
Create a symlink to the Flatpak binary:
Obsidian Headless
Obsidian Headless (open beta) is a standalone command-line client for Obsidian services. It runs without the desktop app, making it ideal for servers, CI pipelines, and automation workflows. Common use cases:- Automate remote backups
- Publish a website on a schedule
- Sync a shared vault to a server for other tools to consume
- Give agentic tools vault access without exposing your full desktop
Obsidian Headless syncs and publishes vaults. It does not control the Obsidian desktop app. For controlling the running desktop app, use Obsidian CLI above.