ty: Astral’s Python type checker that catches the mistake before it runs
ty is a Python type checker written in Rust by Astral, the team behind uv and ruff. It reads your code and finds type errors before you run it: in our test it caught both deliberate mistakes in a single file, showed the function signature to match and exited with code 1, while a clean file answered All checks passed! with code 0. It is one executable at 32.5 MB, it runs without a graphics card, it needs no account, and it is not an MCP server. The price is its age: the version is 0.0.95, short of 1.0, with 994 open issues.

What it does
Anyone who has written Python knows the pattern: the mistake shows up when the program runs, not when you type the line. ty reverses that order and tells you before you hit run.
The keyword is type checker. In Python you are not obliged to declare what sort of value each variable holds. When you do, you write something like def add(a: int, b: int) -> int. Those annotations do not change the behaviour of the program: they are a contract for tools like ty, which look for the place your code breaks them.
ty is built by Astral, the team behind uv and ruff, and it is written in Rust (repository). It is a command-line tool, not an MCP server: nothing gets declared in a config file, it loads no tool schema into any session. You hand it a command, you get text and an exit code.
I set a trap: one file with a function of two parameters, a call to it with three arguments, and a call to a name defined nowhere. ty found both. It did not print “something went wrong”; it printed the rule that was broken, the line, the column, a marker under the third argument, and a line reading “Function signature here” that points at the right answer. Exit code 1.
A type checker gives you two things: the finding and the route to the fix. Astral says it designed its diagnostic system with both humans and agents in mind (announcement).
What the registries say. On PyPI the latest version is 0.0.95, published on 29 October 2026, 19:21 UTC, with 136 releases in total (package). The requires-python field declares >=3.8. The license field is empty, and the licence comes from the classifier: MIT. Downloads over the last month are 41,012,419 (statistics). On GitHub the repository holds 19,994 stars, 345 forks and 994 open issues, under the MIT licence; it was created on 2 May 2025 and its last push is today (repository).
And the caveat up front, not at the end. The version is 0.0.95 — short of 1.0 — and the documentation says ty has no stable API and that breaking changes, including changes to diagnostics, may occur between any two versions (documentation). Those 994 open issues are the same number said another way.
Who it is for
For anyone who writes Python and wants to learn about the mistake earlier.
The beginner starts with nothing: no account, no key, no configuration. There is also a browser playground for anyone who wants to see what it does before installing anything (playground).
The professional gains two things that count in daily work: speed, so the check fits inside every file save, and output formats machines understand — one line per diagnostic, a format for GitHub Actions annotations, a SARIF report. There is also an experimental link with uv: the uv check command prepares the project environment and then checks, with the ty version locked in the lockfile (announcement).
Who it is not for. If you want a stability guarantee in production, not yet. If your code leans heavily on libraries such as Pydantic or Django, full coverage does not exist yet; the vendor places that on the road to the stable release. And the fewer type annotations you have written, the less there is to check: a tool that sees no contract finds no violation.
Install
The official route goes through uv, the package manager from the same team. It works from any folder:
uv tool install ty@latestAfter that, the command is plain, with no prefix:
ty checkWithout installing anything
If you want to see what it does before it touches your disk, uv downloads it into a temporary environment and runs it. This is the first route the documentation suggests (instructions) and the one we took in the test:
uvx ty checkInside the project, for the whole team
If you want everyone checking with the same version, ty goes in as a development dependency and gets locked alongside the rest:
uv add --dev tyThe check then runs through uv itself, so the environment is set up correctly:
uv run ty checkThe standalone installer
ty ships its own install script for anyone who wants neither uv nor Python. On a system with an sh shell:
curl -LsSf https://astral.sh/ty/install.sh | shOn Windows, from PowerShell:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/ty/install.ps1 | iex"The vendor says the standalone installer needs no Python at all. We did not run it, so it stays a claim of theirs.
Other routes
The documentation also lists pipx, pip, mise and a Docker image. One command for pipx:
pipx install tyUsing it per LLM
Here ty is simple, and that is its advantage: nothing is declared in a config file, no restart is needed, it takes no room in context. The assistant hands a command to the shell and reads two things: what was printed, and the exit code it came back with.
The exit code is the contract. Clean code means 0, a finding means 1. So the rule you give every assistant is one: run ty before you declare the work done, and judge by the exit code, not by impressions. The first command, identical everywhere:
uvx ty checkAnd when you want output a machine can read, one line per finding:
uvx ty check --output-format conciseFor error annotations inside GitHub Actions:
uvx ty check --output-format githubClaude Code
In the project’s rules file you write the convention: Python is checked with ty, the check runs before any claim of completion, and a finding gets fixed rather than bypassed. The command the assistant hands to the shell:
uvx ty check .The . means the current folder, which is why you state it: run ty from somewhere else and it checks other files.
Codex CLI
The same shape in an AGENTS.md file, with one difference that helps: ask it for the short output format, because the verbose diagnostic burns context for no reason when you are fixing inside a loop. The command is the same one, in concise form.
Cursor
One instruction in the project rules is enough. Here the editor side is worth having too: ty has a language server that does go-to-definition, rename, completion and auto-import, and the vendor recommends its extension explicitly for people on VS Code, Cursor or a similar editor (announcement). If you would rather not add one, the shell check stays the same:
ty check --output-format conciseIn an automation pipeline
This is where the output formats pay off. The GitHub Actions format files each finding as an annotation on its own line, and the command stops with exit code 1, which is what a pipeline needs in order to go red. There is also a flag that turns warnings into failures.
That is my recommendation, not the vendor’s instruction: in a pipeline, pin the version — through the development dependency or the lockfile — because the program moves fast.
Where it wins, where it loses
It wins on time: 0.13 seconds to check one file, warm run. When a check costs tenths of a second, it fits everywhere.
It wins on the diagnostic. It does not just say what is wrong; it shows the signature that should have matched, with its own marker, file name and line number. That is the difference between “it does not work” and “here is the right answer”.
It wins on talking to agents: a clean exit code, three output formats, zero context, zero tool schema. And on the basics: MIT licence, zero money, zero account, runs without a graphics card.
Now where it loses. First, maturity: version 0.0.95, 994 open issues, an explicit statement that changes can break between two versions. Second, coverage: popular third-party libraries do not yet have full support. Third, the nature of the tool: it checks types, not logic — code that is type-correct and logically wrong passes without a murmur. Fourth, the speed comparisons you will see everywhere, ten to a hundred times faster than mypy and Pyright: a vendor claim, from the vendor’s own benchmarks. We did not run them side by side.
Testing
I ran the tool and measured. The numbers in this section came out of the runs, not out of documentation.
The version:
uvx ty --versionty 0.0.95 (48c5ea1ba 2026-10-29).
Then the trap, a file with two deliberate errors. ty caught both and exited with code 1. The first diagnostic read error[too-many-positional-arguments]: Too many positional arguments to function add: expected 2, got 3, on line 4, with a marker under the third argument. The second read error[unresolved-reference]: Name addd used when not defined, on line 5. Both were followed by the hint “Function signature here”, with the line and marker of the signature.
The whole output was 18 lines and 443 bytes. The short form of the same output, the one you hand an agent, came out at 213 bytes: two lines, one finding each, carrying the file name, the position, the rule and the message.
On a clean file:
uvx ty check clean.pyAll checks passed!, exit code 0.
Timing: 0.13 seconds to check one file, warm run. The following runs settled around fifteen hundredths of a second, so the figure is not stable to the second decimal.
372 bytes for the general help, 7,358 bytes for the help of ty check.
What I did not measure: memory use — a figure from estimation would be invention. I did not run ty over a large project, I did not compare it with mypy or Pyright, I did not test the language server inside an editor, I did not follow the experimental uv integration, and I did not examine whether the tool sends telemetry anywhere. Any number not stated here is not ours.
What it costs
What I measured.
Disk: 32.5 MB with an install through uv, which is 33,269 KB. The Windows package that gets downloaded is 13.4 MB. It is one executable, not a bundle of libraries, and it adds no dependencies to your application.
Time: 0.13 seconds to check one file, warm run.
Output: 443 bytes and 18 lines for two diagnostics; 213 bytes for the short form of the same two. Help: 372 bytes for the general one, 7,358 bytes for ty check.
The assistant’s context: zero schema tokens. ty is not a server, it is declared nowhere, it loads no tool definitions into any session. The only thing that enters context is the output you asked for.
Money: zero. MIT licence, no account, no key, no subscription. It runs without a graphics card.
Requirements: Python >=3.8 to install from PyPI, per the requires-python field.
What the vendor says, without my verification.
That it is ten to a hundred times faster than mypy and Pyright, and that after editing a file in a large project it recomputes diagnostics in 4.7 milliseconds, against 386 for Pyright and 2.38 seconds for Pyrefly. That the language server supports go-to-definition, rename, completion, auto-import and inlay hints. That the stable release arrives within the next year, covering stability, the long tail of Python’s typing specification, and support for Pydantic and Django. And that the experimental uv integration needs uv 0.12.3 and ty 0.0.76 or later.
I did not run the benchmarks, I did not examine telemetry, and the download figure — 41,012,419 over the last month, 11,991,082 over the week, 1,868,755 over the day — does not separate automated tests from real users, so we hold it as a ceiling.
Verdict
Score: 8.8/10.
The tool does what it promises, and it did a little more: it caught two mistakes in one file, on the second it also showed the signature that should have matched, and it finished in thirteen hundredths of a second. No account, no graphics card, no room taken in the assistant’s context, no money.
What it lacks is maturity, and it does not hide that: 0.0.95, 994 open issues, an explicit statement that the API is not stable.
In practice: try it today, with no commitment — one command through uv and you see a result. Put it on every Python job, and put your assistant to running it before it declares completion, judging by the exit code. Pin the version wherever the result matters, and leave settled production systems on the tools you know, until the stable release lands.
Sources:
https://github.com/astral-sh/ty