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

cssh-client

v1.0.3

Published

CodeStuff Secure Shell (CSSH) client — connect to a remote CSSH session from your terminal.

Readme

cssh-client

CodeStuff Secure Shell — connect to your Coder Copilot cloud shell from your local terminal.


Requirements

  • Node.js v18 or later + npm
  • jqjqlang.github.io/jq
  • curl — included on macOS, Linux, and Windows 10 1803+

Installation

npm i cssh-client

This installs the cssh CLI command globally (or locally under node_modules/.bin/cssh).


How it works

CSSH is a two-sided protocol:

| Side | Who | What they do | |---|---|---| | Server | You, in the Coder Copilot browser shell | Run cssh <password> -start to generate a session key | | Client | You (or someone you share the key with), on any machine | Run cssh <password> remote <userId>/<key> to connect |

When a command is typed in the client terminal, it is queued on the Coder Copilot worker. The browser shell picks it up, executes it, and posts the output back. The client prints the output and shows the next prompt.


Usage

1. Start a session (in the browser shell)

Open the Cloud Shell and run:

cssh <password> -start

This verifies your account password, generates a SHA3-256 session key, and prints a connection string:

userId/64-char-hex-key

2. Connect from your terminal

cssh <password> remote <userId>/<key>

You'll see a prompt like username@cc:~$. Every command you type is forwarded to your browser shell and the output is streamed back.

3. Disconnect

Type exit or quit at the prompt, or press Ctrl-D.

cssh -dc remote <userId>/<key>

CLI reference

| Command | Description | |---|---| | cssh <password> remote <userId>/<key> | Connect to a CSSH session | | cssh -dc remote <userId>/<key> | Disconnect a session | | cssh --help | Show usage |

The shell also supports cssh -dc inline from within an active session.


Platform scripts

The package ships three equivalent implementations — use whichever fits your environment:

| File | Platform | Requirements | |---|---|---| | cssh.js | Node.js (any OS) | Node ≥ 18 | | cssh.sh | Bash (macOS / Linux / WSL) | curl, jq | | cssh.bat | Windows CMD | curl (built-in Win10+), jq |

cssh.sh and cssh.bat do not require Node — they talk to the worker directly with curl and parse JSON with jq.


JavaScript API

You can also use cssh-client programmatically:

const { connect, exec, waitForResult } = require('cssh-client');

// Validate a connection string and get session info
const session = await connect('userId/64-char-key');
// → { valid, userId, key, username, expiresAt }

// Enqueue a command for the browser shell to run
const cmdId = await exec(session.userId, session.key, 'ls');

// Poll until the browser shell posts back the output
const { status, output } = await waitForResult(session.userId, session.key, cmdId);
console.log(output);

connect(connectionString)

Parses a <userId>/<key> connection string, validates it against the worker, and returns session info.

connectionString  string   "<userId>/<key>"
→ Promise<{ valid, userId, key, username, expiresAt }>

Throws if the string is malformed, the key is invalid, or the session has expired.

validateSession(userId, key)

Lower-level validation — takes userId and key separately.

userId  string   user ID that owns the session
key     string   SHA3-256 hex key (64 chars)
→ Promise<{ valid, username, expiresAt, error? }>

exec(userId, key, command)

Enqueues a command for the browser shell to execute. Returns a cmdId.

userId   string   session owner
key      string   session key
command  string   command to run (max 4096 chars)
→ Promise<string>  cmdId

waitForResult(userId, key, cmdId, opts?)

Polls the worker until the browser shell posts back the result.

userId     string
key        string
cmdId      string    returned by exec()
opts       object
  intervalMs  number   poll interval in ms  (default: 1000)
  timeoutMs   number   give-up timeout in ms (default: 30000)
→ Promise<{ status: 'done'|'error', output: string }>

Throws if the timeout is reached before a result arrives.


Session key format

<userId>/<sha3-256-key>
  • userId — the Coder Copilot user ID of the session owner (alphanumeric)
  • key — 64-character lowercase hex SHA3-256 value, generated server-side from random bytes
  • Sessions expire after 24 hours or when the owner runs cssh -stop

Links


License

MIT © FireSmasher