# @biomejs/js-api

> JavaScript APIs for the Biome package

Latest version **6.0.0** (published 2026-06-12) · MIT OR Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install @biomejs/js-api
pnpm add @biomejs/js-api
yarn add @biomejs/js-api
bun add @biomejs/js-api
```

## Health

**Score 65/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high quality score.

Warnings: low downloads.

## Facts

| | |
|---|---|
| Version | 6.0.0 |
| Published | 2026-06-12 |
| First published | 2023-08-18 |
| Weekly downloads | 0 |
| License | MIT OR Apache-2.0 |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 59.6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| Author | Biome Developers and Contributors |
| Maintainers | nhedger, dominionl, conaclos, ematipico, siketyan |
| Keywords | JavaScript, bindings, APIs, biome |

## Links

- npm: https://www.npmjs.com/package/@biomejs/js-api
- Repository: https://github.com/biomejs/biome
- Homepage: https://biomejs.dev
- Issues: https://github.com/biomejs/biome/issues
- npm.io page: https://npm.io/package/@biomejs/js-api

## Recent versions

- 6.0.0 (latest) — 2026-06-12
- 0.8.0-beta.3 (beta) — 2025-06-02
- 0.6.0-nightly.af70ac2 (nightly) — 2024-05-23
- 4.0.0 — 2025-10-24
- 3.0.0 — 2025-08-14
- 2.0.3 — 2025-07-08
- 2.0.2 — 2025-07-08
- 2.0.1 — 2025-07-08
- 2.0.0 — 2025-07-08
- 1.0.0 — 2025-06-17
- 0.8.0-beta.2 — 2025-05-14
- 0.8.0-beta.1 — 2025-03-26
- 0.7.1 — 2024-10-01
- 0.6.2 — 2024-06-27
- 0.6.1 — 2024-06-20
- … 9 more at https://npm.io/package/@biomejs/js-api/versions

## README

# Biome JavaScript Bindings

Official JavaScript bindings for [Biome](https://biomejs.dev/)

> [!WARNING]
> The API is currently in alpha. It is not yet ready for production use. We appreciate your support and feedback as we work to make it ready for everyone.

## Installation

```shell
npm i @biomejs/js-api
npm i @biomejs/wasm-<dist>
```

You need to install one of the `@biomejs/wasm-*` package as a **peer dependency** for this package to work correctly, out of the following distributions:
- `@biomejs/wasm-bundler`: Install this package if you're using a bundler that supports importing `*.wasm` files directly
- `@biomejs/wasm-nodejs`: Install this package if you're using Node.js to load the WebAssembly bundle use the `fs` API
- `@biomejs/wasm-web`: Install this package if you're targeting the web platform to load the WASM bundle using the `fetch` API

## Usage

```js
import { Biome } from "@biomejs/js-api/nodejs";
// Or:
// import { Biome, Distribution } from "@biomejs/js-api/bundler";
// import { Biome, Distribution } from "@biomejs/js-api/web";

const biome = new Biome();
const { projectKey } = biome.openProject("path/to/project/dir");

// Optionally apply a Biome configuration (instead of biome.json)
biome.applyConfiguration(projectKey, {...});

const formatted = biome.formatContent(
  projectKey,
  "function f   (a, b) { return a == b; }",
  {
    filePath: "example.js",
  },
);

console.log("Formatted content: ", formatted.content);

const result = biome.lintContent(projectKey, formatted.content, {
  filePath: "example.js",
});

const html = biome.printDiagnostics(result.diagnostics, {
  filePath: "example.js",
  fileSource: formatted.content,
});

console.log("Lint diagnostics: ", html);
```

## Philosophy

The project philosophy can be found on our [website](https://biomejs.dev/internals/philosophy/).

## Community

Contribution and development instructions can be found in [Contributing](../../../CONTRIBUTING.md).

Additional project coordination and real-time discussion happens on our [Discord server](https://biomejs.dev/chat). Remember that all activity on the Discord server is still moderated and will be strictly enforced under the project's [Code of Conduct](../../../CODE_OF_CONDUCT.md).

---
_Source: https://npm.io/package/@biomejs/js-api · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
