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

Development Setup

Prerequisites

  • Rust 1.85 or later
  • Cargo (comes with Rust)

Building

# Development build
cargo build

# Release build
cargo build --release

Testing

cargo test

Quality Checks

# Format check
cargo fmt --check

# Lint check
cargo clippy -- -D warnings

# All quality checks
cargo check

Workspace Structure

cerebro/
├── crates/
│   ├── cerebro/        # CLI tool
│   ├── cerebro-core/   # Shared types
│   ├── cerebro-mcp/    # MCP server
│   └── cerebro-tui/    # Terminal UI
├── docs/              # Documentation
└── book.toml         # mdbook config

Running Locally

# Build and run
cargo run -- build

# With arguments
cargo run -- build --project my-project

MCP Server

The MCP server lives in crates/cerebro-mcp/ and provides tools for OpenCode integration.

Building

cargo build --release -p cerebro-mcp

The binary is output to target/release/cerebro-mcp.

Running

# Via cargo
cargo run -p cerebro-mcp

# Or directly
./target/release/cerebro-mcp

Environment Variables

VariableDefaultDescription
CORTEX_PATH(required)Path to your cortex (contains config.toml)
RUST_LOGinfoLog level (debug, info, warn, error)