Quick Start
Installation
Optional extras
pip install "brainlayer[brain]" # Brain graph visualization (HDBSCAN + UMAP)
pip install "brainlayer[cloud]" # Cloud backfill (Gemini Batch API)
pip install "brainlayer[youtube]" # YouTube transcript indexing
pip install "brainlayer[ast]" # AST-aware code chunking (tree-sitter)
Setup
Run the interactive wizard:
This will:
- Check for Claude Code conversations in
~/.claude/projects/ - Detect your hardware (Apple Silicon → MLX, otherwise Ollama)
- Configure your LLM backend for enrichment
- Create the database at
~/.local/share/brainlayer/brainlayer.db
Index Your Conversations
This parses your Claude Code conversations (JSONL files), classifies content, chunks it with sentence boundaries, generates embeddings (bge-large-en-v1.5), and stores everything in the SQLite database.
Connect to Your Editor
Claude Code
Add to ~/.claude.json:
Cursor
Add in Cursor's MCP settings:
Zed
Add to settings.json:
VS Code
Add to .vscode/mcp.json:
Enrich (Optional)
Add structured metadata to your indexed content using a local LLM:
This adds summary, tags, importance scores, intent classification, and more to each chunk. See Enrichment for details.
Verify
CLI Reference
brainlayer init # Interactive setup wizard
brainlayer index # Index new conversations
brainlayer search "query" # Semantic + keyword search
brainlayer enrich # Run LLM enrichment on new chunks
brainlayer enrich-sessions # Session-level analysis
brainlayer stats # Database statistics
brainlayer brain-export # Generate brain graph JSON
brainlayer export-obsidian # Export to Obsidian vault
brainlayer dashboard # Interactive TUI dashboard