ty
$ ty Official Low RiskAstral's Rust-powered Python type checker and language server built for sub-second workspace diagnostics. ty check supports concise output formats, --no-progress, and strict exit codes for rapid agent edit-verify loops.
brew install ty Runs sub-second incremental Rust type checking locally; CLI execution beats any MCP wrapper.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Supports ty check --output-format concise (plus full, gitlab, github), --no-progress, --color never, and --exit-zero.
--output-format conciseand--no-progressproduce compact agent-ready lines
Purely read-only static type checker; never executes inspected Python modules.
- Strictly read-only static analysis
Prebuilt Rust binary available via Homebrew, PyPI, uvx, and Astral installers.
- Cross-platform native binary via
uvx tyorbrew install ty
Dramatically faster than mypy and pyright for rapid agent feedback, though rule coverage is still growing.
- Sub-second Rust type checking on medium-to-large Python repos
Official Astral project (astral-sh/ty, makers of uv and ruff) under MIT license, currently in active early-stage maturation.
- Maintained by Astral (
astral-sh/ty)
Clean official docs at docs.astral.sh/ty/ and structured --help.
- Official docs at docs.astral.sh/ty/
Security, Auth & Guardrails
Offline local Python type checker; no credentials stored or required.
MIT open-source Rust CLI; completely free.
# ty Agent Rules - Pass `--output-format concise --no-progress --color never` for clean single-line diagnostics. - Because `ty` is still maturing, cross-check edge-case typing failures against `pyright` or `mypy` if a repo pins them.
Agent-Ready Command Recipes
Safe Read-Only Queries
ty check --output-format concise --no-progress --color never .
Prints compact one-line-per-diagnostic errors without progress bars or ANSI color codes.
ty check src/module.py
Runs fast targeted type checking on modified files.
Strengths for Agents
- + Sub-second Rust type checking makes edit-check loops nearly instantaneous for agents.
- + Explicit
--output-format concise --no-progress --color neverflags avoid noisy terminal formatting.
Caveats & Pitfalls
- ! Newer than
mypyandpyright; diagnostic parity and plugin support (e.g. Django/Pydantic) are still evolving. - ! Lacks a generic
--output-format jsonflag compared topyright --outputjson.