Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 507ef7149b | |||
| 462a38b164 |
@@ -68,10 +68,10 @@ The CLI provides **100+ commands** across these groups:
|
|||||||
| **links** | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` | Graph and link analysis |
|
| **links** | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` | Graph and link analysis |
|
||||||
| **bookmarks** | `bookmarks` | Bookmark management |
|
| **bookmarks** | `bookmarks` | Bookmark management |
|
||||||
| **templates** | `templates`, `template:read`, `template:insert` | Template listing, rendering, insertion |
|
| **templates** | `templates`, `template:read`, `template:insert` | Template listing, rendering, insertion |
|
||||||
| **plugins** | `plugins`, `plugin:enable`, `plugin:disable`, `plugin:install`, `plugin:reload` | Plugin management |
|
| **plugins** | `plugins`, `plugin:enable`, `plugin:disable`, `plugin:install`, `plugin:uninstall`, `plugin:reload` | Plugin management |
|
||||||
| **sync** | `sync`, `sync:status`, `sync:history`, `sync:read`, `sync:restore`, `sync:deleted` | Obsidian Sync operations |
|
| **sync** | `sync`, `sync:status`, `sync:history`, `sync:read`, `sync:restore`, `sync:deleted` | Obsidian Sync operations |
|
||||||
| **themes** | `themes` | Theme management |
|
| **themes** | `themes`, `themes versions` | Theme management |
|
||||||
| **dev** | `dev:screenshot`, `eval`, `dev:console`, `dev:errors` | Developer/debugging tools |
|
| **dev** | `dev:screenshot`, `eval`, `dev:debug`, `dev:console`, `dev:errors` | Developer/debugging tools |
|
||||||
| **vault** | `vault`, `vaults`, `version` | Vault info and metadata |
|
| **vault** | `vault`, `vaults`, `version` | Vault info and metadata |
|
||||||
| **other** | `outline`, `wordcount`, `recents`, `reload` | Utility commands |
|
| **other** | `outline`, `wordcount`, `recents`, `reload` | Utility commands |
|
||||||
|
|
||||||
@@ -104,8 +104,8 @@ obsidian daily:prepend content="## Morning Notes"
|
|||||||
```bash
|
```bash
|
||||||
obsidian search query="project alpha"
|
obsidian search query="project alpha"
|
||||||
obsidian search query="TODO" path="projects" limit=10
|
obsidian search query="TODO" path="projects" limit=10
|
||||||
obsidian search query="meeting" format=json
|
obsidian search query="meeting" format=json # Returns JSON array of file paths
|
||||||
obsidian search query="urgent" matches case
|
obsidian search query="urgent" case
|
||||||
```
|
```
|
||||||
|
|
||||||
### Properties & Tags
|
### Properties & Tags
|
||||||
@@ -122,18 +122,20 @@ obsidian tag name="project/alpha"
|
|||||||
### Tasks
|
### Tasks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian tasks # All incomplete tasks
|
obsidian tasks # All tasks (done + todo) — same as tasks all in v1.12
|
||||||
obsidian tasks all # All tasks (done + todo)
|
obsidian tasks all # All tasks (done + todo)
|
||||||
obsidian tasks done # Completed only
|
obsidian tasks done # Completed only
|
||||||
obsidian tasks daily # Tasks in today's daily note
|
obsidian tasks daily # Tasks in today's daily note
|
||||||
obsidian task path="note.md" line=12 toggle
|
obsidian task path="note.md" line=12 toggle
|
||||||
|
obsidian tasks | grep "\[ \]" # Workaround: filter to incomplete only
|
||||||
```
|
```
|
||||||
|
|
||||||
### Developer & Automation
|
### Developer & Automation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian eval code="app.vault.getFiles().length"
|
obsidian eval code="app.vault.getFiles().length"
|
||||||
obsidian dev:screenshot path="screenshot.png"
|
obsidian dev:screenshot path="folder/screenshot.png" # Path must be vault-relative
|
||||||
|
obsidian dev:debug on # Required before dev:console
|
||||||
obsidian dev:console limit=20
|
obsidian dev:console limit=20
|
||||||
obsidian dev:errors
|
obsidian dev:errors
|
||||||
```
|
```
|
||||||
@@ -178,7 +180,7 @@ obsidian daily:append content="- Started [[projects/new-feature|New Feature]]"
|
|||||||
```bash
|
```bash
|
||||||
obsidian files total # Total file count
|
obsidian files total # Total file count
|
||||||
obsidian tags counts sort=count # Most used tags
|
obsidian tags counts sort=count # Most used tags
|
||||||
obsidian tasks # Open tasks across vault
|
obsidian tasks | grep "\[ \]" # Incomplete tasks across vault
|
||||||
obsidian orphans # Notes needing integration
|
obsidian orphans # Notes needing integration
|
||||||
obsidian unresolved # Broken links to fix
|
obsidian unresolved # Broken links to fix
|
||||||
```
|
```
|
||||||
@@ -186,7 +188,7 @@ obsidian unresolved # Broken links to fix
|
|||||||
### Search and Extract for AI Processing
|
### Search and Extract for AI Processing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian search query="meeting notes" format=json | jq '.[] | .path'
|
obsidian search query="meeting notes" format=json | jq '.[]'
|
||||||
obsidian read path="meetings/standup.md" | grep "Action item"
|
obsidian read path="meetings/standup.md" | grep "Action item"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -204,7 +206,7 @@ obsidian sync:restore path="important.md" version=3 # Rollback
|
|||||||
2. **`create` paths omit `.md`** — the extension is added automatically.
|
2. **`create` paths omit `.md`** — the extension is added automatically.
|
||||||
3. **`move` requires full target path** including `.md` extension.
|
3. **`move` requires full target path** including `.md` extension.
|
||||||
4. **Pipe-friendly** — plain text output works with `grep`, `awk`, `sed`, `jq`.
|
4. **Pipe-friendly** — plain text output works with `grep`, `awk`, `sed`, `jq`.
|
||||||
5. **JSON output** — use `format=json` on search and file commands for machine parsing.
|
5. **JSON output** — use `format=json` on `search` for a JSON array of file paths. The `files` command does not support JSON output.
|
||||||
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
||||||
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
||||||
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ obsidian files # List all files in vault
|
|||||||
obsidian files ext=md # Filter by extension
|
obsidian files ext=md # Filter by extension
|
||||||
obsidian files folder="subfolder" # Files in specific folder
|
obsidian files folder="subfolder" # Files in specific folder
|
||||||
obsidian files total # Just the file count
|
obsidian files total # Just the file count
|
||||||
obsidian files format=json # JSON output
|
|
||||||
obsidian folders # List all folders
|
obsidian folders # List all folders
|
||||||
obsidian file path="folder/note.md" # File info (size, created, modified dates)
|
obsidian file path="folder/note.md" # File info (size, created, modified dates)
|
||||||
```
|
```
|
||||||
@@ -116,8 +115,8 @@ Full-text search across the vault.
|
|||||||
obsidian search query="search text"
|
obsidian search query="search text"
|
||||||
obsidian search query="text" path="folder" # Scope to folder
|
obsidian search query="text" path="folder" # Scope to folder
|
||||||
obsidian search query="text" limit=10 # Limit results
|
obsidian search query="text" limit=10 # Limit results
|
||||||
obsidian search query="text" format=json # JSON output
|
obsidian search query="text" format=json # JSON output (array of file paths)
|
||||||
obsidian search query="text" matches # Include match context/snippets
|
obsidian search query="text" matches # Accepted but returns file paths only
|
||||||
obsidian search query="text" case # Case-sensitive search
|
obsidian search query="text" case # Case-sensitive search
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -125,8 +124,8 @@ obsidian search query="text" case # Case-sensitive search
|
|||||||
- `query=` — Search term (required)
|
- `query=` — Search term (required)
|
||||||
- `path=` — Restrict search to a folder
|
- `path=` — Restrict search to a folder
|
||||||
- `limit=` — Maximum number of results
|
- `limit=` — Maximum number of results
|
||||||
- `format=json` — Machine-readable JSON output
|
- `format=json` — Returns a JSON array of matching file paths: `["folder/note.md", ...]`
|
||||||
- `matches` — Show matching line context
|
- `matches` — Flag accepted by the CLI but does not return match context/snippets in v1.12
|
||||||
- `case` — Enable case-sensitive matching
|
- `case` — Enable case-sensitive matching
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -196,13 +195,15 @@ Query and manage checkbox tasks across the vault.
|
|||||||
### Querying Tasks
|
### Querying Tasks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian tasks # All incomplete tasks
|
obsidian tasks # All tasks (same as tasks all in v1.12)
|
||||||
obsidian tasks all # All tasks (complete + incomplete)
|
obsidian tasks all # All tasks (complete + incomplete)
|
||||||
obsidian tasks done # Only completed tasks
|
obsidian tasks done # Only completed tasks
|
||||||
obsidian tasks path="note.md" # Tasks in a specific file
|
obsidian tasks path="note.md" # Tasks in a specific file
|
||||||
obsidian tasks daily # Tasks in today's daily note
|
obsidian tasks daily # Tasks in today's daily note
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** In v1.12, `tasks` with no arguments returns all tasks (complete + incomplete), identical to `tasks all`. Filtering to incomplete-only is not currently supported without post-processing (e.g. pipe to `grep "\[ \]"`).
|
||||||
|
|
||||||
### Toggling Task Status
|
### Toggling Task Status
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -248,14 +249,16 @@ Work with note templates (requires Templates or Templater plugin).
|
|||||||
obsidian templates # List available templates
|
obsidian templates # List available templates
|
||||||
obsidian template:read name="weekly-review" # Read template content
|
obsidian template:read name="weekly-review" # Read template content
|
||||||
obsidian template:read name="weekly-review" resolve title="My Note" # Render with variables
|
obsidian template:read name="weekly-review" resolve title="My Note" # Render with variables
|
||||||
obsidian template:insert name="weekly-review" # Insert template into active file
|
obsidian template:insert name="weekly-review" # Insert template into the active Obsidian UI file
|
||||||
```
|
```
|
||||||
|
|
||||||
**Parameters:**
|
**Parameters:**
|
||||||
- `name=` — Template name (without path prefix or extension)
|
- `name=` — Template name (without path prefix or extension)
|
||||||
- `resolve` — Process template variables
|
- `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.)
|
||||||
- Title and other variables can be passed as `key=value` for template rendering.
|
- Title and other variables can be passed as `key=value` for template rendering.
|
||||||
|
|
||||||
|
> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. To create a new file from a template, use `obsidian create path="..." template="..."` instead.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
@@ -263,15 +266,18 @@ obsidian template:insert name="weekly-review" # Insert template into a
|
|||||||
Manage community and core plugins.
|
Manage community and core plugins.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian plugins # List all installed plugins
|
obsidian plugins # List all plugins (core + community)
|
||||||
obsidian plugins:enabled # Only enabled plugins
|
obsidian plugins:enabled # Only enabled plugins
|
||||||
obsidian plugins versions # Plugins with version numbers
|
obsidian plugins versions # Plugins with version numbers (community only)
|
||||||
obsidian plugin:enable id="canvas" # Enable a plugin
|
obsidian plugin:enable id="canvas" # Enable a plugin
|
||||||
obsidian plugin:disable id="canvas" # Disable a plugin
|
obsidian plugin:disable id="canvas" # Disable a plugin
|
||||||
obsidian plugin:install id="dataview" # Install from community plugins
|
obsidian plugin:install id="dataview" # Install from community plugins
|
||||||
obsidian plugin:reload id="my-plugin" # Reload a plugin (useful for dev)
|
obsidian plugin:uninstall id="dataview" # Uninstall a community plugin
|
||||||
|
obsidian plugin:reload id="my-plugin" # Reload a plugin (useful for dev)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** `plugins versions` only shows version numbers for community plugins. Core (built-in) plugins share Obsidian's version and display blank version fields.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Sync
|
## Sync
|
||||||
@@ -296,11 +302,10 @@ obsidian sync:deleted # List files deleted via sync
|
|||||||
Manage appearance themes.
|
Manage appearance themes.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian themes # List available/installed themes
|
obsidian themes # List installed themes
|
||||||
|
obsidian themes versions # List installed themes with version numbers
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `obsidian themes --help` for additional subcommands related to theme management (install, switch, etc.).
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Developer
|
## Developer
|
||||||
@@ -310,10 +315,10 @@ Debugging and development tools.
|
|||||||
### Screenshots
|
### Screenshots
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian dev:screenshot path="screenshot.png"
|
obsidian dev:screenshot path="folder/screenshot.png"
|
||||||
```
|
```
|
||||||
|
|
||||||
Takes a screenshot of the Obsidian window and saves it.
|
Takes a screenshot of the Obsidian window and saves it. **Path must be vault-relative** — absolute filesystem paths are silently ignored.
|
||||||
|
|
||||||
### JavaScript Evaluation
|
### JavaScript Evaluation
|
||||||
|
|
||||||
@@ -327,10 +332,14 @@ Executes arbitrary JavaScript in the Obsidian app context. Has access to the ful
|
|||||||
### Console & Errors
|
### Console & Errors
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian dev:console limit=20 # Recent console output
|
obsidian dev:debug on # Start capturing console output (required before dev:console)
|
||||||
obsidian dev:errors # Recent error messages
|
obsidian dev:debug off # Stop capturing console output
|
||||||
|
obsidian dev:console limit=20 # Recent console output (requires dev:debug on first)
|
||||||
|
obsidian dev:errors # Recent error messages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** `dev:console` will return an error unless `dev:debug on` has been run first in the current session.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Vault & System
|
## Vault & System
|
||||||
@@ -369,9 +378,11 @@ obsidian tag name="urgent" | while read -r note; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Export search results as JSON and process with jq
|
# Export search results as JSON and process with jq
|
||||||
obsidian search query="meeting" format=json | jq '.[].path'
|
# format=json returns an array of file path strings: ["folder/note.md", ...]
|
||||||
|
obsidian search query="meeting" format=json | jq '.[]'
|
||||||
|
|
||||||
# Filter console errors
|
# Filter console errors (requires dev:debug on first)
|
||||||
|
obsidian dev:debug on
|
||||||
obsidian dev:console limit=50 | grep -i error
|
obsidian dev:console limit=50 | grep -i error
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -68,10 +68,10 @@ The CLI provides **100+ commands** across these groups:
|
|||||||
| **links** | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` | Graph and link analysis |
|
| **links** | `backlinks`, `links`, `unresolved`, `orphans`, `deadends` | Graph and link analysis |
|
||||||
| **bookmarks** | `bookmarks` | Bookmark management |
|
| **bookmarks** | `bookmarks` | Bookmark management |
|
||||||
| **templates** | `templates`, `template:read`, `template:insert` | Template listing, rendering, insertion |
|
| **templates** | `templates`, `template:read`, `template:insert` | Template listing, rendering, insertion |
|
||||||
| **plugins** | `plugins`, `plugin:enable`, `plugin:disable`, `plugin:install`, `plugin:reload` | Plugin management |
|
| **plugins** | `plugins`, `plugin:enable`, `plugin:disable`, `plugin:install`, `plugin:uninstall`, `plugin:reload` | Plugin management |
|
||||||
| **sync** | `sync`, `sync:status`, `sync:history`, `sync:read`, `sync:restore`, `sync:deleted` | Obsidian Sync operations |
|
| **sync** | `sync`, `sync:status`, `sync:history`, `sync:read`, `sync:restore`, `sync:deleted` | Obsidian Sync operations |
|
||||||
| **themes** | `themes` | Theme management |
|
| **themes** | `themes`, `themes versions` | Theme management |
|
||||||
| **dev** | `dev:screenshot`, `eval`, `dev:console`, `dev:errors` | Developer/debugging tools |
|
| **dev** | `dev:screenshot`, `eval`, `dev:debug`, `dev:console`, `dev:errors` | Developer/debugging tools |
|
||||||
| **vault** | `vault`, `vaults`, `version` | Vault info and metadata |
|
| **vault** | `vault`, `vaults`, `version` | Vault info and metadata |
|
||||||
| **other** | `outline`, `wordcount`, `recents`, `reload` | Utility commands |
|
| **other** | `outline`, `wordcount`, `recents`, `reload` | Utility commands |
|
||||||
|
|
||||||
@@ -104,8 +104,8 @@ obsidian daily:prepend content="## Morning Notes"
|
|||||||
```bash
|
```bash
|
||||||
obsidian search query="project alpha"
|
obsidian search query="project alpha"
|
||||||
obsidian search query="TODO" path="projects" limit=10
|
obsidian search query="TODO" path="projects" limit=10
|
||||||
obsidian search query="meeting" format=json
|
obsidian search query="meeting" format=json # Returns JSON array of file paths
|
||||||
obsidian search query="urgent" matches case
|
obsidian search query="urgent" case
|
||||||
```
|
```
|
||||||
|
|
||||||
### Properties & Tags
|
### Properties & Tags
|
||||||
@@ -122,18 +122,20 @@ obsidian tag name="project/alpha"
|
|||||||
### Tasks
|
### Tasks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian tasks # All incomplete tasks
|
obsidian tasks # All tasks (done + todo) — same as tasks all in v1.12
|
||||||
obsidian tasks all # All tasks (done + todo)
|
obsidian tasks all # All tasks (done + todo)
|
||||||
obsidian tasks done # Completed only
|
obsidian tasks done # Completed only
|
||||||
obsidian tasks daily # Tasks in today's daily note
|
obsidian tasks daily # Tasks in today's daily note
|
||||||
obsidian task path="note.md" line=12 toggle
|
obsidian task path="note.md" line=12 toggle
|
||||||
|
obsidian tasks | grep "\[ \]" # Workaround: filter to incomplete only
|
||||||
```
|
```
|
||||||
|
|
||||||
### Developer & Automation
|
### Developer & Automation
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian eval code="app.vault.getFiles().length"
|
obsidian eval code="app.vault.getFiles().length"
|
||||||
obsidian dev:screenshot path="screenshot.png"
|
obsidian dev:screenshot path="folder/screenshot.png" # Path must be vault-relative
|
||||||
|
obsidian dev:debug on # Required before dev:console
|
||||||
obsidian dev:console limit=20
|
obsidian dev:console limit=20
|
||||||
obsidian dev:errors
|
obsidian dev:errors
|
||||||
```
|
```
|
||||||
@@ -178,7 +180,7 @@ obsidian daily:append content="- Started [[projects/new-feature|New Feature]]"
|
|||||||
```bash
|
```bash
|
||||||
obsidian files total # Total file count
|
obsidian files total # Total file count
|
||||||
obsidian tags counts sort=count # Most used tags
|
obsidian tags counts sort=count # Most used tags
|
||||||
obsidian tasks # Open tasks across vault
|
obsidian tasks | grep "\[ \]" # Incomplete tasks across vault
|
||||||
obsidian orphans # Notes needing integration
|
obsidian orphans # Notes needing integration
|
||||||
obsidian unresolved # Broken links to fix
|
obsidian unresolved # Broken links to fix
|
||||||
```
|
```
|
||||||
@@ -186,7 +188,7 @@ obsidian unresolved # Broken links to fix
|
|||||||
### Search and Extract for AI Processing
|
### Search and Extract for AI Processing
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian search query="meeting notes" format=json | jq '.[] | .path'
|
obsidian search query="meeting notes" format=json | jq '.[]'
|
||||||
obsidian read path="meetings/standup.md" | grep "Action item"
|
obsidian read path="meetings/standup.md" | grep "Action item"
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -204,7 +206,7 @@ obsidian sync:restore path="important.md" version=3 # Rollback
|
|||||||
2. **`create` paths omit `.md`** — the extension is added automatically.
|
2. **`create` paths omit `.md`** — the extension is added automatically.
|
||||||
3. **`move` requires full target path** including `.md` extension.
|
3. **`move` requires full target path** including `.md` extension.
|
||||||
4. **Pipe-friendly** — plain text output works with `grep`, `awk`, `sed`, `jq`.
|
4. **Pipe-friendly** — plain text output works with `grep`, `awk`, `sed`, `jq`.
|
||||||
5. **JSON output** — use `format=json` on search and file commands for machine parsing.
|
5. **JSON output** — use `format=json` on `search` for a JSON array of file paths. The `files` command does not support JSON output.
|
||||||
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
6. **Stderr noise** — GPU/Electron warnings on headless are harmless; filter with `2>/dev/null`.
|
||||||
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
7. **`daily:prepend`** inserts content after frontmatter, not at byte 0.
|
||||||
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
8. **Use `eval`** to run arbitrary JavaScript against the Obsidian API (`app.*`).
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ obsidian files # List all files in vault
|
|||||||
obsidian files ext=md # Filter by extension
|
obsidian files ext=md # Filter by extension
|
||||||
obsidian files folder="subfolder" # Files in specific folder
|
obsidian files folder="subfolder" # Files in specific folder
|
||||||
obsidian files total # Just the file count
|
obsidian files total # Just the file count
|
||||||
obsidian files format=json # JSON output
|
|
||||||
obsidian folders # List all folders
|
obsidian folders # List all folders
|
||||||
obsidian file path="folder/note.md" # File info (size, created, modified dates)
|
obsidian file path="folder/note.md" # File info (size, created, modified dates)
|
||||||
```
|
```
|
||||||
@@ -116,8 +115,8 @@ Full-text search across the vault.
|
|||||||
obsidian search query="search text"
|
obsidian search query="search text"
|
||||||
obsidian search query="text" path="folder" # Scope to folder
|
obsidian search query="text" path="folder" # Scope to folder
|
||||||
obsidian search query="text" limit=10 # Limit results
|
obsidian search query="text" limit=10 # Limit results
|
||||||
obsidian search query="text" format=json # JSON output
|
obsidian search query="text" format=json # JSON output (array of file paths)
|
||||||
obsidian search query="text" matches # Include match context/snippets
|
obsidian search query="text" matches # Accepted but returns file paths only
|
||||||
obsidian search query="text" case # Case-sensitive search
|
obsidian search query="text" case # Case-sensitive search
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -125,8 +124,8 @@ obsidian search query="text" case # Case-sensitive search
|
|||||||
- `query=` — Search term (required)
|
- `query=` — Search term (required)
|
||||||
- `path=` — Restrict search to a folder
|
- `path=` — Restrict search to a folder
|
||||||
- `limit=` — Maximum number of results
|
- `limit=` — Maximum number of results
|
||||||
- `format=json` — Machine-readable JSON output
|
- `format=json` — Returns a JSON array of matching file paths: `["folder/note.md", ...]`
|
||||||
- `matches` — Show matching line context
|
- `matches` — Flag accepted by the CLI but does not return match context/snippets in v1.12
|
||||||
- `case` — Enable case-sensitive matching
|
- `case` — Enable case-sensitive matching
|
||||||
|
|
||||||
---
|
---
|
||||||
@@ -196,13 +195,15 @@ Query and manage checkbox tasks across the vault.
|
|||||||
### Querying Tasks
|
### Querying Tasks
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian tasks # All incomplete tasks
|
obsidian tasks # All tasks (same as tasks all in v1.12)
|
||||||
obsidian tasks all # All tasks (complete + incomplete)
|
obsidian tasks all # All tasks (complete + incomplete)
|
||||||
obsidian tasks done # Only completed tasks
|
obsidian tasks done # Only completed tasks
|
||||||
obsidian tasks path="note.md" # Tasks in a specific file
|
obsidian tasks path="note.md" # Tasks in a specific file
|
||||||
obsidian tasks daily # Tasks in today's daily note
|
obsidian tasks daily # Tasks in today's daily note
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** In v1.12, `tasks` with no arguments returns all tasks (complete + incomplete), identical to `tasks all`. Filtering to incomplete-only is not currently supported without post-processing (e.g. pipe to `grep "\[ \]"`).
|
||||||
|
|
||||||
### Toggling Task Status
|
### Toggling Task Status
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
@@ -248,14 +249,16 @@ Work with note templates (requires Templates or Templater plugin).
|
|||||||
obsidian templates # List available templates
|
obsidian templates # List available templates
|
||||||
obsidian template:read name="weekly-review" # Read template content
|
obsidian template:read name="weekly-review" # Read template content
|
||||||
obsidian template:read name="weekly-review" resolve title="My Note" # Render with variables
|
obsidian template:read name="weekly-review" resolve title="My Note" # Render with variables
|
||||||
obsidian template:insert name="weekly-review" # Insert template into active file
|
obsidian template:insert name="weekly-review" # Insert template into the active Obsidian UI file
|
||||||
```
|
```
|
||||||
|
|
||||||
**Parameters:**
|
**Parameters:**
|
||||||
- `name=` — Template name (without path prefix or extension)
|
- `name=` — Template name (without path prefix or extension)
|
||||||
- `resolve` — Process template variables
|
- `resolve` — Process template variables (`{{date}}`, `{{title}}`, etc.)
|
||||||
- Title and other variables can be passed as `key=value` for template rendering.
|
- Title and other variables can be passed as `key=value` for template rendering.
|
||||||
|
|
||||||
|
> **Note:** `template:insert` inserts into whichever file is currently active in the Obsidian UI — it does not accept a `path=` parameter. To create a new file from a template, use `obsidian create path="..." template="..."` instead.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Plugins
|
## Plugins
|
||||||
@@ -263,15 +266,18 @@ obsidian template:insert name="weekly-review" # Insert template into a
|
|||||||
Manage community and core plugins.
|
Manage community and core plugins.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian plugins # List all installed plugins
|
obsidian plugins # List all plugins (core + community)
|
||||||
obsidian plugins:enabled # Only enabled plugins
|
obsidian plugins:enabled # Only enabled plugins
|
||||||
obsidian plugins versions # Plugins with version numbers
|
obsidian plugins versions # Plugins with version numbers (community only)
|
||||||
obsidian plugin:enable id="canvas" # Enable a plugin
|
obsidian plugin:enable id="canvas" # Enable a plugin
|
||||||
obsidian plugin:disable id="canvas" # Disable a plugin
|
obsidian plugin:disable id="canvas" # Disable a plugin
|
||||||
obsidian plugin:install id="dataview" # Install from community plugins
|
obsidian plugin:install id="dataview" # Install from community plugins
|
||||||
obsidian plugin:reload id="my-plugin" # Reload a plugin (useful for dev)
|
obsidian plugin:uninstall id="dataview" # Uninstall a community plugin
|
||||||
|
obsidian plugin:reload id="my-plugin" # Reload a plugin (useful for dev)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** `plugins versions` only shows version numbers for community plugins. Core (built-in) plugins share Obsidian's version and display blank version fields.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Sync
|
## Sync
|
||||||
@@ -296,11 +302,10 @@ obsidian sync:deleted # List files deleted via sync
|
|||||||
Manage appearance themes.
|
Manage appearance themes.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian themes # List available/installed themes
|
obsidian themes # List installed themes
|
||||||
|
obsidian themes versions # List installed themes with version numbers
|
||||||
```
|
```
|
||||||
|
|
||||||
Use `obsidian themes --help` for additional subcommands related to theme management (install, switch, etc.).
|
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Developer
|
## Developer
|
||||||
@@ -310,10 +315,10 @@ Debugging and development tools.
|
|||||||
### Screenshots
|
### Screenshots
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian dev:screenshot path="screenshot.png"
|
obsidian dev:screenshot path="folder/screenshot.png"
|
||||||
```
|
```
|
||||||
|
|
||||||
Takes a screenshot of the Obsidian window and saves it.
|
Takes a screenshot of the Obsidian window and saves it. **Path must be vault-relative** — absolute filesystem paths are silently ignored.
|
||||||
|
|
||||||
### JavaScript Evaluation
|
### JavaScript Evaluation
|
||||||
|
|
||||||
@@ -327,10 +332,14 @@ Executes arbitrary JavaScript in the Obsidian app context. Has access to the ful
|
|||||||
### Console & Errors
|
### Console & Errors
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
obsidian dev:console limit=20 # Recent console output
|
obsidian dev:debug on # Start capturing console output (required before dev:console)
|
||||||
obsidian dev:errors # Recent error messages
|
obsidian dev:debug off # Stop capturing console output
|
||||||
|
obsidian dev:console limit=20 # Recent console output (requires dev:debug on first)
|
||||||
|
obsidian dev:errors # Recent error messages
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> **Note:** `dev:console` will return an error unless `dev:debug on` has been run first in the current session.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## Vault & System
|
## Vault & System
|
||||||
@@ -369,9 +378,11 @@ obsidian tag name="urgent" | while read -r note; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Export search results as JSON and process with jq
|
# Export search results as JSON and process with jq
|
||||||
obsidian search query="meeting" format=json | jq '.[].path'
|
# format=json returns an array of file path strings: ["folder/note.md", ...]
|
||||||
|
obsidian search query="meeting" format=json | jq '.[]'
|
||||||
|
|
||||||
# Filter console errors
|
# Filter console errors (requires dev:debug on first)
|
||||||
|
obsidian dev:debug on
|
||||||
obsidian dev:console limit=50 | grep -i error
|
obsidian dev:console limit=50 | grep -i error
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user