Skip to content

First-party source

Desktop command contract: Obsidian CLI, retrieved 2026-08-29 EDT. See the dated source ledger.

Files and folders

Fresh

Inspect, create, read, append, prepend, move, rename, and delete files and folders in the vault. Internal links update automatically if enabled in vault settings.

file

Show file info (default: active file).

bash
file=<name>        # file name
path=<path>        # file path

Example:

path       Notes/Recipe.md
name       Recipe
extension  md
size       1024
created    1700000000000
modified   1700001000000

files

List files in the vault.

bash
folder=<path>      # filter by folder
ext=<extension>    # filter by extension

total              # return file count

folder

Show folder info.

bash
path=<path>              # (required) folder path
info=files|folders|size  # return specific info only

folders

List folders in the vault.

bash
folder=<path>      # filter by parent folder

total              # return folder count

open

Open a file.

bash
file=<name>        # file name
path=<path>        # file path

newtab             # open in new tab

create

Create or overwrite a file.

bash
name=<name>        # file name
path=<path>        # file path
content=<text>     # initial content
template=<name>    # template to use

overwrite          # overwrite if file exists
open               # open file after creating
newtab             # open in new tab

read

Read file contents (default: active file).

bash
file=<name>        # file name
path=<path>        # file path

append

Append content to a file (default: active file).

bash
file=<name>        # file name
path=<path>        # file path
content=<text>     # (required) content to append

inline             # append without newline

prepend

Prepend content after frontmatter (default: active file).

bash
file=<name>        # file name
path=<path>        # file path
content=<text>     # (required) content to prepend

inline             # prepend without newline

move

Move or rename a file (default: active file). This will automatically update internal links if turned on in your vault settings.

bash
file=<name>        # file name
path=<path>        # file path
to=<path>          # (required) destination folder or path

rename

Rename a file (default: active file). The file extension is preserved automatically if omitted from the new name. Use move to rename and move a file at the same time. This will automatically update internal links if turned on in your vault settings.

bash
file=<name>        # file name
path=<path>        # file path
name=<name>        # (required) new file name

delete

Delete a file (default: active file, trash by default).

bash
file=<name>        # file name
path=<path>        # file path

permanent          # skip trash, delete permanently

See also

Unofficial SOP mirror. Built for terminal-driven and agentic Obsidian workflows.