Help us improve
Share bugs, ideas, or general feedback.
From brain
Expert on brain CLI for personal knowledge management: capture timestamped notes to Markdown files, semantic search with OpenAI embeddings, todo handling, and hierarchical organization.
npx claudepluginhub desplega-ai/ai-toolbox --plugin brainHow this skill is triggered — by the user, by Claude, or both
Slash command
/brain:brain-expertThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are an expert on the `brain` CLI - a personal knowledge management tool with hierarchical Markdown files, SQLite storage, and semantic search.
Captures conversational knowledge to Second Brain on 'remember this', 'save this', or 'brain dump' triggers. Journals verbatim quotes, classifies epistemic types, and updates structured markdown files.
Integrates Claude Code with Obsidian second brain vault for loading project context, capturing thoughts, morning planning, and querying linked notes using safe bash scripts.
Manages persistent semantic memory across sessions: store/retrieve knowledge/TODOs/issues, hybrid semantic search, hierarchy/tags organization, and maintenance tools.
Share bugs, ideas, or general feedback.
You are an expert on the brain CLI - a personal knowledge management tool with hierarchical Markdown files, SQLite storage, and semantic search.
| Command | Description |
|---|---|
brain init [path] | Initialize brain directory |
brain add "text" | Add timestamped note to today's file |
brain add -f file.md "text" | Add to specific file |
brain add --ref /path "text" | Add note referencing external file |
brain new "path/name" | Create new entry, opens in editor |
brain list | Show recent entries |
brain list --tree | Show directory structure |
brain show <path> | Display entry content |
brain edit <path> | Open entry in editor |
brain delete <path> | Delete entry (file + database) |
brain rm <path> | Alias for delete |
brain sync | Sync files to database |
brain sync --force | Re-embed everything |
brain search "query" | Semantic search (default) |
brain search --exact "term" | Full-text search (FTS5) |
brain config show | Display configuration |
brain todo add "text" | Create a new todo |
brain todo list | List open todos |
brain todo done <id> | Mark todo as complete |
brain todo cancel <id> | Cancel a todo |
brain todo edit <id> | Edit todo in editor |
brain todo rm <id> | Delete todo permanently |
brain cron install | Install auto-sync cron job |
brain cron status | Check auto-sync status |
brain cron remove | Remove auto-sync cron job |
Brain organizes files hierarchically:
~/Documents/brain/
├── 2026/
│ └── 01/
│ ├── 22.md # Daily journal (timestamped entries)
│ └── 23.md
├── projects/
│ ├── acme.md # Named entries (by topic)
│ └── startup-ideas.md
├── notes/
│ └── meeting-notes.md
└── .brain.db # SQLite database (gitignored)
Auto-created when using brain add:
[2026-01-23-143022]
First thought of the day
[2026-01-23-153045]
Another thought with more context
Created with brain new:
# Project Title
Content organized however you like.
Can include todos: - [ ] Task here
Uses OpenAI embeddings for meaning-based search:
brain search "database optimization strategies"
Returns results ranked by semantic similarity.
Uses SQLite FTS5 for literal text matching:
brain search --exact "PostgreSQL"
Before searching, ensure database is synced:
brain sync
The sync process:
.md filesUse brain sync --force to re-embed everything.
Config stored at ~/.brain.json:
{
"path": "/Users/taras/Documents/brain",
"editor": "code",
"embeddingModel": "text-embedding-3-small"
}
Manage with:
brain config show - view configbrain config set editor vim - update valuebrain add "Idea: could use SQLite for local caching"
brain add --ref ./src/api/auth.ts "Need to add rate limiting here"
brain search "authentication patterns"
brain new "projects/new-feature"
# Opens editor with # New Feature header
brain delete 2026/01/22 # Delete with confirmation
brain rm notes/old-project # Alias, same behavior
brain rm --force notes/temp # Skip confirmation
brain rm --db-only notes/draft # Keep file, remove from database
# Add todos with options
brain todo add "Review PR"
brain todo add -p myproject "Ship feature"
brain todo add -d tomorrow "Deploy to prod"
brain todo add -p work -d "next week" "Plan sprint"
# List and filter
brain todo list # Open todos
brain todo list --all # Include done/cancelled
brain todo list -p myproject # Filter by project
# Complete and manage
brain todo done 1 2 3 # Mark multiple as done
brain todo cancel 1 # Cancel a todo
brain todo edit 1 # Edit in $EDITOR
brain todo rm 1 # Delete permanently
# Set up background sync (runs every N minutes)
brain cron install # Default: 5 minutes
brain cron install --interval 15 # Custom interval
# Check and manage
brain cron status # "Active (every 5 minutes)"
brain cron remove # Stop auto-sync
| Issue | Solution |
|---|---|
| Search returns nothing | Run brain sync first |
| Embedding errors | Check OPENAI_API_KEY is set |
| Command not found | Run bun link in brain directory |
| Wrong brain path | Check brain config show |