mirror of
https://github.com/kepano/obsidian-skills.git
synced 2026-12-05 10:05:18 -08:00
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:
@@ -25,7 +25,7 @@ obsidian create name="My Note" content="Hello world"
|
||||
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
|
||||
|
||||
@@ -48,6 +48,9 @@ obsidian vault="My Vault" search query="test"
|
||||
obsidian read file="My Note"
|
||||
obsidian create name="New Note" content="# Hello" template="Template" silent
|
||||
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 daily:read
|
||||
obsidian daily:append content="- [ ] New task"
|
||||
@@ -57,7 +60,7 @@ obsidian tags sort=count counts
|
||||
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
|
||||
|
||||
@@ -85,7 +88,7 @@ After making code changes to a plugin or theme, follow this workflow:
|
||||
|
||||
### 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
|
||||
obsidian eval code="app.vault.getFiles().length"
|
||||
|
||||
Reference in New Issue
Block a user