Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

The Problem

You have side projects. Maybe 3, maybe 10. You work on them in bursts — a flurry of commits, then months of silence.

When you return, the question is always the same:

“Wait, what was I working on? Where did I leave off?”

You scroll through git history. You grep for “TODO”. You search your notes. By the time you remember, you’ve already lost 20 minutes.

The Solution

Cerebro watches your development activity and builds a personal mission control dashboard. It aggregates:

  1. OpenCode sessions — Your AI pair-programming history
  2. Git activity — Commits, branches, file changes
  3. TODOs — TODO, FIXME, HACK, XXX comments in your code
  4. Manual notes — Your status, next actions, goals

When you return to a dormant project, your dashboard answers the question in seconds.

How It Works

Cerebro uses a two-repo architecture:

flowchart LR
    subgraph "Sources"
        G[Git repos]
        O[OpenCode sessions.db]
    end

    subgraph "cerebro (CLI)"
        C[cerebro build]
    end

    subgraph "cortex (your data directory)"
        CT[content/ generated md]
        NB[content/notes/ manual]
        BK[book/ rendered HTML]
    end

    subgraph "cerebro-mcp"
        MS[MCP server]
    end

    subgraph "cerebro-tui"
        TUI[Terminal UI]
    end

    subgraph "Consumers"
        MDB[mdbook]
        OC[OpenCode]
        TERM[Terminal user]
    end

    G -->|scrape| C
    O -->|scrape| C
    C -->|writes| CT
    NB -. manual .-> CT
    CT -->|mdbook| BK
    NB -->|mdbook| BK
    MS -->|reads| CT
    MS -->|reads| NB
    OC <-->|JSON-RPC| MS
    TUI -->|reads| CT
    TUI -->|reads| NB
    TERM <-->|interactive| TUI

The Two Repos

RepoPurpose
~/Projects/cerebroSource code — CLI, MCP, TUI, shared types
~/Projects/<name>Your cortex — config, generated content, manual notes, rendered HTML

The Four Binaries

BinaryPurposeUsed by
cerebroCLI: scrape repos, generate markdownYou, cron
cerebro-mcpMCP server: answer questions about projectsOpenCode
cerebro-tuiTerminal UI: browse projects interactivelyYou

Content Boundaries

Your cortex’s content/ has a clear split:

PathGenerated byEdit?
content/index.mdcerebroNo
content/projects/*.mdcerebroNo
content/journal/cerebroNo
content/today.mdcerebroNo
content/this-week.mdcerebroNo
content/intent/HumanYes
content/notes/HumanYes
content/SUMMARY.mdHumanYes

The boundary is enforced by an AGENTS.md file in your cortex — AI agents are instructed not to edit manual content.

Why It Works

Cerebro succeeds when it reduces context-switching friction. You’ll notice it when:

  • You return to a project you haven’t touched in weeks
  • You have too many projects to track mentally
  • You use AI assistants and want to remember what you worked on

Key Concepts

TermMeaning
CollectorA source of data (git, opencode, todos, notes)
GeneratorCreates output files from collected data
ProjectA repo + notes + activity you’re tracking
DashboardThe generated markdown output
CortexYour data directory — config, content, rendered book
TUITerminal UI for interactive browsing

Architecture

Cerebro is a Rust workspace with four crates:

  • cerebro — CLI tool: coordinates collectors and generators, manages cache
  • cerebro-core — Shared types, traits, collector implementations, and query operations
  • cerebro-mcp — MCP server for OpenCode integration
  • cerebro-tui — Ratatui terminal UI for browsing projects interactively

Next Steps

  1. Quick Start — Get running in 5 minutes
  2. Dashboard Guide — Understand the output
  3. Configuration — Customize for your projects