@narumitw/pi-biome-lsp

Pi extension that exposes Biome language-server tools for diagnostics, formatting, and fixes.

Packages

Package details

extension

Install @narumitw/pi-biome-lsp from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@narumitw/pi-biome-lsp
Package
@narumitw/pi-biome-lsp
Version
0.1.20
Published
May 17, 2026
Downloads
1,850/mo · 14/wk
Author
narumitw
License
MIT
Types
extension
Size
29.3 KB
Dependencies
1 dependency · 0 peers
Pi manifest JSON
{
  "extensions": [
    "./src/biome-lsp.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

🧬 pi-biome-lsp — Biome Language Server Tools for Pi

npm Pi extension License: MIT

@narumitw/pi-biome-lsp is a native Pi coding agent extension that exposes Biome language-server tools.

Use it to give Pi Biome diagnostics, formatting, import organization, and safe source fixes through Language Server Protocol (LSP) workflows.

✨ Features

  • Runs biome lsp-proxy on demand for diagnostics.
  • Computes or writes formatting edits for Biome-supported files.
  • Computes or writes Biome source actions such as source.fixAll.biome and source.organizeImports.biome.
  • Supports workspace roots, file limits, and recursive file discovery.
  • Starts the language server only for tool calls, then shuts it down.
  • Shows statusline activity only while Biome LSP tools are running.
  • Provides clear setup errors when Biome is missing.

📦 Install

pi install npm:@narumitw/pi-biome-lsp

Try without installing permanently:

pi -e npm:@narumitw/pi-biome-lsp

Try this package locally from the repository root:

pi -e ./extensions/pi-biome-lsp

✅ Requirements

Install Biome somewhere on PATH, for example:

npm install -D @biomejs/biome

Or provide a custom server command:

PI_BIOME_LSP_COMMAND="npx biome lsp-proxy" pi -e ./extensions/pi-biome-lsp

Optional timeout override:

PI_BIOME_LSP_TIMEOUT_MS=30000 pi -e ./extensions/pi-biome-lsp

🛠️ Pi tools

  • biome_lsp_diagnostics — start biome lsp-proxy, open supported files, and return diagnostics.
  • biome_lsp_format — compute or write formatting edits for one file.
  • biome_lsp_fix — compute or write source actions such as source.fixAll.biome or source.organizeImports.biome.

🚀 Examples

Check a project subset with Biome diagnostics:

{
  "paths": ["src", "extensions/pi-biome-lsp/src"],
  "limit": 100
}

Format a TypeScript file with Biome:

{
  "path": "src/index.ts",
  "write": true
}

Organize imports with Biome:

{
  "path": "src/index.ts",
  "kind": "source.organizeImports.biome",
  "write": true
}

If paths is omitted for diagnostics, the tool recursively discovers Biome-supported files under the workspace root, skipping common generated and dependency directories.

💬 Command

/biome-lsp

Shows the configured Biome LSP command and whether it is available on PATH.

🗂️ Package layout

extensions/pi-biome-lsp/
├── src/
│   └── biome-lsp.ts
├── README.md
├── LICENSE
├── tsconfig.json
└── package.json

🔎 Keywords

Pi extension, Pi coding agent, Biome LSP, Biome formatter, Biome linter, import organization, Language Server Protocol, AI coding tools.

📄 License

MIT. See LICENSE.