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

mschat-relay

v0.1.0

Published

Local relay that lets a cloud ms-chat browser drive your local coding CLIs (Codex / Claude Code / OpenCode) over SSE. Runs on your machine; the browser talks to http://localhost:5200.

Downloads

15

Readme

mschat-relay

Drive your local coding CLIs (Codex / Claude Code / OpenCode) from a cloud ms-chat browser tab — no cloud servers, no tunnels.

You open the cloud ms-chat page in your own browser; this tiny relay runs on your machine and spawns the coding CLI locally. Because the browser and the CLI are on the same machine, http://localhost from the page reaches your machine.

cloud ms-chat (your browser) ──fetch http://localhost:5200──▶ mschat-relay ──spawn──▶ codex / claude / opencode
        pick 「本地 Codex」 agent                              (runs in --cwd)          (streams back over SSE)

Install & run

# one-off
npx mschat-relay --cwd /path/to/your/project

# or install globally
npm install -g mschat-relay
mschat-relay --cwd /path/to/your/project

Then in the cloud ms-chat build set VITE_CLAUDE_RELAY_URL=http://localhost:5200, open it in your browser, and pick the 本地 Codex / 本地 Claude Code / 本地 OpenCode agent in the chat.

Options

| flag | env | default | meaning | |---|---|---|---| | -C, --cwd <dir> | RELAY_CWD | current dir | directory the CLI operates in | | -p, --port <n> | CLAUDE_RELAY_PORT | 5200 | port to listen on | | -s, --sandbox <mode> | RELAY_SANDBOX | workspace-write | codex sandbox: read-only | workspace-write | danger-full-access | | --cli <name> | RELAY_CLI | — | default CLI; each request's cli field overrides |

⚠️ workspace-write lets codex edit files in --cwd (real development). Use --sandbox read-only to look/answer without writing.

Prerequisites

You need the CLI you select installed and authenticated on your machine:

  • Codexcodex on PATH
  • Claude Codeclaude on PATH
  • OpenCode~/.opencode/bin/opencode

The relay picks the CLI per request (body.cli), spawns it in --cwd, and streams its output (claude stream-json / codex exec --json / opencode --format json) back to the chat as SSE.

Protocol

POST / with { "message": "...", "cli": "codex", "model"?: "...", "sandbox"?: "..." }text/event-stream of data: {"text": "<cumulative>"} lines, ending with data: [DONE] (or data: {"error": "..."}). GET / returns a health JSON. CORS + Private-Network-Access headers are set so an HTTPS cloud page can reach http://localhost.