Obsidian CLI

Command your vault.

Anything you can do in Obsidian you can do from the command line.

terminal
# 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

Obsidian CLI is a programmatic playground for plain text.

Develop.
Build plugins and themes faster. Edit code, reload, test, and debug without leaving the terminal.
Collaborate.
Deploy documentation, sync shared vaults to servers, and integrate Obsidian into your team’s toolchain.
Automate.
Orchestrate your workflow with cron jobs, shell scripts, and custom integrations. If you can script it, you can do it.
Tinker.
Read, search, and write to your vault programmatically. Give agentic tools the ability to interact with your vault.

Get started

Install Obsidian CLI

01

Update Obsidian

Download the latest Obsidian installer. Download →

02

Activate the CLI

Enable Command line interface in SettingsGeneral.

03

Register the CLI

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.

~/.zprofile
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.

Run your first command

Once installed, you’re ready to go. Note that the Obsidian app must be running.

Run a command

terminal
# Show help
obsidian help

Use TUI mode

terminal
# Open TUI (with autocomplete)
obsidian

Examples

See it in action

Check out practical examples, from everyday note-taking to developer automation.

terminal
# 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
terminal
# 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"
terminal
#!/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

Keyboard shortcuts

Convenient shortcuts and autocomplete built into the TUI.

Navigation

Move left / Ctrl+B
Move right / Ctrl+F
Start of line Ctrl+A
End of line Ctrl+E
Previous word Alt+B
Next word Alt+F

Editing

Delete to start of line Ctrl+U
Delete to end of line Ctrl+K
Delete previous word Ctrl+W / Alt+⌫
Accept suggestion Tab
Dismiss suggestions Shift+Tab
Accept first suggestion

General

Previous command / Ctrl+P
Next command / Ctrl+N
Search history Ctrl+R
Cancel Escape
Clear screen Ctrl+L
Exit Ctrl+C / Ctrl+D

Sync

Headless 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.

  • Automate remote backups.
  • Automate publishing a website.
  • Give agentic tools access to a vault without access to your full computer.
  • Sync a shared team vault to a server that feeds other tools.
  • Run scheduled automations — aggregate daily notes into weekly summaries, auto-tag, and more.

Get started

Learn how to install and use Obsidian CLI.