Guide · Open source
How to use Flow: install, run the typechecker and fix errors
Updated · written with AI from the project's own documentation and checked against our catalogue data
Flow is a static typechecker for JavaScript, developed by Meta. It reads JavaScript that has type annotations and reports mismatches, such as passing the wrong kind of value to a function, without running your code. This guide explains what Flow is good for, how to install it, how to build it from source, and what to check before you adopt it.
Quick start
- 1Check your platform. Confirm you are on macOS arm64, Linux x86_64 or arm64, or Windows x86_64 before you start.
- 2Get a binary. Download a prebuilt binary from the project's releases page, or build from source if you need to.
- 3Read the install docs. Follow the installation instructions on flow.org for your platform.
- 4Read the usage docs. Use the usage docs on flow.org to learn how to run Flow on your project.
- 5Build from source (optional). Install rustup and the nightly toolchain, then run cargo +nightly build --release --bin flow_cli inside rust_port.
- 6Try it on a small codebase. Add type annotations to a small part of your code and see what Flow reports before rolling it out wider.
What Flow does and who it is for
Flow checks your JavaScript against the type annotations you add to it. It reports mismatches without executing the code, so you can catch some bugs before they run. Developers use it to find problems earlier and to make large JavaScript codebases easier to understand and change.
Flow suits JavaScript developers who want type checking without rewriting their code in another language, and teams maintaining large codebases that benefit from typed interfaces. It is less suited to beginners with no JavaScript experience, because the tool assumes familiarity with type annotations.
Check the platform requirements
Flow works on macOS (arm64), Linux (x86_64 and arm64), and Windows (x86_64, Windows 10 recommended). The project provides binary distributions for each of these platforms on its releases page. You can also build it from source on any of them.
If your platform is not in this list, the README does not say Flow is supported there, so check the project before you invest time in it.
Install Flow with a prebuilt binary
The simplest route is a prebuilt binary from the project's releases page. The README points to the installation instructions on flow.org for the installation and usage steps, rather than listing install commands itself, so follow those for your platform.
Once installed, the README says to follow the usage docs on flow.org to start running Flow on your code.
- Binary distributions: github.com/meta/flow/releases
- Installation and usage docs: flow.org/en/docs/getting-started
Build Flow from source with Rust
Building from source is only needed if you want to work on Flow itself or lack a binary for your platform. Flow is written in Rust, and GitHub CI builds it from the rust_port workspace with nightly Rust. You need Rust installed via rustup and the nightly toolchain.
Build the workspace, then build an optimized flow binary. The README also lists a test command, cargo +nightly test, which you can run after building.
- Install rustup from rustup.rs, then install the nightly toolchain.
- Build the workspace from the rust_port directory.
- Build the optimized binary with the flow_cli target.
rustup toolchain install nightly
cd rust_port
cargo +nightly build
cargo +nightly build --release --bin flow_cliUse the flow.js build (optional)
The README describes an optional flow.js build. It needs Emscripten, Node, Yarn, and a Rust nightly toolchain with the wasm32-unknown-emscripten target and rust-src component. GitHub CI uses Emscripten 3.1.44. The build produces bin/flow.js.
The README also describes a faster, larger development variant built with a dev profile. Skip this section unless you specifically need flow.js.
rustup toolchain install nightly-2026-04-14 --target wasm32-unknown-emscripten --component rust-src
RUSTUP_TOOLCHAIN=nightly-2026-04-14 make js FLOW_JS_IMPL=rust-wasmUse Flow's parser from JavaScript
Flow's parser is published to npm as the flow-parser module. Most users of Flow will not need it directly. It is useful for JavaScript packages that parse Flow-typed code and need the syntax tree with type annotations attached.
Decide whether Flow or TypeScript fits your project
If your project has already standardized on TypeScript and its tooling, switching costs time, and Flow has a different ecosystem. The README does not compare Flow with TypeScript, Sorbet, or JSDoc with TypeScript checking, so compare them yourself on a small part of your codebase before deciding.
Get help from the community through the Discord server, the flowtype tag on Stack Overflow, or the project website at flow.org.
What people use it for
- Catching wrong argument types in a JavaScript codebase without rewriting it in another language.
- Making a large JavaScript project easier to change by adding typed interfaces.
- Running Flow in an editor or in CI, as the README describes running the flow binary.
- Parsing Flow-typed JavaScript in a tool by using the flow-parser npm module.
Frequently asked questions
Is Flow free to use?
Yes. Flow is MIT-licensed, according to the README. The website and documentation are licensed under Creative Commons Attribution 4.0.
What platforms does Flow support?
The README lists macOS (arm64), Linux (x86_64 and arm64), and Windows (x86_64, Windows 10 recommended). Binary distributions are provided for each of these.
Do I need Rust to use Flow?
No. Rust with rustup and the nightly toolchain are only needed to build Flow from source. The prebuilt binaries do not require them.
How is Flow different from TypeScript?
Flow is a static typechecker for JavaScript with its own ecosystem. The README does not compare it with TypeScript, so check both against your project's needs.
Can I use Flow if I am new to JavaScript?
The README says the tool assumes familiarity with type annotations and gives little introductory material. Learn JavaScript basics first, then add Flow.
Where do I get help if something breaks?
The README links to the Flow Discord, the flowtype tag on Stack Overflow, and the project website at flow.org. It also mentions an IRC channel on Freenode.
New agent skills, repos and AI tools — every week
The best new skills and open-source projects, the fastest-growing repos, and one free prompt. Five minutes to read. Unsubscribe anytime.
Our verdict
Flow is a good fit for JavaScript developers and teams who want static type checking without moving to another language, and who are on one of the listed platforms. If your project already uses TypeScript and its tooling, or you are new to JavaScript, pick something else or learn the basics first.
Install options & downloads