Documentation menu

Doctor Command

The doctor command checks whether Graph-sitter can run in the current Python environment. It is useful for setup, CI, and agent workflows before parsing a large repository or running a codemod.

graph-sitter doctor

Usage

graph-sitter doctor [OPTIONS]

Options

  • --backend python|rust: Choose the backend readiness check. Defaults to python.
  • --language python|typescript: Choose the language for the optional Rust parse smoke. Defaults to python.
  • --json: Print machine-readable diagnostics.

Python Readiness

Python readiness checks package metadata, platform information, parser dependencies, and whether the optional Rust extension is importable. The Rust extension may be unavailable while Python-backed commands still work.

graph-sitter doctor --json

Rust Readiness

Rust readiness also creates a temporary tiny repository and runs a strict Rust parse smoke. This fails if the graph_sitter_py extension is unavailable or if strict Rust parsing cannot build an index.

graph-sitter doctor --backend rust --language python --json
graph-sitter doctor --backend rust --language typescript --json

Use strict Rust readiness before relying on --backend rust --fallback error in benchmarks, CI, or release validation.

With uvx

For published package workflows, use the same command through uvx:

uvx --python 3.13 graph-sitter doctor --json

For branch-built wheel validation, point uvx at the wheel artifact:

uvx --python 3.13 --from dist/<wheel>.whl graph-sitter doctor --backend rust --json

The Rust backend is still release-gated. Public setup docs should only claim Rust-backed uvx graph-sitter support for artifacts that have passed the wheel smoke tests.