tilth
Smart code reading for humans and AI agents. Definitions, callers, dependencies and function-level diffs from tree-sitter. One binary, no index. MCP server + CL
What is tilth?
Smart code reading for humans and AI agents. Definitions, callers, dependencies and function-level diffs from tree-sitter. One binary, no index. MCP server + CLI. Install: cargo install tilth or npx tilth
Overview of tilth
What it is
tilth is a tool that parses code with tree-sitter to find definitions, callers, dependencies, and function-level diffs. It works as a command-line tool and an MCP server. It is a single binary that requires no index and no setup.
Key features
- Shows definitions, callers, and callees of symbols using the syntax tree, not text search.
- Provides file outlines with line ranges for large files, and
--sectionto retrieve specific parts. - Structural diff that reports changes per function (added, removed, signature/body change).
- Multi-symbol search and an expanded view (
--expand) that includes source code and callees. - Session memory in MCP mode: previously expanded definitions are shown as
[shown earlier]to avoid duplication. - File dependency view: shows what a file uses and what uses it.
Use cases
- Understanding unfamiliar codebases: quickly find where a symbol is defined and how it is used.
- Code review and refactoring: check callers before renaming a function, or see file dependencies before removing an export.
- AI agent integration: provide structured code context (definitions, callees, callers) to reduce the number of read calls.
- Reviewing changes: use structural diff to see what functions were added, removed, or modified between commits.
Getting started
bash # Install via Cargo cargo install tilth # Or via npx npx tilth # Or download a prebuilt binary from the releases page. # Install as an MCP server for various hosts: tilth install claude-code tilth install cursor tilth install windsurf
License and pricing
tilth is licensed under MIT. It is open source.
Based on the project's public README and repository metadata.