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

pi-lsp-lite

v0.4.0

Published

LSP diagnostics for pi — errors and warnings on every edit, same turn. Go, Rust, TypeScript, Python, C/C++.

Readme

pi-lsp-lite

CI npm License: MIT

Your agent can't see compiler errors. Now it can.

pi extension that runs language servers in the background and feeds diagnostics back inline after every edit. Errors appear on the same turn — no context switch, no separate command.

Go · Rust · TypeScript · Python · C/C++

Install

pi install npm:pi-lsp-lite

That's it. If you have gopls, rust-analyzer, typescript-language-server, pylsp, or clangd on PATH, diagnostics start flowing automatically.

What you see

  edit ─ src/main.go
  ✓ Edited src/main.go (replaced 2 lines)

  ⚠ LSP diagnostics for src/main.go (2 errors):
    error 12:5 [compiler] undefined: foo
    error 18:2 [compiler] too many arguments in call to bar
    + 1 diagnostic in 1 other file

The agent sees these too — they're appended to the tool result, so it can self-correct on the same turn.

Commands

| Command | What it does | |---------|-------------| | /lsp-status | Show running servers, PIDs, workspace roots, uptime | | /lsp-diag | Show all current diagnostics (or /lsp-diag path/to/file for one file) | | /lsp-add | Interactively add a new language server | | /lsp-remove | Disable a configured server | | /lsp-toggle | Flip a server on/off without removing config | | /lsp-install | Install a missing server binary |

Supported servers

| Server | Language | Install | |--------|----------|---------| | gopls | Go | go install golang.org/x/tools/gopls@latest | | rust-analyzer | Rust | rustup component add rust-analyzer | | typescript-language-server | TypeScript/JS | npm install -g typescript-language-server typescript | | pylsp | Python | pip install python-lsp-server | | clangd | C/C++ | Xcode CLI tools / apt install clangd |

Missing a server? /lsp-add lets you configure any LSP server that speaks stdio. Or add it to .pi-lsp-lite.json:

{
  "servers": {
    "haskell": {
      "extensions": [".hs"],
      "command": "haskell-language-server-wrapper",
      "args": ["--lsp"],
      "rootPatterns": ["cabal.project", "stack.yaml"]
    }
  }
}

Configuration

Works without config. For customisation, create .pi-lsp-lite.json (project) or ~/.pi-lsp-lite.json (global):

| Field | Description | Default | |-------|-------------|---------| | servers.<id>.diagnosticTimeout | Per-attempt timeout (ms) | per-language | | servers.<id>.maxRetries | Retry attempts on timeout (0-10) | 3 | | servers.<id>.disabled | Disable this server | false | | diagnosticTimeout | Global default timeout (ms) | 5000 | | documentIdleTimeout | Close idle documents after (ms) | 120000 |

Project config merges over global. Partial overrides work — only specify what you want to change.

How it works

  1. Agent writes/edits a file
  2. Extension detects the language, finds the workspace root
  3. Spawns (or reuses) an LSP server for that language + root
  4. Sends didChange, waits for publishDiagnostics
  5. If timeout: retries with exponential backoff + jitter (up to maxRetries times)
  6. Filters to errors + warnings, formats, appends to tool result + shows in TUI

Cross-file impact is detected via snapshot-diff: if editing lib.ts breaks caller.ts, you see "+ N diagnostics in M other files".

Servers are lazy (spawn on first edit), idle-shutdown after 240s, and clean up on session end.

Development

git clone https://github.com/mcphailtom/pi-lsp-lite
cd pi-lsp-lite && npm install
npm run check              # typecheck
npm test                   # unit tests (106, no servers needed)
npm run test:integration   # real server tests (needs servers on PATH)

See docs/ARCHITECTURE.md and docs/CONTRIBUTING.md.

License

MIT