Available in
Marketplaces, most starred first
Tags
Add to README
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
Marketplaces, most starred first
Shows its components, always-on context cost and install status, kept current. Add ?tokens=0 to hide the cost.
By 0ojv1.0.0In 1 marketplace
Share ONE TypeScript language server (tsserver) across all Claude Code sessions in a repo, instead of each session spawning its own ~2GB tsserver.
Claude loads one when your task matches it, or you run it by name.
Executables (bin/) — files in this plugin's bin/ directory are added to the Bash tool's PATH while the plugin is enabled.
Share one TypeScript language server (tsserver) across every Claude Code
session in a repo — instead of each session spawning its own ~2 GB tsserver.
Open 4 Claude sessions in the same monorepo and Claude's typescript-lsp plugin
starts 4 × ~2 GB language servers doing identical work. tsserverd collapses
them to one shared backend per repo, with transparent fallback so it can
never break your editing.
session A ─┐
session B ─┼─▶ shim (fake typescript-language-server) ─▶ [daemon per repo root] ─▶ ONE tsserver
session C ─┘
Three small pieces (all in src/):
shim.mjs — a stand-in for typescript-language-server. Claude launches it
(via .lsp.json), it peeks the initialize message to learn the project root,
hashes that to a per-repo Unix socket, and becomes a dumb pipe between the
session's stdio and the daemon. If it can't reach the daemon for any reason
it transparently execs the real server, replaying the messages it already
read — worst case is today's behavior.daemon.mjs — one broker per repo root. Owns a single real tsserver and
multiplexes N sessions onto it: initializes the backend once and caches/replays
the result to later sessions, namespaces JSON-RPC request IDs so responses route
back to the right session, renumbers document versions to one monotonic sequence
per file, refcounts open documents, and only tears the backend down 10 min after
the last session disconnects. A session's shutdown can't kill the shared server.lib.mjs — LSP Content-Length framing + shared helpers.Claude is disk-authoritative: it writes edits to disk with its own tools, then
mirrors the exact disk content into the LSP. Measured across two live sessions,
28/28 document ops carried exact disk content, 0 divergence — so there's no
unsaved-buffer conflict between sessions to reconcile. The daemon leans into that
(disk-authoritative didOpen, monotonic version renumbering).
/plugin marketplace add 0oj/tsserverd
/plugin install tsserverd@0oj
Then enable it. Activation is entirely via .lsp.json, which points Claude's
TypeScript LSP at the shim:
{
"typescript": {
"command": "node",
"args": ["${CLAUDE_PLUGIN_ROOT}/src/shim.mjs", "--stdio"]
}
}
Requirements: typescript-language-server + typescript installed and on PATH
(the shim proxies the real one) — npm i -g typescript-language-server typescript.
No. It's active only while the plugin is enabled; disable/uninstall it and you're back to Claude's stock per-session tsserver instantly. Even while enabled, the shim's hard fallback means a broken daemon degrades to normal behavior, never to a broken editor. It touches no global machine state.
An earlier version activated by swapping the nvm typescript-language-server
binary. If you ran that, remove it — the .lsp.json activation replaces it:
./scripts/uninstall-global-binary-swap.sh
tsserverd doctor warns if the old swap is still present.
tsserverd status # daemons, backends, current vs peak clients per repo
tsserverd savings # estimated memory saved right now + peak this run
tsserverd doctor # is it healthy? is the legacy binary-swap still installed?
tsserverd selftest # prove sharing + correctness with two synthetic clients
savings estimates (clients − 1) × the live backend's measured physical footprint — derived from your actual running server, not a hardcoded guess.
TSD_DISABLE=1 — shim behaves exactly like the real server (no sharing).TSD_REAL_TLS=<path> — explicit path to the real typescript-language-server.TSD_TRACE=<file> — log per-op disk-content match (the experiment above).$TMPDIR/tsserverd/.node test/selftest.mjs # two synthetic sessions share one backend + get symbols
Built from public signals: copy clicks on this site, GitHub stars and activity, the README and the manifest. Not a security audit or an endorsement.
npx claudepluginhub 0oj/tsserverd --plugin tsserverdPlugins from other owners that cover similar ground