Appearance
Getting started
FreshObsidian CLI supports both single commands and a terminal user interface (TUI) with interactive help and autocomplete.
Desktop runtime
Obsidian CLI requires the Obsidian app to be running. If Obsidian is not running, the first command you run launches Obsidian.
Looking to Sync or Publish without the desktop app? Start with Desktop CLI or Headless?. Headless does not expose the desktop plugin graph, UI, metadata cache, or developer tools.
Run a command
Run an individual command without opening the TUI:
shell
# Run the help command
obsidian helpUse the terminal interface
Use the TUI by entering obsidian. Subsequent commands can be entered without obsidian.
shell
# Open the TUI, then run help
obsidian
helpThe TUI supports autocomplete, command history, and reverse search. Use Ctrl+R to search your command history. See Keyboard shortcuts for all available shortcuts.
Examples
Here are a few examples of what Obsidian CLI can do.
Everyday use
shell
# 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 the active file
obsidian read
# List all tasks from your daily note
obsidian tasks daily
# Create a new note from a template
obsidian create name="Trip to Paris" template=Travel
# List all tags in your vault with counts
obsidian tags counts
# Compare two versions of a file
obsidian diff file=README from=1 to=3For developers
Many Developer commands are available for plugin and theme development. These commands allow agentic coding tools to automatically test and debug.
shell
# Open developer tools
obsidian devtools
# Reload a community plugin you're developing
obsidian plugin:reload id=my-plugin
# Take a screenshot of the app
obsidian dev:screenshot path=screenshot.png
# Run JavaScript in the app console
obsidian eval code="app.vault.getFiles().length"