Install fallow
Get fallow with npx, as a development dependency, as a prebuilt binary, with cargo or with Docker, and check and update the install.
To try fallow, you need no install: run npx fallow in your project. To give your team and your CI the same version, add fallow as a development dependency. The other options on this page are for machines without Node.js, or for a fixed binary that you download yourself.
Each option gives you the same tool, because fallow is one native binary for macOS, Linux and Windows. The npm package fallow installs the binary for your platform and starts it through a small Node.js launcher.
Requirements
What you need depends on the option that you pick:
- The npm package needs Node.js 22 or later.
- The prebuilt binary and the Docker image need no Node.js for the analysis.
cargo installneeds a Rust toolchain.
Run fallow without an install
npx fallow
npx downloads the package on the first run, so you can try fallow on a project before you change its package.json. The first run starts with this command.
Add fallow to your project
When fallow stays in a project, pin its version. Without a pin, npx can get a newer release on the CI machine than on your laptop, and the two runs can report different findings. Install fallow as a development dependency, so that the lockfile holds one version for your team and your CI:
npm install --save-dev fallowpnpm add --save-dev fallowyarn add --dev fallowbun add --dev fallowRun it through your package manager, for example npx fallow or pnpm fallow. The package has three commands: fallow, fallow-lsp for editors, and fallow-mcp for coding agents.
To install fallow for all projects on your machine, run npm install -g fallow.
Download a prebuilt binary
Use a prebuilt binary on a machine without Node.js, for example a minimal CI image. Download the archive for your platform from GitHub Releases. Each archive holds fallow, fallow-lsp, fallow-mcp and fallow-similar-code. Put them in a folder on your PATH.
| Archive | Platform |
|---|---|
fallow-aarch64-apple-darwin.tar.gz | macOS, Apple Silicon |
fallow-x86_64-apple-darwin.tar.gz | macOS, Intel |
fallow-x86_64-unknown-linux-gnu.tar.gz | Linux x64, glibc |
fallow-aarch64-unknown-linux-gnu.tar.gz | Linux ARM64, glibc |
fallow-x86_64-unknown-linux-musl.tar.gz | Linux x64, musl |
fallow-aarch64-unknown-linux-musl.tar.gz | Linux ARM64, musl |
fallow-x86_64-pc-windows-msvc.zip | Windows x64 |
fallow-aarch64-pc-windows-msvc.zip | Windows ARM64 |
Install with cargo
When you have a Rust toolchain, cargo builds fallow from source:
cargo install fallow-cli
This installs the fallow command. To get the MCP server for coding agents too, run cargo install fallow-mcp.
Run fallow in Docker
Use Docker when you want fallow in a container with its own git and Node.js. Build the image from the fallow repository, then run it on the current folder:
docker build -t fallow:local https://github.com/fallow-rs/fallow.git#main
docker run --rm -v "$PWD:/workspace" --user "$(id -u):$(id -g)" fallow:local audit --format json --quiet
The image runs one fallow command on /workspace and exits, and the exit code of the container is the exit code of fallow. With --user, your user owns the files that fallow writes, and git accepts the mounted repository. The image does not install the dependencies of your project, so run your install step before fallow. For Docker Compose, copy examples/docker/compose.yaml to your project, and run docker compose run --rm fallow audit --format json --quiet.
The image holds git, Node.js, npm and Corepack. Run it as a command that exits, not as a service that stays on. On Windows outside WSL, give a project path that Docker Desktop accepts, and keep /workspace as the folder in the container. To upload a runtime coverage inventory from the container, add --path-prefix /workspace to fallow coverage upload-inventory, so that the paths match the paths that the runtime beacon reports.
Check the install
Whichever option you picked, check that the command starts:
fallow --version
The command prints fallow and the version number. In a project that has fallow as a development dependency, run npx fallow --version. The npm package then also prints a verified: line with the result of the binary check (see the next section).
A command that starts can still read your project wrongly, for example when the dependencies are not installed. To check that fallow reads your project correctly, run fallow doctor. It checks the config, the workspaces, the plugins and the installed dependencies, and it runs no analysis. See fallow doctor.
Binary verification
Fallow reads all of your source code, so a changed binary could read it too. That is why each release signs its binaries. Before the first run, the npm package checks the Ed25519 signature and the SHA-256 digest of the binary for your platform. It saves the result next to the binary, so later runs skip the check. When the check fails, fallow prints fallow: binary verification failed, does not start, and exits with code 1.
The check needs no network access. When the folder of the binary is read-only, the npm package saves the result in a cache folder. Set FALLOW_VERIFY_CACHE_DIR to choose that folder. Set FALLOW_SKIP_BINARY_VERIFY=1 only when you replace the published binary on purpose. The security policy describes the trust model.
How the check works
The check has two parts. Each @fallow-cli/<platform> package has a .sig file next to each binary, and a SHA-256 digest of each binary in the fallowDigests field of its package.json.
- The public key in the
fallowpackage checks the Ed25519 signature of the binary. - The npm package compares the SHA-256 digest of the binary with the digest in
fallowDigests. A changed binary with a valid signature thus still fails.
The fallow, fallow-lsp and fallow-mcp commands run the check before they start the binary. A failed check names its cause: sig-invalid, sig-missing, digest-mismatch, digest-unavailable or binary-missing.
The npm package saves the result in the first of these places that it can write:
- The folder of the platform package (
.fallow-verified). - The folder in
FALLOW_VERIFY_CACHE_DIR. $XDG_CACHE_HOME/fallow/sentinels/,~/.cache/fallow/sentinels/, or%LOCALAPPDATA%\fallow\sentinels\on Windows.
When it can write in none of them, it runs the check on each start. npx fallow --version shows the result:
fallow 3.51.0
verified: yes (cache hit at <path>/node_modules/@fallow-cli/darwin-arm64/.fallow-verified); fallow 3.51.0 signed
With FALLOW_SKIP_BINARY_VERIFY=1, the line is verified: skipped (FALLOW_SKIP_BINARY_VERIFY is set), and fallow also prints a warning, so a CI log still shows the bypass. With FALLOW_VERIFY_LOG=1, fallow writes one line for each check on stderr, for example fallow-verify outcome=ok cache=hit sentinel=<path>.
The GitHub Action runs the same check again after it installs fallow. It loads the verifier from the files of the action, not from the npm package that it installed. A failed check stops the job before a later step runs the binary.
Each release on GitHub Releases has a CycloneDX SBOM for each platform, named fallow-<target>.cdx.json. The OpenVEX document .vex/openvex.json in the fallow repository lists the advisories that do not affect fallow, with the reason for each.
Update fallow
Each option has its own update command:
| Install | Update |
|---|---|
npx | npx fallow@latest |
| Development dependency | npm install --save-dev fallow@latest, or the same command of your package manager |
| Global npm install | npm install -g fallow@latest |
| Prebuilt binary | Download the new archive. |
| cargo | cargo install fallow-cli |
| Docker | Build the image again. |
The analysis reads only local files. In a local terminal, fallow also checks once a day for a newer release, and prints one line when it finds one. It does not check in CI, with --quiet or in a machine format. To turn off this check, set FALLOW_UPDATE_CHECK=off.
If fallow does not start
Most start problems come from the npm package, because it gets the binary as a separate package.
Could not find @fallow-cli/.... The npm package installs the binary for your platform as an optional dependency. An install that skips optional dependencies, or a node_modules folder from another operating system, has no binary for your platform. Run npm install again on the machine that runs fallow. On Linux, the message names your C library (glibc or musl) and gives the exact npm install command.
An old Node.js. The npm package supports Node.js 22 or later. Check with node --version. When you cannot update Node.js, use the prebuilt binary.
Next
- Next: First run. Run fallow on your project and read each part of the report.