---
title: Getting Started
description: Learn how to set up a new project with Biome.
---

import { Code, TabItem, Tabs } from "@astrojs/starlight/components";
import DefaultConfiguration from "@/components/generated/DefaultConfiguration.mdx";
import PackageManagerBiomeCommand from "@/components/PackageManagerBiomeCommand.astro";
import PackageManagerCommand from "@/components/PackageManagerCommand.astro";

Biome is best installed as a development dependency of your projects, but it is
also available as a [standalone executable] that doesn't require Node.js.

[standalone executable]: /guides/manual-installation

<PackageManagerCommand
  npm="i -D -E @biomejs/biome"
  pnpm="add -D -E @biomejs/biome"
  yarn="add -D -E @biomejs/biome"
  bun="add -D -E @biomejs/biome"
  deno="add -D npm:@biomejs/biome"
/>

:::note[Version pinning]
`-E` ensures that the package manager pins the version of Biome. See the
[versioning page](/internals/versioning) 
for more information about [why pinning the version is important].
:::

[why pinning the version is important]: /internals/versioning#why-pinning-the-version-is-important

## Configuration

Although Biome can run with zero configuration, you'll likely want to tweak some
settings to suit your project's needs, in which case you can run the following
command to generate a `biome.json` configuration file.

<PackageManagerBiomeCommand command="init"/>

## Usage

Lets get a quick overview of how to use Biome in your project.

### Command-line interface

Biome provides a [command-line interface] to format, lint, and check your code.

[command-line interface]: /reference/cli

<Tabs syncKey="command">
	<TabItem label="npm" icon="seti:npm">
		<Code frame="none" code={`
# Format all files
npx @biomejs/biome format --write

# Format specific files
npx @biomejs/biome format --write <files>

# Lint files and apply safe fixes to all files
npx @biomejs/biome lint --write

# Lint files and apply safe fixes to specific files
npx @biomejs/biome lint --write <files>

# Format, lint, and organize imports of all files
npx @biomejs/biome check --write

# Format, lint, and organize imports of specific files
npx @biomejs/biome check --write <files>
    `} lang="bash"  />
	</TabItem>
	<TabItem label="pnpm" icon="pnpm">
		<Code frame="none" code={`
# Format all files
pnpm exec biome format --write

# Format specific files
pnpm exec biome format --write <files>

# Lint and apply safe fixes to all files
pnpm exec biome lint --write

# Lint files and apply safe fixes to specific files
pnpm exec biome lint --write <files>

# Format, lint, and organize imports of all files
pnpm exec biome check --write

# Format, lint, and organize imports of specific files
pnpm exec biome check --write <files>
    `} lang="bash"  />
	</TabItem>
	<TabItem label="bun" icon="bun">
		<Code frame="none" code={`
# Format all files
bunx biome format --write

# Format specific files
bunx biome format --write <files>

# Lint and apply safe fixes to all files
bunx biome lint --write

# Lint files and apply safe fixes to specific files
bunx biome lint --write <files>

# Format, lint, and organize imports of all files
bunx biome check --write

# Format, lint, and organize imports of specific files
bunx biome check --write <files>
    `} lang="bash"  />
	</TabItem>
	<TabItem label="deno" icon="deno">
		<Code frame="none" code={`
# Format specific files
deno run -A npm:@biomejs/biome format --write <files>

# Format all files
deno run -A npm:@biomejs/biome format --write

# Lint files and apply safe fixes to all files
deno run -A npm:@biomejs/biome lint --write

# Lint files and apply safe fixes to specific files
deno run -A npm:@biomejs/biome lint --write <files>

# Format, lint, and organize imports of all files
deno run -A npm:@biomejs/biome check --write

# Format, lint, and organize imports of specific files
deno run -A npm:@biomejs/biome check --write <files>
    `} lang="bash"  />
	</TabItem>
	<TabItem label="yarn" icon="seti:yarn">
		<Code frame="none" code={`
# Format all files
yarn exec biome format --write

# Format specific files
yarn exec biome format --write <files>

# Lint files and apply safe fixes to all files
yarn exec biome lint --write

# Lint files and apply safe fixes to specific files
yarn exec biome lint --write <files>

# Format, lint, and organize imports of all files
yarn exec biome check --write

# Format, lint, and organize imports of specific files
yarn exec biome check --write <files>
    `} lang="bash"  />
	</TabItem>
</Tabs>

### Editor integrations

Biome is available as a first-party extension in your favorite editors.

- [VS Code](/guides/editors/first-party-extensions#vs-code)
- [IntelliJ](/guides/editors/first-party-extensions#intellij)
- [Zed](/guides/editors/first-party-extensions#zed)

There are also [community extensions](/guides/editors/third-party-extensions) 
for other editors, such as **Vim**, **Neovim**, and **Sublime Text**, to name 
a few.

### Continuous Integration

Run `biome ci` as part of your CI pipeline to enforce code quality and consistency 
across your team. It works just like the `biome check` command, but is optimized for
CI environments.

- [GitHub Actions](/recipes/continuous-integration#github-actions)
- [GitLab CI](/recipes/continuous-integration#gitlab-ci)

See the [Continuous Integration](/recipes/continuous-integration) recipes for more examples.

## Next Steps

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

- [Migrate from ESLint and Prettier](/guides/migrate-eslint-prettier)
- Learn more about how to [configure Biome](/guides/configure-biome)
- Learn more about how to use and configure the [formatter](/formatter)
- Learn more about how to use and configure the [linter](/linter)
- Get familiar with the [CLI commands and options](/reference/cli)
- Get familiar with the [configuration options](/reference/configuration)
- Join our [community on Discord](https://biomejs.dev/chat)