Obsidian CLI
Anything you can do in Obsidian you can do from the command line.
# Open today's daily note obsidian daily # Search your vault obsidian search query="meeting notes" # Add a task to your daily note obsidian daily:append content="- [ ] Buy groceries" Use cases
Get started
Enable Command line interface in Settings → General.
Follow the on-screen instructions to add the CLI to your system PATH. Restart your terminal for changes to take effect.
Registration adds the Obsidian binary to your PATH via ~/.zprofile. If you use bash or fish, add the path to your shell config manually.
export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS" The installer adds an Obsidian.com terminal redirector alongside Obsidian.exe. This is required because Obsidian runs as a GUI app.
AppImage: A symlink is created at /usr/local/bin/obsidian (requires sudo). Falls back to ~/.local/bin if sudo fails.
Flatpak: A symlink is created automatically. If it fails, create one manually pointing to the Flatpak export.
Once installed, you’re ready to go. Note that the Obsidian app must be running.
Run a command
# Show help obsidian help Use TUI mode
# Open TUI (with autocomplete) obsidian Examples
Check out practical examples, from everyday note-taking to developer automation.
# Open today's daily note obsidian daily # Add a task to your daily note obsidian daily:append content="- [ ] Buy groceries" # Search your vault obsidian search query="meeting notes" # Read current file obsidian read # List all tasks from daily note obsidian tasks daily # Create a new note from template obsidian create name="Trip to Paris" template=Travel # View all tags with frequency obsidian tags counts # Compare two versions of a file obsidian diff file=README from=1 to=3 # Open DevTools obsidian devtools # Reload plugin in development obsidian plugin:reload my-plugin # Capture app screenshot obsidian dev:screenshot file=shot.png # Execute JavaScript obsidian eval "app.vault.getFiles().length" # Review JS errors obsidian dev:errors # Inspect CSS properties obsidian dev:css selector=".workspace" # Query DOM elements obsidian dev:dom selector=".nav" #!/bin/bash # Morning routine automation # Open today's daily note obsidian daily # Add routine tasks obsidian daily:append content="- [ ] Review inbox" obsidian daily:append content="- [ ] Check calendar" # Copy recent files to clipboard obsidian files sort=modified limit=5 --copy # Check for unresolved links obsidian unresolved # Search a specific vault and export as JSON obsidian search query="status::active" vault="Notes" format=json Hotkeys
Convenient shortcuts and autocomplete built into the TUI.
Sync
Run Obsidian Sync without a GUI. All the speed, privacy, and end-to-end encryption of Obsidian Sync, on any server or automated environment.