npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@narumitw/pi-lsp

v0.1.26

Published

Pi extension that exposes language-server tools for Biome, ty, and Ruff through a shared LSP runner.

Readme

🧠 pi-lsp — Shared Language Server Tools for Pi

npm Pi extension License: MIT

@narumitw/pi-lsp is a native Pi coding agent extension that exposes Biome, ty, and Ruff language-server tools through one shared LSP runner Module.

It supersedes the older split packages @narumitw/pi-biome-lsp and @narumitw/pi-python-lsp, which now live under extensions/deprecated/ and are excluded from active workspace scripts.

✨ Features

  • Runs biome lsp-proxy on demand for diagnostics, formatting, import organization, and source fixes.
  • Runs ty server on demand for Python type diagnostics.
  • Runs ruff server on demand for Python lint diagnostics, formatting, import organization, and source fixes.
  • Uses one internal LSP runner for JSON-RPC framing, subprocess lifecycle, diagnostics, formatting, code actions, and workspace edit application.
  • Keeps Biome, ty, and Ruff behavior in small server Adapters.
  • Supports workspace roots, file limits, recursive file discovery, and write-or-preview edits.
  • Starts language servers only for tool calls, then shuts them down.
  • Shows statusline activity only while LSP tools are running.

📦 Install

pi install npm:@narumitw/pi-lsp

Try without installing permanently:

pi -e npm:@narumitw/pi-lsp

Try this package locally from the repository root:

pi -e ./extensions/pi-lsp

⚠️ Tool-name compatibility

This package intentionally registers the same tool names as @narumitw/pi-biome-lsp and @narumitw/pi-python-lsp:

  • biome_lsp_diagnostics
  • biome_lsp_format
  • biome_lsp_fix
  • ty_lsp_diagnostics
  • ruff_lsp_diagnostics
  • ruff_lsp_format
  • ruff_lsp_fix

Avoid installing @narumitw/pi-lsp side by side with the older deprecated LSP packages unless you have verified how your Pi version handles duplicate tool names.

✅ Requirements

Install the language servers you want to use somewhere on PATH:

uv tool install ty
uv tool install ruff

For Biome, either install it globally/on PATH, add your project's node_modules/.bin to PATH, or point the extension at a project-local command. For example:

npm install -D @biomejs/biome
PI_BIOME_LSP_COMMAND="./node_modules/.bin/biome lsp-proxy" pi -e ./extensions/pi-lsp

Or provide custom server commands:

PI_BIOME_LSP_COMMAND="npx biome lsp-proxy" \
PI_TY_LSP_COMMAND="uvx ty server" \
PI_RUFF_LSP_COMMAND="uvx ruff server" \
pi -e ./extensions/pi-lsp

Optional timeout overrides:

PI_BIOME_LSP_TIMEOUT_MS=30000 \
PI_TY_LSP_TIMEOUT_MS=30000 \
PI_RUFF_LSP_TIMEOUT_MS=30000 \
pi -e ./extensions/pi-lsp

🛠️ Pi tools

Biome

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

Python

  • ty_lsp_diagnostics — start ty server, open Python files, and return type diagnostics.
  • ruff_lsp_diagnostics — start ruff server, open Python files, and return lint diagnostics.
  • ruff_lsp_format — compute or write Ruff formatting edits for one Python file.
  • ruff_lsp_fix — compute or write Ruff source actions such as source.fixAll.ruff or source.organizeImports.ruff.

🚀 Examples

Check a project subset with Biome diagnostics:

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

Format a TypeScript file with Biome:

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

Check a Python project with ty or Ruff diagnostics:

{
  "paths": ["src", "tests"],
  "limit": 100
}

Organize Python imports with Ruff:

{
  "path": "src/app.py",
  "kind": "source.organizeImports.ruff",
  "write": true
}

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

💬 Command

/lsp

Shows the configured Biome, ty, and Ruff LSP commands and whether each command is available on PATH.

🗂️ Package layout

extensions/pi-lsp/
├── src/
│   ├── adapters.ts
│   ├── command.ts
│   ├── files.ts
│   ├── lsp-client.ts
│   ├── pi-lsp.ts
│   ├── runner.ts
│   ├── text-edits.ts
│   └── types.ts
├── README.md
├── LICENSE
├── tsconfig.json
└── package.json

🔎 Keywords

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

📄 License

MIT. See LICENSE.