defendend/Claude-ast-index-search

Cli allows AST search, ~40-50% economy tokens. Claude/Codex/Cursor searches (suitable for any AI agent that can use Bash)

What it solves

It solves the problem of navigating large, multi-language codebases where simple text-based searches (like grep) are too slow or imprecise. It allows developers and AI agents to find exact structural elements—such as classes, functions, and dependencies—without having to read through entire files or guess where a symbol is defined.

How it works

The tool builds a local SQLite index of a project's Abstract Syntax Tree (AST). By parsing the code's structure, it maps out symbols, references, imports, modules, and inheritance patterns. Users can then query this index via a CLI to jump directly to definitions, find all usages of a symbol, or map out dependency paths between modules.

Who it’s for

  • Developers working in massive repositories (especially monorepos) who need fast, structural code navigation.
  • AI Coding Agents (like Claude Code, Cursor, or Gemini) that need compact, parseable structural context instead of raw file dumps to save tokens and improve accuracy.

Highlights

  • Broad Language Support: Works with a vast array of languages including Kotlin, Java, Swift, Rust, TypeScript, Python, Go, C#, and many others.
  • Agent-Optimized: Reduces agent token usage by 40-50% by providing structural slices of code rather than whole files.
  • High Performance: Offers significant speedups over grep for finding imports, dependents, and classes (up to 260x faster in some benchmarks).
  • Deep Integration: Provides plugins and skills for Claude Code, Cursor, Codex, and Gemini CLI.
  • Advanced Analysis: Includes specialized commands for module dependency routing, XML/resource usage analysis, and iOS-specific structural queries.

Related

  • Project
  • Project
  • Project
  • Project
  • Project