Skip to content

Getting Started

  • Windows (including WSL), macOS, or Linux
  • x86_64 or ARM64
  • Node.js v14.18 or newer (not applicable if you use the standalone executable)

The fastest way to download Biome is to use npm or your preferred package manager. 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.

  • npm
  • yarn
  • pnpm
  • Bun Logo bun
  
Terminal window
npm install --save-dev --save-exact @biomejs/biome
  
Terminal window
yarn add --dev --exact @biomejs/biome
  
Terminal window
pnpm add --save-dev --save-exact @biomejs/biome
  
Terminal window
bun add --dev --exact @biomejs/biome

It’s highly recommended not to use range operators when installing Biome. Check the versioning page for more information.

We recommend creating a biome.json configuration file for each project. It eliminates the need to repeat the CLI options every time you run a command and ensures that Biome applies the same configuration in your editor. If you’re happy with Biome’s defaults, you don’t have to create the configuration.

To create the configuration, run the init command in the root folder of your project:

  • npm
  • yarn
  • pnpm
  • Bun Logo bun
  • deno
	
Terminal window
npx @biomejs/biome init
	
Terminal window
yarn biome init
	
Terminal window
pnpm biome init
	
Terminal window
bunx @biomejs/biome init
	
Terminal window
deno run -A npm:@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.

  • npm
  • yarn
  • pnpm
  • Bun Logo bun
  • deno
	
Terminal window
npx @biomejs/biome init --jsonc
	
Terminal window
yarn biome init --jsonc
	
Terminal window
pnpm biome init --jsonc
	
Terminal window
bunx @biomejs/biome init --jsonc
	
Terminal window
deno run -A npm:@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:

  • npm
  • yarn
  • pnpm
  • Bun Logo bun
  • deno
	
Terminal window
npx @biomejs/biome format --write <files>
	
Terminal window
yarn biome format --write <files>
	
Terminal window
pnpm biome format --write <files>
	
Terminal window
bunx @biomejs/biome format --write <files>
	
Terminal window
deno run -A npm:@biomejs/biome format --write <files>

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

  • npm
  • yarn
  • pnpm
  • Bun Logo bun
  • deno
	
Terminal window
npx @biomejs/biome lint --apply <files>
	
Terminal window
yarn biome lint --apply <files>
	
Terminal window
pnpm biome lint --apply <files>
	
Terminal window
bunx @biomejs/biome lint --apply <files>
	
Terminal window
deno run -A npm:@biomejs/biome lint --apply <files>

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

  • npm
  • yarn
  • pnpm
  • Bun Logo bun
  • deno
	
Terminal window
npx @biomejs/biome check --apply <files>
	
Terminal window
yarn biome check --apply <files>
	
Terminal window
pnpm biome check --apply <files>
	
Terminal window
bunx @biomejs/biome check --apply <files>
	
Terminal window
deno run -A npm:@biomejs/biome check --apply <files>

The command check is command meant to run multiple tools at once. Currently, it does:

  • format files
  • lint files
  • organize 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 favourite 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 dedicated CI Actions.

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