Backed by tree-sitter · built for coding agents

A fast, in-memory codebase index — beyond the AST.

Graph-sitter parses whole repositories into an in-memory index of imports, usages, and references — backed by tree-sitter and optimized for coding agents that need to analyze and safely rewrite code.

uvx graph-sitter
$ uvx graph-sitter parse .$ uvx graph-sitter transform delete_dead_code.py:run . --check$ uvx graph-sitter transform delete_dead_code.py:run . --write
delete_dead_code.pyindex ready
from graph_sitter import Codebase # Parse the repo into a fast, in-memory indexcodebase = Codebase("./") # Delete functions with no usages anywherefor function in codebase.functions:if not function.usages:function.remove() codebase.commit()

Fast, in-memory index

Parse a whole repository into an in-memory index that captures more than the AST — imports, exports, usages, references, and call relationships.

Backed by tree-sitter

Built on tree-sitter parsing for Python, TypeScript, JavaScript, and React, with the heaviest indexes moving into Rust for scale.

Optimized for coding agents

A clean, scriptable API designed for AI coding agents to explore code and make safe, graph-aware edits without breaking imports.

One command surface: uvx graph-sitter.

Run it with no install. Start with fast parse summaries, then run codemods in explicit check and write modes — with the heaviest indexes moving into Rust for scale.

Open CLI reference
parse · transform
uvx graph-sitter parse . \--language auto --backend rust --format summary # run a codemod in check mode, then writeuvx graph-sitter transform delete_dead_code.py:run . --checkuvx graph-sitter transform delete_dead_code.py:run . --write