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

lspd

v1.2.0

Published

LSP multiplexer daemon for sharing language servers across editors

Readme

lspd

LSP multiplexer daemon for sharing language server instances across multiple editors.

This project is Bun/TypeScript-based (it previously had a Rust implementation, which has been removed).

Problem

Two failure modes that lspd handles:

  1. If you open multiple editor instances on the same project (multiple Neovim windows, OpenCode + Neovim, etc.), each client usually spawns its own language server process. For heavier servers like tsgo, this wastes a lot of CPU and memory.
  2. Servers like oxlint and tsgo are happiest when scoped to one config file (.oxlintrc.json, tsconfig.json). Running a single instance over a large monorepo conflates configs and can be slow. Splitting per config keeps state small and per-package settings honored.

Solution

lspd sits between your editor(s) and the language server.

  • For oxlint and tsgo (default): one server process per (nearest config file, server) pair. Files in packages/foo/ use the LSP rooted at packages/foo/; files in packages/bar/ use a separate LSP. Children are spawned lazily as you open files.
  • For other servers (or with --single-process): one server process per (projectRoot, serverName) pair, multiplexed to all editors.

Either way, multiple editor clients can share the same daemon.

Features

  • Per-manifest routing for oxlint (.oxlintrc.json) and tsgo (tsconfig.json, jsconfig.json)
  • Shared LSP instances across editor clients
  • Automatic lifecycle (daemon starts on first connection; exits after last client disconnects)
  • Binary discovery (prefers node_modules/.bin, with env overrides)
  • Request id translation (prevents collisions across multiple clients)
  • Diagnostics bridging for mixed clients
    • If a client doesn't support pull diagnostics (textDocument/diagnostic), the mux bridges pull->push using textDocument/publishDiagnostics.

Installation

This package requires bun to be installed (the CLI is a small Node wrapper that spawns Bun).

npm install -g lspd
# or
bun add -g lspd

Usage

Connect (used by editors)

lspd connect tsgo --project /path/to/project
lspd connect oxlint --project /path/to/project

# Force one process for the whole project (disables per-manifest routing):
lspd connect oxlint --project /path/to/project --single-process

Manage daemons

lspd ps
lspd ps --json

lspd kill tsgo --project /path/to/project
lspd kill oxlint --project /path/to/project --single-process
lspd kill --all

lspd prune

Your editor should start lspd connect <server> and speak LSP over stdin/stdout.

Neovim example

-- instead of: cmd = { "tsgo", "--lsp", "-stdio" }
cmd = { "lspd", "connect", "tsgo", "--project", vim.loop.cwd() }

Configuration

Environment variables:

  • LSPD_TSGO_BIN=/absolute/path/to/tsgo
  • LSPD_OXLINT_BIN=/absolute/path/to/oxlint

How it works (high-level)

  • lspd connect <server> ensures a daemon for (projectRoot, server) is running.
  • The daemon listens on a Unix domain socket under:
    • ~/.cache/lspd/daemons/<id>/daemon.sock
  • All connected editor clients are multiplexed to that daemon.
  • Inside the daemon:
    • For oxlint / tsgo: each inbound message is routed by its textDocument.uri to a child LSP whose cwd is the file's nearest manifest dir (.oxlintrc.json or tsconfig.json). Children are spawned lazily. Files outside any manifest fall back to a child rooted at --project.
    • For other servers (or with --single-process): one shared child handles everything.
  • Request ids are translated to avoid collisions; server-initiated requests are forwarded to the primary client and routed back to the originating child.

Caveats for per-manifest mode

  • Cross-config requests (e.g. tsgo find references across packages with separate tsconfig.jsons) only see the file's own subproject. If your monorepo relies on TS project references for cross-package navigation, use --single-process for tsgo.
  • workspace/symbol and similar workspace-wide queries are best-effort: they go to the --project fallback child only.

Development

bun test

Notes:

  • The smoke tests use test-fixtures/proj and will run bun install there as needed.
  • The tsgo smoke test may build tsgo from source if the prebuilt binary hangs, which requires git, go, and network access.

License

MIT (see LICENSE).