Skip to content

Commit f1ff3eb

Browse files
committed
Apply PR kepano#78: sync obsidian-cli docs with current CLI behavior
2 parents 40cb256 + c7ac76f commit f1ff3eb

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

skills/obsidian-cli/SKILL.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Use the `obsidian` CLI to interact with a running Obsidian instance. Requires Ob
99

1010
## Command reference
1111

12-
Run `obsidian help` to see all available commands. This is always up to date. Full docs: https://help.obsidian.md/cli
12+
Run `obsidian help` to see all available commands. Use `obsidian help <command>` (or `obsidian <command> --help`) for detailed help on a specific command. Full docs: https://help.obsidian.md/cli
1313

1414
## Syntax
1515

@@ -22,17 +22,20 @@ obsidian create name="My Note" content="Hello world"
2222
**Flags** are boolean switches with no value:
2323

2424
```bash
25-
obsidian create name="My Note" silent overwrite
25+
obsidian create name="My Note" open overwrite
2626
```
2727

2828
For multiline content use `\n` for newline and `\t` for tab.
2929

3030
## File targeting
3131

32-
Many commands accept `file` or `path` to target a file. Without either, the active file is used.
32+
Many commands accept `file` or `path` to target a file. Without either:
33+
- **Content commands** (`read`, `outline`, `append`, `rename`, etc.) default to the active file.
34+
- **List/aggregation commands** (`aliases`, `properties`, `tags`, `tasks`) default to vault-wide; use the `active` flag to scope them to the active file.
3335

3436
- `file=<name>` — resolves like a wikilink (name only, no path or extension needed)
3537
- `path=<path>` — exact path from vault root, e.g. `folder/note.md`
38+
- `active` — scope list/aggregation commands to the active file
3639

3740
## Vault targeting
3841

@@ -46,18 +49,23 @@ obsidian vault="My Vault" search query="test"
4649

4750
```bash
4851
obsidian read file="My Note"
49-
obsidian create name="New Note" content="# Hello" template="Template" silent
52+
obsidian create name="New Note" content="# Hello" template="Template"
53+
obsidian create name="New Note" content="# Hello" open # also open in Obsidian
5054
obsidian append file="My Note" content="New line"
55+
obsidian rename file="Old Name" name="New Name"
56+
obsidian move path="folder/Old.md" to="other/Old.md" # to= must include filename, not just a folder
5157
obsidian search query="search term" limit=10
58+
obsidian search:context query="search term" # includes surrounding context
5259
obsidian daily:read
60+
obsidian daily:path # get expected daily note path
5361
obsidian daily:append content="- [ ] New task"
5462
obsidian property:set name="status" value="done" file="My Note"
5563
obsidian tasks daily todo
5664
obsidian tags sort=count counts
5765
obsidian backlinks file="My Note"
5866
```
5967

60-
Use `--copy` on any command to copy output to clipboard. Use `silent` to prevent files from opening. Use `total` on list commands to get a count.
68+
Commands default to **silent operation** — files are not opened in Obsidian unless you add the `open` flag. Use `--copy` on any command to copy output to clipboard. Use `total` on list commands to get a count.
6169

6270
## Plugin development
6371

0 commit comments

Comments
 (0)