Pyrefly is a fast, MIT-licensed type checker and language server for Python, written in Rust and distributed both as a command-line tool and as extensions for editors such as VS Code, Neovim and Zed, aimed at Python developers and teams who want type checking and IDE features from a single tool.
What it is
Pyrefly is a type checker and language server for Python, developed at Meta and released under the MIT licence. It lives in the Python tooling ecosystem and is written in Rust, which is where much of its performance comes from. The project's stated development status is stable, at release 1.0.0, and it is distributed in two forms: a command-line tool published to PyPI, and editor extensions including a VS Code Marketplace extension (meta.pyrefly), a listing on Open VSX, and a Zed extension, with documented Neovim support. On the language-server side it provides code navigation, autocomplete, hover information, inlay hints and semantic highlighting, and the project aims for consistent results between the CLI and whichever editor a developer uses.
The problem it solves is the split between checking Python types and getting useful feedback while editing. Pyrefly is positioned as an adoption-ready replacement for the type checkers Python teams commonly use today: it provides migration from Mypy or Pyright, and it ships built-in support for frameworks and tools including Pydantic, Django and pytest, so that model validation, field types, fixture navigation and autocomplete work without extra configuration.
Key capabilities
- Type checks over 1.85 million lines of code per second, and checks projects such as PyTorch 15x faster than Mypy and Pyright according to the project.
- IDE rechecks typically complete in under 10 milliseconds after a file is saved.
- A full-featured language server offering code navigation, autocomplete, hover information, inlay hints and semantic highlighting, exposed over the Language Server Protocol.
- Built-in framework support for Pydantic, Django and pytest, covering model validation, field types, fixture navigation and autocomplete.
- Adoption commands for migration:
pyrefly init to move from Mypy or Pyright, pyrefly suppress to silence existing errors, and pyrefly infer to generate type annotations.
- Editor distribution through the VS Code Marketplace extension (meta.pyrefly), Open VSX, and Zed, alongside Neovim instructions.
- A browser sandbox for trying Pyrefly without installing anything.
Who uses it and how
- Instagram's 20-million-line Python codebase at Meta uses Pyrefly as its default type checker.
- Large open source projects including PyTorch and JAX have adopted it.
- Teams migrating from Mypy or Pyright can begin with a single file and expand at their own pace, using
pyrefly init to set up configuration.
- Developers working across VS Code, Neovim, Zed or another LSP-capable editor can standardise on one checker and get consistent diagnostics in both the terminal and the editor.
- Maintainers upgrading across versions can use
pyrefly suppress to silence newly surfaced errors rather than fixing them all at once.
Getting started
Install the command-line tool with pip install pyrefly, or install the IDE extension for VS Code, Neovim, Zed or another supported editor. A browser sandbox is available at the project's website for trying it without installing anything.
How it compares
The similar tools the project names are Mypy and Pyright, and Pyrefly positions itself as the faster alternative: it claims to check PyTorch 15x faster than both, and unlike a plain command-line checker it bundles a full-featured language server so that CLI and editor results stay consistent. Its distinguishing practical feature against those tools is an explicit migration path, with pyrefly init for configuration, pyrefly suppress for existing errors and pyrefly infer for generating annotations.
When to use it — and when not to
There is no server-side infrastructure to operate: Pyrefly is a CLI tool and language-server binary, with no database, object storage or mail service mentioned in its documentation, so self-hosting means distributing a binary and a configuration file. The clearest limitation is the version policy: Pyrefly releases a new minor version monthly, does not follow strict semantic versioning, and states that any version may introduce new type errors and other breaking changes, which the pyrefly suppress command exists to blunt. Teams that need frozen diagnostics, strict semantic-versioning guarantees, or a long-stable release cadence should weigh that before adopting it as their default checker, particularly given the project's substantial open issue count.
project readme (upstream, from github) — read inline
Pyrefly: A fast type checker and language server for Python with powerful IDE features

Pyrefly is a type checker and language server for Python, which provides
lightning-fast type checking along with IDE features such as code navigation,
semantic highlighting, and code completion. It is available as a
command-line tool and an extension
for popular IDEs and editors such as
VSCode,
Neovim,
Zed, and
more.
See the Pyrefly website for full documentation and how to
add Pyrefly to your editor of choice.
Pyrefly's current development status is stable.
Key Features
- Fast. Pyrefly checks over 1.85 million lines of code per second, type checking projects like PyTorch 15x faster than Mypy and Pyright. In the IDE, rechecks typically complete in under 10 milliseconds after saving a file.
- Production-proven at scale. Pyrefly is the default type checker for Instagram's 20-million-line Python codebase at Meta, and has been adopted by large open source projects including PyTorch and JAX.
- Full-featured language server. Code navigation, autocomplete, hover information, inlay hints, semantic highlighting, and more, with consistent results across the CLI and your editor of choice.
- Understands real-world Python. Built-in support for frameworks and tools like Pydantic, Django, and pytest, with model validation, field types, fixture navigation, and autocomplete that work out of the box.
- Adoption-ready. Migrate from Mypy or Pyright with
pyrefly init, silence existing errors with pyrefly suppress, and generate type annotations with pyrefly infer. Start with one file and expand at your own pace.
Getting Started
Version Policy
Pyrefly releases new minor versions (1.x.0) monthly and patch versions in between
as-needed for critical fixes. Pyrefly does not follow strict semantic versioning:
minor versions contain more significant changes than patch versions, but any
version may introduce new type errors and other breaking changes. The
pyrefly suppress command can be used
to easily silence errors when upgrading to a new version.
Getting Involved
If you have questions or would like to report a bug, please
create an issue.
See our
contributing guide
and
architecture overview
for information on how to contribute to Pyrefly.
Join our Discord to chat about Pyrefly
and types. This is also where we hold biweekly office hours.