Pyrefly is a fast Python type checker and language server written in Rust by Meta, serving as the default checker for Instagram's 20-million-line codebase.
- 1.4.0
- Published at
- 12d ago
- 7,117
- Stars
- 4,762
- Download
- Synced at
- 8d ago
Latest release
1.4.0Oct 15, 2026, 04:56 PMDownloads slow? Switch the source anytime above
README
Project Overview
Pyrefly is an open-source Python type checker and language server from Meta, written in Rust. It checks over 1.85 million lines of code per second, type checking projects like PyTorch 15x faster than Mypy and Pyright. It is the default type checker for Instagram's 20-million-line Python codebase and is adopted by large open-source projects including PyTorch and JAX. Beyond the CLI, it offers extensions for VS Code, Neovim, Zed, and more.
| Item | Value |
|---|---|
| Developer | Meta |
| Language | Rust |
| Status | Stable (1.0+) |
| License | MIT |
Fast type checking proven on industrial-scale codebases.
Key Features
- Extremely fast: over 1.85 million lines per second; rechecks after saving usually finish in under 10 milliseconds
- Full-featured language server: navigation, autocomplete, hover info, inlay hints, semantic highlighting
- Understands frameworks: built-in Pydantic, Django, and pytest support with model validation and fixture navigation out of the box
- Migration toolkit:
pyrefly initto move from Mypy/Pyright andpyrefly suppressto silence existing errors - Type inference:
pyrefly infergenerates type annotations automatically - Editor integrations: VS Code, Neovim, Zed, and more
- Consistent results: the CLI and your editor agree on findings
Target Audience
- Python developers
- Large codebase maintainers
- Teams migrating from Mypy or Pyright
- Projects using Pydantic or Django
- Heavy users who value instant IDE feedback
Quick Start
- Install the command-line tool
pip install pyrefly- Initialize project configuration
pyrefly init- Run type checking
pyrefly check- With many legacy errors, silence them via suppress and address them gradually
Core Advantages
- Proven at scale: production use on a 20-million-line codebase at Instagram
- Leading speed: over an order of magnitude faster than mainstream checkers
- Adoption friendly: init, suppress, and infer make gradual migration easy
- Real-world frameworks: built-in framework understanding reduces false positives
System Requirements
| Item | Requirement |
|---|---|
| OS | Linux, macOS, Windows |
| Runtime | Python (for pip install) |
| Editors | VS Code, Neovim, Zed, and more |
Notes
- Version policy: not strict semantic versioning; upgrades may introduce new type errors
- Suppressions: after upgrading, use
pyrefly suppressto handle newly reported errors in bulk - Release cadence: minor versions ship monthly, with patch releases for critical fixes
Release history
Sort