The obsidian commands need Obsidian 1.12.7 or later, with Settings > General > Command line interface turned on, and the app running (the first command starts it). Use file= with a note's name, the way wikilinks work, or path= with its exact path from the vault root, such as Projects/Homelab.md; with neither, the command uses the note that's open. Put quotes around values with spaces, and add --copy to copy the output. Shortcuts show Ctrl; on a Mac use Cmd. Note, folder and tag names are examples, so swap in your own.

Set up the CLI #

  • Check the CLI worksLinux, macOS, Windows
    obsidian version
  • Open the interactive terminal mode (with autocomplete)Linux, macOS, Windows
    obsidian
  • List every commandLinux, macOS, Windows
    obsidian help
  • Show help for one commandLinux, macOS, Windows
    obsidian help search
  • Fix a missing obsidian command on macOSmacOS
    sudo ln -sf /Applications/Obsidian.app/Contents/MacOS/obsidian-cli /usr/local/bin/obsidian
  • Add the CLI folder to your PATH on LinuxLinux
    export PATH="$HOME/.local/bin:$PATH"
  • Run a command against a named vaultLinux, macOS, Windows
    obsidian vault=Notes search query="proxmox"
  • Copy any command's output to the clipboardLinux, macOS, Windows
    obsidian search query="TODO" --copy
  • List your vaultsLinux, macOS, Windows
    obsidian vaults
  • Show the current vault's locationLinux, macOS, Windows
    obsidian vault info=path
  • Reload the Obsidian windowLinux, macOS, Windows
    obsidian reload
  • Restart ObsidianLinux, macOS, Windows
    obsidian restart

Notes and folders #

  • Open a note by nameLinux, macOS, Windows
    obsidian open file="Meeting notes"
  • Open a note in a new tabLinux, macOS, Windows
    obsidian open file="Meeting notes" newtab
  • Open a note by its exact pathLinux, macOS, Windows
    obsidian open path="Projects/Homelab.md"
  • Show a note's contentsLinux, macOS, Windows
    obsidian read file="Meeting notes"
  • Create a noteLinux, macOS, Windows
    obsidian create name="Meeting notes" content="# Meeting notes"
  • Create a note in a folder and open itLinux, macOS, Windows
    obsidian create path="Projects/Homelab.md" open
  • Create a note from a templateLinux, macOS, Windows
    obsidian create name="Meeting notes" template="Meeting"
  • Add text to the end of a noteLinux, macOS, Windows
    obsidian append file="Meeting notes" content="- [ ] Back up the NAS"
  • Add text under a headingLinux, macOS, Windows
    obsidian append file="Meeting notes" heading="Tasks" content="- [ ] Back up the NAS"
  • Add text to the top of a noteLinux, macOS, Windows
    obsidian prepend file="Meeting notes" content="- [ ] Back up the NAS"
  • Rename a note (links update)Linux, macOS, Windows
    obsidian rename file="Meeting notes" name="Homelab plan"
  • Move a note to another folderLinux, macOS, Windows
    obsidian move file="Meeting notes" to="Archive"
  • Delete a note (to the trash)Linux, macOS, Windows
    obsidian delete file="Meeting notes"
  • Delete a note for goodLinux, macOS, Windows
    obsidian delete file="Meeting notes" permanent

    Warning: Skips the trash, so it can't be undone from Obsidian.

  • Show a note's detailsLinux, macOS, Windows
    obsidian file file="Meeting notes"
  • List the files in a folderLinux, macOS, Windows
    obsidian files folder="Projects"
  • Count the Markdown files in the vaultLinux, macOS, Windows
    obsidian files ext=md total
  • List foldersLinux, macOS, Windows
    obsidian folders
  • Show a folder's sizeLinux, macOS, Windows
    obsidian folder path="Projects" info=size
  • Show a note's headingsLinux, macOS, Windows
    obsidian outline file="Meeting notes"
  • Count the words in a noteLinux, macOS, Windows
    obsidian wordcount file="Meeting notes" words
  • Open a random noteLinux, macOS, Windows
    obsidian random
  • Open a web page in ObsidianLinux, macOS, Windows
    obsidian web url="https://commandguide.com"

Daily notes and templates #

  • Open today's daily noteLinux, macOS, Windows
    obsidian daily
  • Show today's daily noteLinux, macOS, Windows
    obsidian daily:read
  • Show where today's daily note is savedLinux, macOS, Windows
    obsidian daily:path
  • Add a task to today's daily noteLinux, macOS, Windows
    obsidian daily:append content="- [ ] - [ ] Back up the NAS"
  • Add text under a heading in today's noteLinux, macOS, Windows
    obsidian daily:append heading="Tasks" content="- [ ] Back up the NAS"
  • Add text to the top of today's noteLinux, macOS, Windows
    obsidian daily:prepend content="- [ ] Back up the NAS"
  • Make a unique (Zettelkasten) noteLinux, macOS, Windows
    obsidian unique content="- [ ] Back up the NAS" open
  • List templatesLinux, macOS, Windows
    obsidian templates
  • Show a templateLinux, macOS, Windows
    obsidian template:read name="Meeting"
  • Insert a template into the open noteLinux, macOS, Windows
    obsidian template:insert name="Meeting"

Tasks and properties #

  • List open tasks across the vaultLinux, macOS, Windows
    obsidian tasks todo
  • List completed tasksLinux, macOS, Windows
    obsidian tasks done
  • List tasks in today's daily noteLinux, macOS, Windows
    obsidian tasks daily
  • List tasks in one noteLinux, macOS, Windows
    obsidian tasks file="Meeting notes" verbose
  • Tick off a task by its lineLinux, macOS, Windows
    obsidian task path="Projects/Homelab.md" line=12 toggle
  • List the properties used in the vaultLinux, macOS, Windows
    obsidian properties counts
  • Show one property of a noteLinux, macOS, Windows
    obsidian property:read file="Meeting notes" name="status"
  • Set a property on a noteLinux, macOS, Windows
    obsidian property:set file="Meeting notes" name="status" value="active"
  • Set a date propertyLinux, macOS, Windows
    obsidian property:set file="Meeting notes" name="due" value="2026-12-31" type=date
  • Remove a propertyLinux, macOS, Windows
    obsidian property:remove file="Meeting notes" name="status"
  • List a note's aliasesLinux, macOS, Windows
    obsidian aliases file="Meeting notes"
  • List bookmarksLinux, macOS, Windows
    obsidian bookmarks
  • Bookmark a noteLinux, macOS, Windows
    obsidian bookmark file="Meeting notes"
  • List BasesLinux, macOS, Windows
    obsidian bases
  • Query a Base as CSVLinux, macOS, Windows
    obsidian base:query file="Reading list" format=csv

Plugins, themes and workspaces #

  • List pluginsLinux, macOS, Windows
    obsidian plugins
  • List community plugins with versionsLinux, macOS, Windows
    obsidian plugins filter=community versions
  • Install and turn on a community pluginLinux, macOS, Windows
    obsidian plugin:install id=dataview enable
  • Turn a plugin onLinux, macOS, Windows
    obsidian plugin:enable id=dataview
  • Turn a plugin offLinux, macOS, Windows
    obsidian plugin:disable id=dataview
  • Reload a pluginLinux, macOS, Windows
    obsidian plugin:reload id=dataview
  • Uninstall a pluginLinux, macOS, Windows
    obsidian plugin:uninstall id=dataview
  • Turn on restricted mode (all community plugins off)Linux, macOS, Windows
    obsidian plugins:restrict on
  • List themesLinux, macOS, Windows
    obsidian themes
  • Install and use a themeLinux, macOS, Windows
    obsidian theme:install name="Minimal" enable
  • Switch back to the default themeLinux, macOS, Windows
    obsidian theme:set name=
  • List CSS snippetsLinux, macOS, Windows
    obsidian snippets
  • Turn a CSS snippet onLinux, macOS, Windows
    obsidian snippet:enable name="wide-tables"
  • Save the current layout as a workspaceLinux, macOS, Windows
    obsidian workspace:save name="Writing"
  • Load a workspaceLinux, macOS, Windows
    obsidian workspace:load name="Writing"
  • List open tabsLinux, macOS, Windows
    obsidian tabs
  • List recently opened filesLinux, macOS, Windows
    obsidian recents
  • List every command palette commandLinux, macOS, Windows
    obsidian commands
  • Run a command palette command by IDLinux, macOS, Windows
    obsidian command id=app:toggle-left-sidebar
  • Show the hotkey for a commandLinux, macOS, Windows
    obsidian hotkey id=app:toggle-left-sidebar

History, Sync and Publish #

  • List a note's saved versionsLinux, macOS, Windows
    obsidian history file="Meeting notes"
  • Show an old version of a noteLinux, macOS, Windows
    obsidian history:read file="Meeting notes" version=2
  • Compare two versions of a noteLinux, macOS, Windows
    obsidian diff file="Meeting notes" from=1 to=3
  • Restore an old versionLinux, macOS, Windows
    obsidian history:restore file="Meeting notes" version=2

    Warning: Replaces the note's current text. Copy anything you want to keep first.

  • Show Sync statusLinux, macOS, Windows
    obsidian sync:status
  • Pause or resume SyncLinux, macOS, Windows
    obsidian sync off
  • List files deleted through SyncLinux, macOS, Windows
    obsidian sync:deleted
  • Restore a version from SyncLinux, macOS, Windows
    obsidian sync:restore file="Meeting notes" version=2
  • Show what's changed since the last PublishLinux, macOS, Windows
    obsidian publish:status
  • Add changed notes to PublishLinux, macOS, Windows
    obsidian publish:add changed

Developer commands #

  • Open the developer toolsLinux, macOS, Windows
    obsidian devtools
  • Show recent console errorsLinux, macOS, Windows
    obsidian dev:errors
  • Show the console logLinux, macOS, Windows
    obsidian dev:console limit=50
  • Take a screenshot of the Obsidian windowLinux, macOS, Windows
    obsidian dev:screenshot path=screenshot.png
  • Run JavaScript in ObsidianLinux, macOS, Windows
    obsidian eval code="app.vault.getFiles().length"
  • Preview the mobile layoutLinux, macOS, Windows
    obsidian dev:mobile on

Keyboard shortcuts #

  • Open the command palette (Cmd on Mac)Linux, macOS, Windows
    Ctrl+P
  • Quick switcher: jump to any noteLinux, macOS, Windows
    Ctrl+O
  • New noteLinux, macOS, Windows
    Ctrl+N
  • Search the whole vaultLinux, macOS, Windows
    Ctrl+Shift+F
  • Find in the current noteLinux, macOS, Windows
    Ctrl+F
  • Find and replace in the current noteLinux, macOS, Windows
    Ctrl+H
  • Switch between editing and reading viewLinux, macOS, Windows
    Ctrl+E
  • Open settingsLinux, macOS, Windows
    Ctrl+,
  • Open the graph viewLinux, macOS, Windows
    Ctrl+G
  • Insert a Markdown linkLinux, macOS, Windows
    Ctrl+K
  • BoldLinux, macOS, Windows
    Ctrl+B
  • ItalicLinux, macOS, Windows
    Ctrl+I
  • Tick or untick a checkboxLinux, macOS, Windows
    Ctrl+L
  • Close the current tabLinux, macOS, Windows
    Ctrl+W
  • Reopen the last closed tabLinux, macOS, Windows
    Ctrl+Shift+T
  • Open a link in a new tabLinux, macOS, Windows
    Ctrl+click
  • Indent or outdent a list itemLinux, macOS, Windows
    Tab / Shift+Tab

Markdown for Obsidian #

  • Link to another noteLinux, macOS, Windows
    [[Note name]]
  • Link with different text shownLinux, macOS, Windows
    [[Note name|text to show]]
  • Link to a heading in a noteLinux, macOS, Windows
    [[Note name#Heading]]
  • Link to a blockLinux, macOS, Windows
    [[Note name#^block-id]]
  • Give a paragraph a block IDLinux, macOS, Windows
    This paragraph can be linked to. ^block-id
  • Embed a whole noteLinux, macOS, Windows
    ![[Note name]]
  • Embed an image at 300 pixels wideLinux, macOS, Windows
    ![[diagram.png|300]]
  • Add tagsLinux, macOS, Windows
    #homelab #projects/proxmox
  • Add properties at the top of a noteLinux, macOS, Windows
    --- tags: [homelab] status: active due: 2026-12-31 ---
  • A taskLinux, macOS, Windows
    - [ ] Back up the NAS
  • A completed taskLinux, macOS, Windows
    - [x] Patch the firewall
  • A callout boxLinux, macOS, Windows
    > [!note] Title > Text inside the callout
  • A warning callout that starts foldedLinux, macOS, Windows
    > [!warning]- Click to expand > Hidden until opened
  • Highlight textLinux, macOS, Windows
    ==highlighted==
  • A comment only shown while editingLinux, macOS, Windows
    %% This won't show in reading view %%
  • A footnoteLinux, macOS, Windows
    Some claim.[^1] [^1]: The source.
  • A diagram with MermaidLinux, macOS, Windows
    ```mermaid graph LR A[Client] --> B[Firewall] --> C[Server] ```
  • Inline mathsLinux, macOS, Windows
    $E = mc^2$

Search syntax #

  • Exact phraseLinux, macOS, Windows
    "backup schedule"
  • Leave out a wordLinux, macOS, Windows
    proxmox -cluster
  • Either wordLinux, macOS, Windows
    nas OR backup
  • Only notes in a folderLinux, macOS, Windows
    path:Projects proxmox
  • Only file namesLinux, macOS, Windows
    file:homelab
  • Only notes with a tagLinux, macOS, Windows
    tag:#homelab
  • Both words on the same lineLinux, macOS, Windows
    line:(vlan trunk)
  • Words under the same headingLinux, macOS, Windows
    section:(firewall rules)
  • Open tasks containing a wordLinux, macOS, Windows
    task-todo:backup
  • Notes with a propertyLinux, macOS, Windows
    [status:active]
  • Regular expressionLinux, macOS, Windows
    /\d{3}-\d{4}/