| name | vaultctl |
| description | Use this skill whenever you need to search, read, write, or manage notes in an Obsidian vault using the vaultctl CLI. Trigger whenever the user asks to find a note, search the vault, create or update a note, check vault stats, navigate the vault structure, or audit note health. Also trigger when the user asks "how do I use vaultctl" or wants to understand vault CLI usage. If you're about to run any vault operation and aren't sure of the right command or flags, consult this skill first.
|
vaultctl — Vault CLI for Agents
vaultctl is a zero-dependency CLI for searching and managing an Obsidian vault using SQLite FTS5.
No server, no embeddings, no container — fast local BM25 search with full CRUD.
Config
~/.config/vaultctl/config.toml — check this if unsure which sources are active:
[[sources]]
id = "vault"
root = "$HOME/second-mind"
include_glob = "**/*.md"
exclude_glob = ".worktrees/**"
[[sources]]
id = "transcripts"
root = "$HOME/dev/transcriptoz/transcripts"
include_glob = "**/*.analysis.md"
Database: ~/.local/share/vaultctl/index.db
Core Commands
Always use --json when consuming output programmatically.
Search
vaultctl "query terms" --json
vaultctl "query" --folder concetti-schemi --json
vaultctl "query" --tag mechanics --json
vaultctl "query" --status permanent --json
vaultctl "query" --source transcripts --json
vaultctl "query" -n 10 --json
Result shape:
[
{
"score": -4.84,
"source_id": "vault",
"rel_path": "concetti-schemi/repo-market.md",
"title": "repo-market",
"snippet": "...matched text with context...",
"tags": ["mechanics", "repo"],
"status": "permanent"
}
]
Score is negative BM25 — less negative = more relevant. Top result is index 0.
Index
vaultctl index --json
vaultctl index --full --json
vaultctl index --source vault --json
vaultctl status --json
Run vaultctl index if search returns stale or missing results. Index auto-bootstraps on first use.
Note Operations
vaultctl note read "path/to/note.md" --json
vaultctl note write "path/to/note.md" --text "# Title\ncontent" --json
vaultctl note append "path/to/note.md" --text "\n## New section\n..." --json
vaultctl note delete "path/to/note.md" --yes --json
vaultctl note index "path/to/note.md" --json
vaultctl note links "path/to/note.md" --json
Paths are relative to the source root. Write/append/delete auto-reindex after the operation.
Read result shape:
{
"success": true,
"source": "vault",
"file_path": "concetti-schemi/repo-market.md",
"content": "...",
"metadata": {
"note_title": "repo-market",
"folder": "concetti-schemi",
"tags": ["mechanics", "repo"],
"status": "permanent",
"wikilinks": ["[[primary-dealer]]"]
}
}
Navigation
vaultctl find "pattern" --source vault --json
vaultctl tree concetti-schemi --depth 2 --json
vaultctl context vault:path/to/note.md --json
context TARGET format: source_id:relative/path.md
Vault Analytics
vaultctl stats --json
vaultctl status --json
vaultctl audit orphans --json
vaultctl audit linked -n 20 --json
vaultctl audit duplicates --json
MCP Bridge
vaultctl mcp serve --transport stdio
Exposes vault operations as MCP tools over stdio for MCP client compatibility.
Common Agent Patterns
Search then read:
vaultctl "repo market mechanics" --folder concetti-schemi --json
vaultctl note read "1-projects/trading/concetti-schemi/repo-market.md" --json
Write a note and confirm it's searchable:
vaultctl note write "1-projects/research/new-topic.md" --text "# New Topic\n..." --json
vaultctl "new topic" --json
Stale index guard:
vaultctl status --json
vaultctl index --json