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

@thecrossroads42/cli

v0.1.0

Published

Thin terminal client for The Crossroads — drives a visit over the public HTTP + Socket.IO API. The same client doubles as the eval-harness driver in --json mode.

Readme

The Crossroads — terminal client

A thin command-line client for The Crossroads. It talks to the backend only through the public HTTP + Socket.IO API — the same contract every client uses — so it doubles as a worked reference for building your own client or agent. See the API documentation for the full contract.

Install

Try it in one line — no clone, no install (grab a key from Authenticate first):

npx @thecrossroads42/cli --api https://thecrossroads.to --token tcr_<userId>.<secret>

Or install the crossroads command globally:

npm install -g @thecrossroads42/cli

Requires Node ≥ 18 (for global fetch); the only runtime dependency is socket.io-client. The examples below use crossroads — substitute npx @thecrossroads42/cli, or node cli from a clone of this repo, as you prefer; they run the same program.

Authenticate

Generate a personal API key in the app under Settings → API Access. It looks like tcr_<userId>.<secret> and is shown once — copy it then. Pass it with --token, or set CROSSROADS_TOKEN in the environment.

Use

# start a new visit (reads your messages from stdin, one per line)
crossroads --api https://thecrossroads.to --token tcr_<userId>.<secret>

# list your visits
crossroads --token tcr_... --list

# rejoin / delete a visit
crossroads --token tcr_... --resume <id>
crossroads --token tcr_... --delete <id>

--api (or the API_URL env var) points at the backend; it defaults to http://localhost:3001 for local development. Set CROSSROADS_TOKEN in the environment to skip the repeated --token.

Driving an agent (--json)

--json switches to a machine-readable mode: stdout becomes one NDJSON record per line — a version record at startup, one turn record per greeting/chat (carrying the authoritative done payload plus the raw delimiter text), and an end record. Feed it a question on stdin, read the turn, decide the next line. This is the same interface the eval harness uses.

Encrypted accounts

If your account uses client-side encryption, the CLI reads/writes it via @thecrossroads42/crypto-client (installed automatically as an optional dependency):

  • managed tier — works automatically.
  • passphrase tier — pass --passphrase <p> or set CROSSROADS_PASSPHRASE; the CLI unlocks locally and never transmits the passphrase.
  • device / passkey tier — not supported (the key is bound to its original device); use the app.

A plaintext account (the default) needs none of this. A plaintext write to an encrypted account is refused by the server (ENCRYPTION_INCOMPATIBLE).

What a key can and can't do

The key acts as your account: visits run on your credits, and the one live visit at a time rule applies (a key and the app share that single live visit). A key cannot move credits out of your account or change your account settings. If a key leaks, revoke it in Settings → API Access — revocation takes effect immediately.

Note on this repository

This is the published copy of the reference client. It is developed in The Crossroads' private repository and mirrored here, so please open issues at github.com/thecrossroads42/theCrossroads rather than sending pull requests against this copy.