Control Obsidian from the terminal using CLI v2 (1.12+). Create, read, append, search files; manage properties, tags, tasks; query bases; use templates; analyze links. Use when performing vault operations, automating note workflows, appending content to notes, managing frontmatter properties, or searching the vault from the command line. Requires Obsidian app to be running.
Control Obsidian from the terminal. Create files, append content, manage properties, search the vault, toggle tasks, query bases, and more — all from the command line.
obsidian version)~/.zprofile: export PATH="$PATH:/Applications/Obsidian.app/Contents/MacOS"obsidian <command> [params] [flags]obsidian alone to enter interactive mode with autocomplete and historyname=Note content="Hello world"open, overwrite, newtab\n for newline, \t for tabcontent="Hello world"vault=<name> or vault=<id> as FIRST parameter before the commandobsidian vault=PraxVault daily
obsidian vault="My Vault" search query="test"
Many commands accept file and path:
file=<name> — wikilink-style resolution (name only, no path/extension needed)path=<path> — exact path from vault root, e.g. 100xDevBootcamp/03_Web3/SelfStudy/classes/SS-W01.mdAdd --copy to any command to copy output to clipboard:
obsidian read --copy
obsidian search query="TODO" --copy
create — Create or overwrite a fileobsidian create name=<name> path=<path> content=<text> template=<name>
# Flags: overwrite, open, newtab
Examples:
# Create with content
obsidian create name="SS-W01 - Blockchains" content="# SS-W01\n\nStudy notes"
# Create from template
obsidian create name="New Note" template=Travel
# Create at specific path and open it
obsidian create path="Projects/idea.md" content="# Idea" open
# Overwrite existing
obsidian create name=Note content="Fresh start" overwrite
read — Read file contentsobsidian read # active file
obsidian read file=Recipe # by name
obsidian read path="folder/note.md" # by path
append — Append content to end of fileobsidian append content=<text> # active file
obsidian append file=<name> content=<text>
obsidian append path=<path> content=<text>
# Flag: inline (no newline before appended content)
Examples:
# Append to specific file
obsidian append file="SS-W01 - Blockchains" content="\n## New Section\nContent here"
# Inline append (no preceding newline)
obsidian append file=Note content=" more text" inline
prepend — Prepend content after frontmatterobsidian prepend content=<text>
obsidian prepend file=<name> content=<text>
# Flag: inline
[!important] Prepend inserts AFTER frontmatter, not at the very top of the file.
move — Move or rename a fileobsidian move file=<name> to=<path> # move to folder
obsidian move path=<path> to=<new-path> # move with new path
Automatically updates internal links if enabled in vault settings.
rename — Rename a fileobsidian rename file=<name> name=<new-name>
obsidian rename path=<path> name=<new-name>
Extension preserved automatically if omitted.
delete — Delete a fileobsidian delete file=<name> # to trash (default)
obsidian delete file=<name> permanent # skip trash
open — Open a fileobsidian open file=<name>
obsidian open path=<path> newtab
file — Show file metadataobsidian file # active file
obsidian file file=<name>
Returns: path, name, extension, size, created, modified timestamps.
files — List vault filesobsidian files # all files
obsidian files folder=<path> # filter by folder
obsidian files ext=md # filter by extension
obsidian files total # just the count
folder — Show folder infoobsidian folder path=<path>
obsidian folder path=<path> info=files # file count only
obsidian folder path=<path> info=size # size only
folders — List vault foldersobsidian folders # all folders
obsidian folders folder=<path> # filter by parent
obsidian folders total # just the count
properties — List propertiesobsidian properties # all vault properties
obsidian properties active # active file's properties
obsidian properties file=<name> # specific file
obsidian properties name=status # specific property count
obsidian properties counts sort=count # sorted by frequency
obsidian properties format=yaml # yaml|json|tsv
property:set — Set a propertyobsidian property:set name=<prop> value=<val>
obsidian property:set name=<prop> value=<val> file=<name>
obsidian property:set name=<prop> value=<val> type=<type>
# Types: text, list, number, checkbox, date, datetime
Examples:
# Set status on active file
obsidian property:set name=status value=in-progress
# Set status on specific file
obsidian property:set name=status value=complete file="SS-W01 - Blockchains"
# Set a date property
obsidian property:set name=date value=2026-03-02 type=date
# Set a list property
obsidian property:set name=tags value="[100xdev, web3]" type=list
property:read — Read a property valueobsidian property:read name=status
obsidian property:read name=status file=<name>
property:remove — Remove a propertyobsidian property:remove name=<prop>
obsidian property:remove name=<prop> file=<name>
search — Search vault text (returns file paths)obsidian search query=<text>
obsidian search query=<text> path=<folder> # limit to folder
obsidian search query=<text> limit=10 # max results
obsidian search query=<text> case # case sensitive
obsidian search query=<text> total # count only
obsidian search query=<text> format=json # text|json
search:context — Search with line contextReturns grep-style path:line: text output.
obsidian search:context query=<text>
obsidian search:context query=<text> path=<folder>
obsidian search:context query="TODO" format=json
search:open — Open search view in Obsidianobsidian search:open query="meeting notes"
tags — List tagsobsidian tags # all vault tags
obsidian tags active # active file's tags
obsidian tags file=<name> # specific file
obsidian tags counts # with occurrence counts
obsidian tags counts sort=count # sorted by frequency
obsidian tags total # just the count
obsidian tags format=json # json|tsv|csv
tag — Tag infoobsidian tag name=web3 # occurrence count
obsidian tag name=web3 total # just the number
obsidian tag name=web3 verbose # include file list
tasks — List tasksobsidian tasks # all tasks
obsidian tasks todo # incomplete only
obsidian tasks done # completed only
obsidian tasks file=<name> # from specific file
obsidian tasks daily # from daily note
obsidian tasks active # from active file
obsidian tasks verbose # group by file with line numbers
obsidian tasks total # just the count
obsidian tasks 'status=?' # filter by custom status char
obsidian tasks format=json # json|tsv|csv|text
task — Show or update a task# Show task info
obsidian task file=Recipe line=8
obsidian task ref="Recipe.md:8"
# Toggle completion
obsidian task ref="Recipe.md:8" toggle
# Mark done/todo
obsidian task file=Recipe line=8 done
obsidian task file=Recipe line=8 todo
obsidian task daily line=3 toggle
# Set custom status
obsidian task file=Recipe line=8 status=-
daily — Open daily noteobsidian daily
obsidian daily paneType=tab
daily:path — Get daily note pathReturns the expected path even if the file hasn't been created yet.
obsidian daily:path
daily:read — Read daily noteobsidian daily:read
daily:append — Append to daily noteobsidian daily:append content="- [ ] Buy groceries"
obsidian daily:append content="## Evening\nReflection" open
# Flags: inline, open
daily:prepend — Prepend to daily noteobsidian daily:prepend content="# Morning Priorities"
# Flags: inline, open
templates — List available templatesobsidian templates
obsidian templates total
template:read — Read template contentobsidian template:read name=<template>
obsidian template:read name=<template> resolve # resolve variables
obsidian template:read name=<template> title="My Note" resolve
The resolve flag processes {{date}}, {{time}}, {{title}} variables.
template:insert — Insert template into active fileobsidian template:insert name=<template>
[!tip] Creating files from templates Use
obsidian create path=<path> template=<name>to create a new file with a template applied.
backlinks — Incoming links to a fileobsidian backlinks # active file
obsidian backlinks file=<name>
obsidian backlinks file=<name> counts # include link counts
obsidian backlinks total # just the count
obsidian backlinks format=json # json|tsv|csv
links — Outgoing links from a fileobsidian links # active file
obsidian links file=<name>
obsidian links total
unresolved — Broken/unresolved linksobsidian unresolved # list all
obsidian unresolved total # count
obsidian unresolved counts verbose # with source files
orphans — Files with no incoming linksobsidian orphans
obsidian orphans total
deadends — Files with no outgoing linksobsidian deadends
obsidian deadends total
bases — List .base filesobsidian bases
base:views — List views in a baseobsidian base:views # active base
base:create — Create a new item in a baseobsidian base:create file=<base> name=<name> content=<text>
obsidian base:create file=<base> view=<view> name=<name>
# Flags: open, newtab
base:query — Query a baseobsidian base:query file=<base>
obsidian base:query file=<base> view=<view>
obsidian base:query file=<base> format=json # json|csv|tsv|md|paths
outline — Show headingsobsidian outline # active file
obsidian outline file=<name>
obsidian outline format=tree # tree|md|json
obsidian outline total # heading count
plugins — List installed pluginsobsidian plugins
obsidian plugins filter=community versions
obsidian plugins filter=core
obsidian plugins format=json
plugin — Plugin infoobsidian plugin id=<plugin-id>
plugin:enable / plugin:disableobsidian plugin:enable id=<id>
obsidian plugin:disable id=<id>
plugin:install / plugin:uninstallobsidian plugin:install id=<id> enable
obsidian plugin:uninstall id=<id>
plugin:reload — Reload plugin (for developers)obsidian plugin:reload id=my-plugin
obsidian themes # list installed
obsidian theme # show active
obsidian theme:set name=<name> # set active
obsidian theme:install name=<name> enable
obsidian theme:uninstall name=<name>
obsidian snippets # list all
obsidian snippets:enabled # list enabled
obsidian snippet:enable name=<name>
obsidian snippet:disable name=<name>
obsidian bookmarks # list bookmarks
obsidian bookmarks total verbose
obsidian bookmark file=<path> # bookmark a file
obsidian bookmark file=<path> subpath="#Heading"
obsidian bookmark search="TODO" # bookmark a search
obsidian bookmark url="https://..." # bookmark a URL
vault — Show vault infoobsidian vault
obsidian vault info=name # name|path|files|folders|size
vaults — List known vaultsobsidian vaults
obsidian vaults verbose # include paths
obsidian vaults total
vault:open — Switch vault (TUI only)