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

@myanalyticsschool/connect-ide

v0.1.0

Published

Run a VS Code IDE on your own machine and mirror it into a MAS Class lesson

Readme

@myanalyticsschool/connect-ide

Open a VS Code IDE on your own machine, mirrored into a MAS Class lesson tab.

This is the IDE companion to @myanalyticsschool/connect. The terminal CLI mirrors a single shell; this one mirrors a full IDE (file tree, editor, integrated terminal, extensions) by running code-server locally and exposing it through a Cloudflare Quick Tunnel.

Install

You don't install this package directly — your lesson page tells you to run it via npx:

npx -y @myanalyticsschool/connect-ide <session-token> --relay <wss-url>

You do need two tools on your PATH:

# macOS
brew install code-server cloudflared

# Linux
curl -fsSL https://code-server.dev/install.sh | sh
# (cloudflared via your distro: https://pkg.cloudflare.com/)

# Windows
winget install --id Cloudflare.cloudflared
# code-server: https://github.com/coder/code-server/releases

What it does

  1. Spawns code-server --auth none on a random 127.0.0.1 port, with your chosen workspace folder.
  2. Spawns cloudflared tunnel --url http://127.0.0.1:<port>, captures the generated https://<hash>.trycloudflare.com URL.
  3. Opens a WebSocket to the MAS relay (/api/terminal/relay) using the lesson session token.
  4. When the lesson tab connects, sends {type:"ide-ready", url} to it. The tab iframes the tunnel URL.
  5. Holds the session until you press Ctrl-C or close the lesson tab.

On exit, both child processes are stopped and the temp user-data dir is removed.

Options

--workspace <dir>   Folder to open in VS Code (default: current dir)
--relay <wss-url>   Override the relay endpoint (env: MAS_CONNECT_RELAY_URL)
--port <n>          Force the local code-server port (default: random)
--no-confirm        Skip the safety prompt (NOT recommended)
--keep-data-dir     Keep the temp VS Code user-data dir on exit (debug)
-h, --help          Show help
-v, --version       Show version

Trust model

code-server runs with --auth none because there is no documented way to pre-authenticate a code-server iframe across origins. The trycloudflare URL itself is the secret:

  • It is <~25 random chars>.trycloudflare.com.
  • It is only sent to your lesson tab over our authenticated WSS relay.
  • It is never logged or persisted server-side.
  • It expires when this CLI exits.

The lesson tab will be able to read, edit, and execute any file inside the workspace folder you chose — including via the integrated terminal. Pick a workspace folder that does not contain secrets you don't want to expose to the lesson.

Compared to @myanalyticsschool/connect

| | connect | connect-ide | |---|---|---| | What's mirrored | One shell (PTY bytes) | Full VS Code (HTTPS iframe) | | Local tool needed | Just Node | code-server + cloudflared | | Bytes in iframe path | Browser ↔ relay ↔ CLI | Browser ↔ Cloudflare ↔ local | | Off-by | exit in shell | Ctrl-C in this CLI |

Both use the same relay endpoint and the same session token — your lesson scene picks which mode to use.