obsidian-cli
obsidian-cli - Control Obsidian from the Terminal
Keyword:
obsidian cli·obsidian uri·obsidian daily note command·obsidian plugin reload cliUse this skill for the official desktop CLI. If the user needs sync without the desktop app, that is Obsidian Headless, not this skill.
Obsidian CLI is the official command line interface for controlling a running Obsidian app from the terminal. It supports single commands, an interactive TUI, vault and file targeting, note operations, search, tags, tasks, and developer commands. Official docs also link it closely with the obsidian:// URI protocol for cross-app automation.
When to use this skill
- Enable and verify the official Obsidian CLI registration
- Run one-shot commands such as
obsidian help,obsidian daily,obsidian read, orobsidian search - Open the interactive TUI with autocomplete and history
- Target a specific vault with
vault=<name>orvault=<id> - Target a specific note with
file=<name>orpath=<path> - Copy command output with
--copy - Use developer commands for plugin and theme work such as
devtools,plugin:reload,dev:screenshot, andeval - Launch or generate
obsidian://URIs for open, new, daily, unique, search, and callback-based workflows
Instructions
Step 1: Enable and verify the CLI
Use the official app flow first:
- Upgrade to the installer and early access versions required by the docs
- In Obsidian, go to
Settings -> General - Enable
Command line interface - Follow the prompt to register the CLI
Run the local helper:
bash scripts/install.sh
What to remember:
- The docs currently say CLI usage requires the Obsidian
1.12installer - The same page also says to upgrade to the latest installer
1.11.7and the latest early access1.12.x - The app must be running, or the first CLI command launches it
- Linux packaging may need extra symlink or PATH work
Treat those version strings exactly as current official docs, not as inferred packaging logic.
Step 2: Choose single-command mode or the TUI
Run a single command:
obsidian help
Open the terminal interface:
obsidian
help
Use the TUI when the user wants autocomplete, command history, and reverse search. Use single-command mode for scripts, automation, and shell aliases.
Step 3: Target the right vault and file
Vault targeting rules:
- If the current working directory is a vault, that vault is used by default
- Otherwise, the active vault is used
vault=<name>orvault=<id>must be the first parameter before the command
Examples:
obsidian vault=Notes daily
obsidian vault="My Vault" search query="meeting notes"
File targeting rules:
file=<name>uses wikilink-style resolution by file namepath=<path>requires the exact path from the vault root- If neither is provided, many commands default to the active file
Examples:
obsidian read file=Recipe
obsidian read path="Templates/Recipe.md"
Move the targeting details into references/vault-and-file-targeting.md.
Step 4: Use the command families that match the job
Start with the everyday commands:
dailydaily:appendsearchreadcreatetagstasksdiff
General commands:
helpversionreloadrestart
Developer-oriented commands:
devtoolsplugin:reloaddev:screenshoteval
These developer commands are especially useful for plugin and theme workflows because the docs explicitly position them for automatic testing and debugging.
See references/commands-and-developer-tools.md for a compact command map.
Step 5: Use flags and output features deliberately
Parameter rules:
- Parameters use
name=value - Wrap values with spaces in quotes
- Boolean switches are bare flags such as
openoroverwrite - Use
\nfor newlines and\tfor tabs in content strings
Examples:
obsidian create
obsidian create name=Note content="Hello world"
obsidian create name=Note content="Hello" open overwrite
obsidian create name=Note content="# Title\n\nBody text"
Output helper:
obsidian read --copy
obsidian search query="TODO" --copy
Many listing commands also expose format= parameters such as json, tsv, csv, md, or paths.
Step 6: Use obsidian:// URI workflows for external automation
The official URI actions include:
opennewdailyuniquesearchchoose-vault
Examples:
obsidian://open?vault=my%20vault&file=my%20note
obsidian://new?vault=my%20vault&name=my%20note
obsidian://daily?vault=my%20vault
obsidian://search?vault=my%20vault&query=Obsidian
Important URI rules:
- Encode values properly, especially spaces and
/ path=overridesvaultandfilepaneType=tab|split|windowcontrols opening locationpaneType=windowis desktop-onlyx-successandx-errorsupport callback flows on supported endpoints
Use references/uri-and-callbacks.md for the URI-specific behavior and Hook integration notes.
Step 7: Respect the limitations
- CLI automation is for the desktop app, not headless sync
dailyrequires the Daily notes plugin to be enableduniquerequires the Unique note creator plugin to be enabled- Linux registration may require manual symlinks, PATH updates, or packaging-specific fixes
- Developer commands can change app or plugin state, so use them intentionally
Examples
Example 1: Verify CLI registration
bash scripts/install.sh
Example 2: Open the TUI
bash scripts/run-command.sh
Example 3: Open today's daily note
bash scripts/run-command.sh daily
Example 4: Append a task to today's daily note
bash scripts/run-command.sh daily:append content="- [ ] Buy groceries"
Example 5: Search a specific vault
bash scripts/run-command.sh vault="My Vault" search query="meeting notes"
Example 6: Read a file by name or exact path
bash scripts/run-command.sh read file=Recipe
bash scripts/run-command.sh read path="Templates/Recipe.md" --copy
Example 7: Reload a plugin you are developing
bash scripts/run-command.sh plugin:reload id=my-plugin
Example 8: Take a screenshot from the app
bash scripts/run-command.sh dev:screenshot path=screenshot.png
Example 9: Open a note via URI
bash scripts/open-uri.sh 'obsidian://open?vault=my%20vault&file=my%20note'
Best practices
- Start with
obsidian helpor the TUI before assuming a command family name. - Put
vault=first when you need deterministic multi-vault automation. - Prefer
path=when duplicate file names make wikilink-stylefile=resolution ambiguous. - Use
--copywhen the result needs to feed another tool or model without extra shell parsing. - Treat developer commands like
plugin:reload,eval, anddev:screenshotas operational tools, not casual shortcuts. - Keep CLI automation separate from Headless Sync workflows; they solve different problems.
- URI values must be encoded correctly or the action may be misinterpreted.
- On Linux, check registration, symlinks, and
PATHbefore assuming the CLI is broken.