Magellan
Version: 2.4.3
A deterministic codebase mapping tool. Watches source files, extracts AST-level facts, and builds a searchable graph database of symbols and references.
Purpose
Magellan is the foundation of the Code Intelligence ecosystem. Built to power:
- LLMGrep — Semantic code search using natural language queries
- Mirage — AI-powered code navigation assistant
- Splice — Intelligent code refactoring engine
While usable standalone, Magellan is designed as infrastructure for downstream tools to answer questions like "find all callers of this function" with millisecond latency on multi-million line codebases.
Features
- Watch directories for file changes (Create/Modify/Delete)
- Extract AST-level facts: functions, classes, methods, enums, modules (7 languages)
- Track symbol references and build call graphs (caller → callee)
- Store AST nodes for hierarchical code structure analysis
- Compute metrics: fan-in, fan-out, LOC, complexity per file/symbol
- Run graph algorithms: reachability, dead code detection, cycles, paths, slicing
- Export to JSON, JSONL, CSV, SCIP, DOT formats
Quick Start
# Install
# Start watching a project
# Query symbols in a file
# Find a symbol
# Show call references
# Check status
Installation
Or build from source with specific backend:
# V3 backend (recommended for production - fastest, no SQLite dependency)
# SQLite backend (default - best compatibility)
Backends
| Feature | Description | File | Use Case |
|---|---|---|---|
native-v3 |
High-performance binary backend with KV store | .v3 |
Production (recommended) |
sqlite-backend |
Stable SQLite backend | .db |
Compatibility, debugging |
Both backends have full feature parity (v2.4.0):
- Graph operations, symbol indexing, call traversal
- AST nodes, code chunks, execution logging
- File/symbol metrics, graph algorithms
Supported Languages
| Language | Extensions |
|---|---|
| Rust | .rs |
| C / C++ | .c, .h, .cpp, .cc, .cxx, .hpp |
| Java | .java |
| JavaScript / TypeScript | .js, .mjs, .ts, .tsx |
| Python | .py |
Documentation
- MANUAL.md — Complete command reference, architecture, and examples
- CHANGELOG.md — Version history and release notes
- AGENTS.md — Development guidelines for contributors
What Magellan Does NOT Do
- No semantic analysis or type checking
- No LSP server or language features
- No async runtimes or background thread pools
- No config files
- No web APIs or network services
License
MIT