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

cmd-agent

v1.0.2

Published

Local MacBook agent for cmd — Remote Terminal Control

Readme

cmd-agent

The local MacBook agent for cmd.cvasingh.com — Remote Terminal Control.

Connects to cmd.cvasingh.com and spawns real PTY sessions on your machine, bridging your browser to a live terminal over WebSocket.

How it works

Browser (xterm.js)
  ↕  Ably channel: terminal:{sessionId}
cmd-agent (node-pty on your Mac)
  ↕  Ably channel: control:{deviceId}
Next.js backend (cmd.cvasingh.com)

No API keys to configure — the agent authenticates by logging in through your browser. A deviceId is issued on approval and saved locally.

Requirements

  • Node.js 18+
  • macOS (Linux also works)

Install

npm install -g cmd-agent

Usage

First run

cmd-agent

You will be asked for one thing:

Device name (e.g. My MacBook) :

The agent opens cmd.cvasingh.com/connect in your browser. Log in with your account, click Approve Device, and the agent connects automatically.

Config is saved to ~/.cmd-agent (readable only by you).

Subsequent runs

cmd-agent

Reads saved config and starts immediately — no prompts.

Commands

| Command | Alias | Description | |---|---|---| | cmd-agent | | Start the agent | | cmd-agent --login | -l | Re-run browser login (keeps device name) | | cmd-agent --logout | | Clear saved login, require re-login on next start | | cmd-agent --reconfigure | -r | Full reset: re-enter device name + re-login | | cmd-agent --status | | Show current device name, ID, and config path | | cmd-agent --version | -v | Show installed version | | cmd-agent --help | -h | Show help |

Re-login (same device, new session)

cmd-agent --login

Switch account or revoke and re-approve

cmd-agent --logout   # clears deviceId
cmd-agent            # triggers login flow again

Full reset (rename device + new login)

cmd-agent --reconfigure

Running in the background with pm2

npm install -g pm2
cmd-agent                               # complete browser login first, then Ctrl-C
pm2 start $(which cmd-agent) --name cmd-agent
pm2 save
pm2 startup                             # auto-start on login

Config file

~/.cmd-agent is managed automatically:

{
  "deviceName": "My MacBook",
  "deviceCode": "...",
  "deviceId": "..."
}

Delete this file or run cmd-agent --logout to start fresh.

Author

Shiva Singhcvasingh

License

MIT