Skip to content

Brain Commands

Brain commands connect Obsidian vaults and markdown directories to the code knowledge graph. Once added, notes, headings, sections, wikilinks, and tags become queryable alongside code symbols — the same PPR-based context retrieval works across both worlds. Use .brainignore for glob exclusion patterns or --ignore for ad-hoc filtering.

CommandDescriptionKey Flags
brain addIndex a vault into the knowledge graph--name, --instance, --db, --config, --ignore
brain removeRemove a vault (cascade-deletes nodes; files untouched)--instance, --db
brain listList all indexed vaults with note counts--json, --db
brain statusShow vault counts, staleness, and index health--json, --db, --config
brain refreshForce re-index of a vault--name, --instance, --db, --since, --ignore
CommandDescriptionKey Flags
brain searchBM25 full-text search across notes and symbols--limit, --json, --config, --prf
brain contextUnified PPR context across code + notes--token-budget, --limit, --kinds, --repos, --vaults, --path-prefix, --tags, --exclude-tags, --intent, --json
CommandDescriptionKey Flags
brain watchWatch vault for changes and re-index--name, --instance, --db, --ignore, --config, --refresh-wiki-hours
brain stale-checkCompare indexed SHA against git HEAD--json, --db
brain reindex-searchRebuild the Tantivy BM25 search index--db
CommandDescriptionKey Flags
brain broken-linksList wikilinks with ambiguous/low-confidence targets--max-suggestions, --limit, --json
brain orphansList notes with zero inbound and outbound wikilinks--vault, --path-prefix, --allow, --limit, --json
brain topic-clustersDetect topic clusters via Leiden community detection--resolution, --limit, --json
brain tag-graphShow tag note count and co-occurring tags--limit, --json
brain doc-statsOne-shot health summary--top-tags-limit, --json
CommandDescriptionKey Flags
memory lintHealth checks: stale notes, broken links, orphans--json, --config
memory consolidatePropose/apply tier promotions (dry-run by default)--apply, --json, --config
memory relatedTyped-edge traversal from a note--edge-type, --depth, --json
Terminal window
# Add an Obsidian vault
nestweaver brain add ~/Documents/Obsidian/MyVault
# Add with a custom name and ignore patterns
nestweaver brain add ~/notes --name work-notes --ignore "drafts/**,archive/**"
# List indexed vaults
nestweaver brain list --json
# Check vault health
nestweaver brain status
Terminal window
# Full-text search
nestweaver brain search "authentication flow"
# Search with pseudo-relevance feedback for better recall
nestweaver brain search "payment processing" --prf --limit 10
# Unified context with filtering
nestweaver brain context "authentication" --token-budget 4000 --kinds Symbol,Note
# Filter to specific tags
nestweaver brain context "billing" --tags "project/freeplay" --exclude-tags "archive"
# Filter to specific repos or vaults
nestweaver brain context "deployment" --repos my-api --vaults work-notes
Terminal window
# One-shot health summary
nestweaver brain doc-stats
# Find broken wikilinks with suggestions
nestweaver brain broken-links --max-suggestions 3
# Find orphan notes
nestweaver brain orphans --path-prefix Workspaces/
# Detect topic clusters
nestweaver brain topic-clusters --resolution 0.5
# Show tag co-occurrence
nestweaver brain tag-graph project/myproject
Terminal window
# Run health checks
nestweaver memory lint --json
# Propose tier promotions (dry-run)
nestweaver memory consolidate
# Apply promotions
nestweaver memory consolidate --apply
# Traverse typed relationships from a note
nestweaver memory related note:abc123 --edge-type Supersedes --depth 3

memory consolidate proposes promotions from daily logs to ideas to project files. Dry-run by default — use --apply to move files. memory related walks Supersedes, DependsOn, CausedBy, and RelatesTo edges.