CLI Reference

All 14 commands to control your brain.

brainbase init

Interactive setup wizard. Detects installed AI providers, configures integrations, sets up your LLM for knowledge extraction, and creates the brain database.

bash
$ brainbase init

brainbase status

Shows brain health at a glance — initialization state, database status, watcher state, connected providers, and core statistics (nodes, edges, patterns).

bash
$ brainbase status

Search the knowledge graph using spreading activation. Finds nodes matching your query and triggers connected memories — the same way thinking about "coffee" activates "morning" and "productivity".

bash
$ brainbase search "typescript generics"

Options

-l, --limit <n>
Maximum number of results. Default: 20

brainbase list

Shows recent memory nodes with their importance level, type, content snippet, creation date, and confidence score.

bash
$ brainbase list
$ brainbase list --type preference --limit 10

Options

-t, --type <type>
Filter by node type (fact, preference, decision, task, project, skill, person, event)
-l, --limit <n>
Maximum number of results. Default: 20

brainbase hot

Shows the most activated nodes right now and generates a context briefing — the same narrative your AI receives. Useful for understanding what the brain is "thinking about".

bash
$ brainbase hot
$ brainbase hot --detail MAXIMUM --topic "auth system"

Options

-d, --detail <mode>
Context detail level: MAXIMUM | STANDARD | LIGHT | MINIMAL
-t, --topic <topic>
Focus activation on a specific topic

brainbase stats

Detailed brain statistics — total nodes, edges, active nodes, patterns, sessions. Includes type breakdown with bar charts, edge type distribution, latest session info, and critical period indicator (shows if your brain has fewer than 20 sessions).

bash
$ brainbase stats

brainbase add

Manually add knowledge to your brain. Useful for seeding important facts, preferences, or project context. Automatically links to existing related nodes.

bash
$ brainbase add "I prefer functional components over class components"
$ brainbase add "Project uses PostgreSQL" --type fact --importance 0.9

Options

-t, --type <type>
fact | preference | decision | task | project | skill | person | event. Default: fact
-i, --importance <n>
Importance weight (0-1). Default: 0.7
-s, --source <src>
Source label. Default: manual
-c, --confidence <n>
Confidence score (0-1). Default: 1.0

brainbase forget

Delete specific memories from the knowledge graph. Searches for nodes matching the query and removes them permanently. GDPR-compliant — your right to be forgotten.

bash
$ brainbase forget "old project name"

brainbase watcher

Control the background daemon that processes memories, runs consolidation cycles, and keeps the brain alive. Runs on HTTP port 7899.

bash
$ brainbase watcher start   # Start the daemon
$ brainbase watcher stop    # Stop the daemon
$ brainbase watcher status  # Check status + LLM connection

brainbase consolidate

Trigger a manual consolidation cycle. Normally runs automatically every 6 hours. Prunes weak edges, promotes important nodes, merges duplicates, finds creative connections (REM-style), detects knowledge gaps, and distills clusters into schemas.

bash
$ brainbase consolidate
Edges pruned:         12
Nodes promoted:        3
Nodes merged:          2
Patterns created:      1
Dream edges:           4
Duration:          2.3s

brainbase verify

Run a 6-step brain integrity check. Validates config, database (15 tables), core nodes, hooks, signal strength, and spreading activation. Useful for debugging or after updates.

bash
$ brainbase verify
[1/6] Config .............. OK
[2/6] Database (15 tables)  OK
[3/6] Core Nodes .......... OK
[4/6] Hooks (4 events) .... OK
[5/6] Signal Strength ..... OK
[6/6] Spreading Activation  OK

brainbase snapshot

View the brain's growth over time. Shows a timeline of snapshots with node count, edge count, patterns, and top topics at each point.

bash
$ brainbase snapshot
$ brainbase snapshot --count 20

Options

-n, --count <number>
Number of snapshots to show. Default: 10

brainbase dashboard

Launch the interactive 3D brain visualization in your browser. Shows the knowledge graph as a force-directed network with real-time activation levels, brain health metrics, and session history.

bash
$ brainbase dashboard
$ brainbase dashboard --port 8080

Options

-p, --port <port>
HTTP port for the dashboard server. Default: 7877

Exposes 7 API endpoints: /api/graph, /api/expertise, /api/sessions, /api/patterns, /api/snapshots, /api/activity, /api/health

brainbase embed

Manage vector embeddings for hybrid search (spreading activation + semantic similarity). Uses text-embedding-3-small.

bash
$ brainbase embed status     # Show embedding coverage %
$ brainbase embed backfill   # Create embeddings for unembedded nodes
$ brainbase embed backfill --batch 50

Subcommands

status
Shows what percentage of nodes have embeddings
backfill
Generate embeddings for all nodes that don't have them yet

Backfill Options

-b, --batch <size>
Batch size for embedding generation