How bknorg/codebase-recall works
codebase-recall is a developer CLI for producing LLM-ready code context and analyzing code relationships. Its main graph workflow parses project files, caches extracted entities, resolves relations, then answers queries or renders exports. The graph also captures the documented digest, impact, path, explain, report, search, and MCP capabilities. Some command internals were not sampled, so links for those branches follow documented responsibilities rather than inferred call chains.
Main entry points: commands/mod.rs Command handlers · query.rs Graph queries · cache/mod.rs Graph cache · sync.rs Incremental sync
Components 25
CLI and integrations
- CLI entry
src/main.rs - Command handlers
src/commands/mod.rs - MCP interface
src/commands/mcp/mod.rs - Agent setup
src/commands/setup.rs
Project indexing
- Sync service
src/service.rs - Incremental sync
src/commands/sync.rs - Language parsers
src/analysis/mod.rs - Precise resolution
src/precise/mod.rs - Graph cache
src/cache/mod.rs
Relation graph
- Graph resolution
src/graph/resolve/mod.rs - Relation graph
src/graph/mod.rs - Graph queries
src/graph/query.rs - Graph renderers
src/graph/render/mod.rs
Codebase analysis
- Architecture digest
src/commands/digest/mod.rs - Impact analysis
src/commands/impact/mod.rs - Relation path
src/commands/path.rs - Symbol explain
src/commands/explain/mod.rs - Architecture report
src/commands/report.rs - Code search
src/commands/search.rs
Context and visualization
- Context dump
src/commands/dump.rs - Dump formatting
src/dump/mod.rs - Browser server
src/server/mod.rs
Other components
- Developer
- AI agent
- Browser viewer
Connections 38
- Developer → CLI entry: runs commands
- CLI entry → Command handlers: dispatches
- Command handlers → Sync service: requests sync
- Sync service → Incremental sync: invokes sync
- Incremental sync → Language parsers: parses files
- Incremental sync → Graph cache: updates cache
- Incremental sync → Precise resolution: resolves references
- Precise resolution → Graph cache: updates relations
- Sync service → Graph cache: uses cache
- Command handlers → Graph resolution: builds relations
- Graph resolution → Graph cache: reads entities
- Graph resolution → Relation graph: produces graph
- Command handlers → Graph queries: queries graph
- Graph queries → Relation graph: reads graph
- Command handlers → Graph renderers: exports graph
- Graph renderers → Relation graph: renders graph
- Command handlers → Context dump: generates context
- Context dump → Graph queries: selects neighborhood
- Context dump → Dump formatting: formats files
- Command handlers → Architecture digest: generates digest
- Architecture digest → Graph queries: queries structure
- Command handlers → Impact analysis: analyzes changes
- Impact analysis → Graph queries: traverses relations
- Command handlers → Relation path: finds connection
- Relation path → Graph queries: traverses relations
- Command handlers → Symbol explain: explains symbol
- Symbol explain → Graph queries: queries symbol
- Command handlers → Architecture report: builds report
- Architecture report → Graph queries: analyzes graph
- Command handlers → Code search: searches code
- Code search → Graph cache: searches symbols
- Command handlers → Browser server: starts viewer
- Browser server → Browser viewer: serves graph
- Browser viewer → Browser server: requests actions
- Browser server → Context dump: runs dump
- AI agent → MCP interface: sends tool requests
- MCP interface → Command handlers: dispatches tools
- Developer → Agent setup: configures integration