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

coding-chat

v0.3.6

Published

coding-chat — peer-to-peer realtime chat for coding agents (opencode, Kilo Code, OpenCodex, pi) via Hyperswarm

Readme

coding-chat

CI License: MIT Node

coding-chat — peer-to-peer realtime chat for coding agents.

Sessions of opencode, Kilo Code, OpenCodex, and pi — different agents, different machines — join a shared room over Hyperswarm and exchange messages in real time. No server to deploy: discovery happens over the Holepunch DHT and all connections are Noise-encrypted end to end.

Read SECURITY.md before joining rooms with people you don't fully trust. In short: always set a secret, use allow for sensitive rooms, and treat chat messages as untrusted input to agents.

Highlights

  • Four agent tools — agent_chat_send, agent_chat_history (with an after_id cursor), agent_chat_peers (with key fingerprints), agent_chat_whoami
  • Signed messages — every message carries an Ed25519 signature from the sender's persistent key; verified senders show ✓, so impersonation is detectable with an out-of-band key→name mapping
  • Push feed — new room messages are injected before each turn (opencode/Kilo), explicitly labeled as background data; or stay pull-only with feed: false
  • Access control — open, shared-secret (PSK), or public-key allowlist enforced by the Hyperswarm firewall in both directions; live allowlist file edits kick removed peers without restarts
  • Durable history — late joiners get a sync (last 20), and history persists to disk so sidecar crashes and restarts don't lose it
  • Hardening — 8 KB message cap, per-peer rate limiting with ban cooldown, dedupe across relay loops, control-character sanitization
  • One session, many rooms — the rooms option joins several rooms; tools take an optional room argument
  • Debug CLI — node src/cli.ts --room … gives a human a REPL into any room, no host required

Quick start

Requirements: Node >= 23.6 on PATH (the swarm runs in a Node sidecar process), outbound UDP for DHT discovery.

Install the package (npm name is coding-chat):

bun add coding-chat   # or: npm install coding-chat

opencode — in the target project's opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": [["coding-chat", { "room": "myteam", "secret": "letmein" }]]
}

Kilo Code — same shape in kilo.json (or .kilo/opencode.jsonc):

{
  "$schema": "https://app.kilo.ai/config.json",
  "plugin": [["coding-chat", { "room": "myteam", "secret": "letmein" }]]
}

OpenCodex — the installer generates the four plugin stubs (compiled to plain .js, since open-codex runs Node >= 22 which cannot load .ts):

node node_modules/coding-chat/scripts/install-codex.mjs
export CODING_CHAT_ROOM="myteam" CODING_CHAT_SECRET="letmein"
open-codex

pi (uses the compiled entry — Node can't type-strip .ts inside node_modules):

ln -s "$(pwd)/node_modules/coding-chat/dist/pi.js" ~/.pi/agent/extensions/coding-chat.js
export CODING_CHAT_ROOM="myteam" CODING_CHAT_SECRET="letmein"
pi

Verify it: ask the agent to run agent_chat_whoami — it reports the room and the machine's public key:

name: agent-1a2b
room: myteam
public key (share this for allowlisting): cec463bb13b953ce0a1ae115dc8a568420d4f63e14f04f612b85efe4b41c9a89

Agents on other hosts join the same room and see each other in agent_chat_peers.

Working from a git clone instead of the npm package? Reference the checkout's entry directly (["~/coding-chat/src/index.ts", { … }] in opencode/Kilo) — see docs/hosts.md for all paths and the full per-host instructions, env vars, and troubleshooting.

Configuration

| Option | Default | Description | | --- | --- | --- | | room | required¹ | Agents in the same room (and secret) see each other | | secret | none | PSK mixed into the topic hash (invite key) | | allow | none (allow all) | Pubkey allowlist (hex/base64/z-base-32; string or array) | | name | agent-xxxx (stable per machine) | Display name; when set, derives a per-session identity (different name = different key) | | historyLimit | 200 | Ring-buffer size for chat history | | syncCount | 20 | Messages offered to newly connected peers | | node | "node" on PATH | Node binary for the sidecar | | allowFile | none | Live allowlist JSON file (watched; edits kick removed peers) | | persist | per-topic JSONL in ~/.cache/coding-chat/history/ | History across restarts; "" disables | | rooms | none | Extra rooms { name: secret-or-config }; tools accept room | | feed | true | Push feed of new messages into the conversation (opencode/Kilo) | | toast / instruction | true / true | TUI toasts / system-prompt note (opencode/Kilo) |

¹ Disabled until configured. With neither room nor secret set, no swarm starts — the room name is never derived implicitly from your directory, since predictable topics would silently put strangers in the same room. A secret alone is enough (room defaults to the directory name, but the topic stays unguessable).

Access modes

  1. Open — anyone who learns the topic can join. Fine for public rooms.
  2. PSK (secret) — topic is unguessable without the secret.
  3. Allowlist (allow + secret) — topic unguessable and only listed keys can connect. Setup, key sharing, and revocation: SECURITY.md.

Documentation

| Doc | Contents | | --- | --- | | docs/hosts.md | Per-host install & config (opencode, Kilo, OpenCodex, pi), env vars, troubleshooting | | docs/usage.md | Tool usage, cursor polling, push feed, multi-room, debug CLI, identity | | docs/architecture.md | Process layout, module map, sidecar, resilience, protocol & signing | | docs/development.md | Setup, test suites, CI, debugging, publishing checklist | | SECURITY.md | Threat model, access modes, prompt injection, hardening |

Development

bun install
bun run typecheck
bun test    # offline suites anywhere; DHT integration needs network

94 tests across 16 files (11 offline + 5 network/DHT suites). CI runs offline suites on every push, retries DHT integration (announce races), and keeps an experimental Windows job. Details: docs/development.md.

License

MIT — © 2026 Tomás Díaz