llmgrep
Version: 3.0.7
Semantic code search for Magellan databases. Fast, deterministic symbol search with LLM-optimized JSON output.
Positioning: Read-only query tool for codebases indexed by Magellan. Use to find symbols, references, and call relationships. Emits structured JSON for AI-assisted code understanding.
Purpose
llmgrep queries Magellan databases. Built for:
- AI Assistants — Structured JSON output designed for LLM consumption
- Developers — Fast symbol search without IDE overhead
- Tooling — Scriptable code analysis with precise byte spans
Features
- Symbol search — Find functions, structs, traits by name or regex
- Reference lookup — Find all callers/callees of a function
- Call graph traversal — Navigate caller → callee relationships
- AST filtering — Filter by node kind, nesting depth, complexity
- Magellan algorithms — Condense, paths, cycles, dead-code, slicing
- FQN autocomplete — Prefix-based symbol completion (Native-V3)
- Exact lookup — O(1) symbol resolution by fully-qualified name (Native-V3)
Quick Start
# Install
# Requires Magellan database (create first)
# Search symbols
# Find references
# FQN autocomplete (Native-V3)
# Exact symbol lookup (Native-V3)
# Label-based search (Native-V3)
Installation
Or build from source with Native-V3 backend:
# Native-V3 backend (recommended - fastest, O(1) KV operations)
Backends
| Feature | Description | File | Best For |
|---|---|---|---|
native-v3 |
High-performance binary backend with KV store | .v3 |
Production (recommended) |
| (default) | SQLite backend via rusqlite | .db |
Compatibility |
Native-V3 exclusive features:
complete— FQN prefix autocompletelookup— O(1) exact symbol lookupsearch --mode label— Purpose-based search (tests, entry points)
Both backends have full feature parity for standard search operations.
Requirements
- Magellan 2.4.3+ — Required for code indexing
- sqlitegraph 2.0.3+ — Included automatically
Documentation
- MANUAL.md — Complete command reference and examples
- CHANGELOG.md — Version history
What llmgrep Does NOT Do
- ❌ Index code (use Magellan)
- ❌ Type checking or semantic analysis
- ❌ Background file watching
- ❌ Code editing (use splice)
- ❌ CFG analysis (use Mirage)
License
GPL-3.0-only. See LICENSE.