llmgrep 3.1.3

Smart grep over Magellan code maps with schema-aligned JSON output
Documentation

llmgrep

Crates.io Documentation

Version: 3.1.0

Pattern-based 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
  • Geometric backend — Native .geo file support with chunk retrieval
  • Path normalization — Consistent path handling across platforms
  • Explicit ambiguity handling — Structured results for disambiguation

Quick Start

# Install
cargo install llmgrep

# Create Geometric database (recommended)
magellan watch --root ./src --db code.geo

# Search symbols
llmgrep --db code.geo search --query "parse"

# Find references
llmgrep --db code.geo search --query "MyType" --mode references

Installation

cargo install llmgrep

Backends

Backend File Features Status
Geometric .geo Full search + chunk retrieval + path normalization Default
SQLite .db Full search Legacy (always available)
Native-V3 .v3 O(1) KV operations + autocomplete Reserved (disabled)

Geometric (.geo) features:

  • Path normalization before queries
  • Explicit ambiguity error handling
  • Code chunk retrieval (no file I/O)
  • No SQLite dependencies

Backend detection is automatic — no flags needed. Detects by file extension (.geo) and header bytes.

Requirements

Documentation

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.