Skip to content

Getting Started

The fastest way to download Biome is to use npm or your preferred package manager. This requires Node.js v14.18 or newer. The CLI is also available as a standalone executable if you want to use Biome without installing Node.js.

To install Biome, run the following commands in a directory containing a package.json file.

Terminal window
npm install --save-dev --save-exact @biomejs/biome

It’s highly recommended not to use a range operator when installing Biome. See the versioning page for more information.

We recommend that you create a biome.json configuration file for each project. This eliminates the need to repeat the CLI options each time you run a command, and ensures that Biome uses the same configuration in your editor. If you are happy with Biome’s defaults, you don’t need to create the configuration. To create the configuration, run the init command in the root folder of your project:

Terminal window
npx @biomejs/biome init

After running the init command, you’ll now have a new biome.json file in your directory:

biome.json
{
"$schema": "https://biomejs.dev/schemas/1.7.0/schema.json",
"organizeImports": {
"enabled": false
},
"linter": {
"enabled": true,
"rules": {
"recommended": true
}
}
}

Alternatively, you can run biome init --jsonc to emit a biome.jsonc file instead.

Terminal window
npx @biomejs/biome init --jsonc

The linter.enabled: true enables the linter and rules.recommended: true enables the recommended rules. This corresponds to the default settings.

Formatting is enabled by default, but you can disable it by explicitly using formatter.enabled: false.

Biome CLI comes with many commands and options, so you can use only what you need.

You can format files and directories using the format command and the --write option:

Terminal window
npx @biomejs/biome format --write <files>

You can lint and apply safe fixes to files and directories using the lint command with the --apply:

Terminal window
npx @biomejs/biome lint --apply <files>

You can apply both of them by leveraging the check command:

Terminal window
npx @biomejs/biome check --apply <files>

The check command runs multiple tools at once. It formats, lints, and organizes imports.

We recommend installing an editor plugin to get the most out of Biome. Check out the editor page to know which editors support Biome.

If you’re using Node.js, the recommended way to run Biome in CI is to use your preferred package manager. This ensures that your CI pipeline uses the same version of Biome as you do inside the editor or when running local CLI commands. Alternatively, you can use a dedicated CI Action.

Success! You’re now ready to use Biome. 🥳