Appearance
How to
FreshThis page covers the building blocks shared by every Obsidian CLI command: parameters, flags, vault targeting, file targeting, and copying output.
Use parameters and flags
Commands can use parameters and flags. Most commands do not require any parameters or flags. Required parameters are marked as required. For example:
shell
# Create a new note using the default "Untitled" name
obsidian createA parameter takes a value, written as parameter=value. If the value has spaces, wrap it in quotes:
shell
# Create a new note called "Note" with content "Hello world"
obsidian create name=Note content="Hello world"A flag is a boolean switch with no value. Include it to turn it on, for example open and overwrite are flags:
shell
# Create a note and open it
obsidian create name=Note content="Hello" open overwriteFor multiline content use \n for newline. Use \t for tab.
bash
obsidian create name=Note content="# Title\n\nBody text"Target a vault
If your terminal's current working directory is a vault folder, that vault is used by default. Otherwise, the currently active vault is used.
Use vault=<name> or vault=<id> to target a specific vault. This must be the first parameter before your command:
shell
obsidian vault=Notes daily
obsidian vault="My Vault" search query="test"In the TUI, use vault:open name=<name-or-id> to switch to a different vault.
Target a file
Many commands accept file and path parameters to target a specific file. If neither is provided, the command defaults to the active file.
file=<name>resolves the file using the same link resolution as wikilinks, matching by file name without requiring the full path or extension.path=<path>requires the exact path from the vault root, e.g.folder/note.md.
shell
# These are equivalent if "Recipe.md" is the only file with that name
obsidian read file=Recipe
obsidian read path="Templates/Recipe.md"Copy output
Add --copy to any command to copy the output to the clipboard:
shell
read --copy
search query="TODO" --copySafety boundary
Desktop restore, permanent delete, plugin mutation, and untrusted eval examples require backup and exact execution approval. Headless uses a separate option syntax and is limited to documented Sync and Publish. See Desktop CLI or Headless?.
Source: Obsidian CLI, retrieved 2026-08-29 EDT.