graph_sitter.cli
The Graph-sitter CLI helps you:
- Parse a local repository into graph summary data
- Inspect files and trace call relationships from the command line
- Diagnose parse time, memory use, and graph size for a local repository
- Initialize Graph-sitter in your repository
- Create and run codemods
- Run one-shot transformations and focused renames
For installation instructions, see our Getting Started guide.
Getting Started
- Parse a repository without project initialization:
graph-sitter parse . --format jsonRun the same command from a published package with uvx:
uvx --python 3.13 graph-sitter parse . --format jsonSee uvx workflows for branch-built wheel validation and release gate details.
- Diagnose a repository with timing and memory stats:
uvx --python 3.13 graph-sitter diagnose .- Initialize Graph-sitter in your repository:
graph-sitter init- Create your first codemod:
graph-sitter create my-codemod .Available Commands
init
Initialize Graph-sitter in your repository.
doctorCheck package, parser dependency, and Rust backend readiness.
uvxRun Graph-sitter from a package or wheel in a clean temporary environment.
parseParse a repository and print graph summary counts.
graphInspect files, trace usages, trace callees, and rename symbols.
diagnoseReport parse time, memory use, and graph size for a repository.
createScaffold new codemods.
runExecute registered codemods with check and write modes.
transformRun one-shot codemods by Python import path or file path.