src/content/docs/guides/manual-installation.mdx
import { Code } from '@astrojs/starlight/components'; import { getLatestVersion } from "@biomejs/version-utils"; export const version = await getLatestVersion("stable");
Using Biome's standalone CLI binary can be a great choice if you aren't already using Node.js or npm (or any other package manager).
Or in other words, Biome shouldn't be the only reason for you to have a package.json.
:::note
If you're already using npm or another package manager, then using the package manager is the preferred way to install Biome.
You're already familiar with the tooling, and installing and updating are simpler.
:::
You have to pick the correct binary for your platform for Biome work. The following table should help you do so.
| CPU Architecture | Windows | macOS | Linux | Linux (musl) |
|---|---|---|---|---|
arm64 | win32-arm64 | darwin-arm64 (M1 or newer) | linux-arm64 | linux-arm64-musl |
x64 | win32-x64 | darwin-x64 | linux-x64 | linux-x64-musl |
:::note Use the Linux variant for Windows Subsystem for Linux (WSL). :::
Biome is available as a Homebrew formula for macOS and Linux users.
brew install biome
Biome publishes official Docker images that support
the amd64 and arm64 architectures for all Biome versions starting from v1.7.0.
ghcr.io/biomejs/biome:{major}
ghcr.io/biomejs/biome:{major}.{minor}
ghcr.io/biomejs/biome:{major}.{minor}.{patch}
Here are a couple examples on how to use the Docker image:
:::note
The default workdir is /code in the Docker image.
:::
# Lint files
docker run -v $(pwd):/code ghcr.io/biomejs/biome lint
docker run -v $(pwd):/code ghcr.io/biomejs/biome lint --write
# Format files
docker run -v $(pwd):/code ghcr.io/biomejs/biome format
docker run -v $(pwd):/code ghcr.io/biomejs/biome format --write
To install Biome, grab the executable for your platform from the latest CLI release on GitHub and give it execution permission.
<Code lang="shell" code={`
curl -L https://github.com/biomejs/biome/releases/download/@biomejs/biome@${version}/biome-darwin-arm64 -o biome chmod +x biome
curl -L https://github.com/biomejs/biome/releases/download/@biomejs/biome@${version}/biome-linux-x64 -o biome chmod +x biome
Invoke-WebRequest -Uri "https://github.com/biomejs/biome/releases/download/@biomejs/biome@${version}/biome-win32-x64.exe" -OutFile "biome.exe" `} />
Now you can use Biome by simply running ./biome.
Follow our Getting Started guide.