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

@prevu/cli

v0.2.3

Published

Command-line interface for Prevu — staging environments for coding agents.

Readme

@prevu/cli

Command-line interface for Prevu — staging environments for coding agents.

npm install -g @prevu/cli
prevu auth login
prevu env list

Install

npm install -g @prevu/cli

Requires Node.js ≥ 20.

Authenticate

Generate a personal access token at https://app.prevu.cloud/keys, then:

prevu auth login
# paste your token when prompted

The token is stored at ~/.prevu/config.json (mode 0600). For CI:

prevu auth login --with-token "$PREVU_TOKEN"
# or skip auth login entirely and pass --token / set PREVU_TOKEN

Resolution order: --token flag → PREVU_TOKEN env var → ~/.prevu/config.json.

Commands

auth login              Save your API token to ~/.prevu/config.json
auth logout             Remove the saved API token
auth whoami             Show the currently authenticated user

env list                List your environments
env get <slug>          Show one environment in detail
env create <slug>       Create a new environment
env destroy <slug>      Destroy an environment
env wait <slug>         Block until ready (SSH reachable)
env ssh <slug>          Open an interactive SSH session (append `-- <cmd>` to run non-interactively)
env ssh-command <slug>  Print the ssh command
env urls <slug>         Show SSH and exposed public URLs
env exec <slug> -- <cmd>  Run a single command on the env via SSH
env service start <slug> <name> -- <cmd>  Start a long-running service
env service list <slug>   List services in an env
env service logs <slug> <name>  Print service stdout/stderr
env service restart <slug> <name>  Restart a service safely
env service stop <slug> <name>  Stop a service safely
env expose <slug>       Expose a port (HTTPS or TCP)
env unexpose <slug>     Remove a port exposure

keys list               List your saved SSH keys

Run prevu <command> --help for command-specific options.

Services are lightweight Prevu-managed processes stored under /workspace/.prevu/services/<name> inside the env. Use them for dev servers instead of hand-written nohup/PID files.

env expose --format json includes a ready-to-use url field. Use env urls to show the SSH command and every exposed URL in one place.

SSH key handling

env create and env expose need an SSH public key. Resolution order:

  1. --ssh-public-key <body> — inline value.
  2. --ssh-key-file <path> — file path.
  3. --ssh-key-id <id-or-name> — already saved at https://app.prevu.cloud/keys.
  4. ~/.ssh/id_ed25519.pub, then ~/.ssh/id_rsa.pub — auto-discovered.

A pasted key is saved automatically (deduped by fingerprint), so the next call can use it via --ssh-key-id.

Output format

Default is a human-readable table. For agents and scripts:

prevu env list --format json
# {"data":[{"slug":"my-project",...}]}

prevu env create x --format json || echo "exit $?"

NO_COLOR=1 or --no-color disables ANSI color (only applies in table mode; JSON is always uncolored).

Exit codes

| Code | Meaning | |------|----------------------| | 0 | success | | 1 | generic error | | 2 | usage error | | 3 | not authenticated / forbidden | | 4 | not found | | 5 | conflict | | 6 | rate-limited | | 7 | server error (5xx) | | 8 | timeout |

Self-hosted control plane

PREVU_API_URL defaults to https://app.prevu.cloud. To point at a self-hosted instance:

export PREVU_API_URL=https://prevu.example.com
# or per-call: prevu env list --api-url https://prevu.example.com

Agent skills

If you're driving Prevu from Claude Code, Cursor, OpenHands, or another coding agent, install @prevu/skills — it bundles SKILL.md files that teach the agent how to use the CLI without burning trial-and-error tokens:

npm install -D @prevu/skills
npx skills experimental_sync -a claude-code   # or -a cursor / -a openhands

License

MIT