docs(obsidian-cli): add rename/move/delete to Common patterns

Document link-safe rename, move, and delete in Common patterns so
agents use the CLI instead of filesystem mv or eval for vault
mutations. Clarify that content= accepts a full note body.

Fixes #128
This commit is contained in:
arimu1
2026-08-01 16:56:14 +07:00
parent a1dc48e681
commit f4c0036a69
+6 -3
View File
@@ -25,7 +25,7 @@ obsidian create name="My Note" content="Hello world"
obsidian create name="My Note" silent overwrite obsidian create name="My Note" silent overwrite
``` ```
For multiline content use `\n` for newline and `\t` for tab. For multiline content use `\n` for newline and `\t` for tab. `content=` accepts a full note body (not only short snippets).
## File targeting ## File targeting
@@ -48,6 +48,9 @@ obsidian vault="My Vault" search query="test"
obsidian read file="My Note" obsidian read file="My Note"
obsidian create name="New Note" content="# Hello" template="Template" silent obsidian create name="New Note" content="# Hello" template="Template" silent
obsidian append file="My Note" content="New line" obsidian append file="My Note" content="New line"
obsidian rename path="folder/note.md" name="New name"
obsidian move path="folder/note.md" to="archive/"
obsidian delete path="folder/note.md"
obsidian search query="search term" limit=10 obsidian search query="search term" limit=10
obsidian daily:read obsidian daily:read
obsidian daily:append content="- [ ] New task" obsidian daily:append content="- [ ] New task"
@@ -57,7 +60,7 @@ obsidian tags sort=count counts
obsidian backlinks file="My Note" obsidian backlinks file="My Note"
``` ```
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. Use `rename` / `move` (not filesystem `mv` or `obsidian eval`) so Obsidian can update wikilinks when that setting is on. Prefer `create` / `append` with `content=` over `eval` for writing note bodies. 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.
## Plugin development ## Plugin development
@@ -85,7 +88,7 @@ After making code changes to a plugin or theme, follow this workflow:
### Additional developer commands ### Additional developer commands
Run JavaScript in the app context: Run JavaScript in the app context (prefer dedicated commands like `rename`, `move`, `create`, and `append` for vault mutations):
```bash ```bash
obsidian eval code="app.vault.getFiles().length" obsidian eval code="app.vault.getFiles().length"