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

@zkp2p/peer-pay-cli

v0.8.0

Published

Test Peer Pay locally and manage your merchant account from the terminal

Readme

Peer Pay CLI

Test Peer Pay locally and manage your merchant account from the terminal. Requires Node.js 22 or newer.

npm install -g @zkp2p/peer-pay-cli

Run peer-pay-cli in a terminal for the interactive menu. Without a terminal, no command prints help to stderr and exits 2.

Test locally

Start the mock backend in one terminal:

peer-pay-cli serve --state ./peer-pay.json

In another terminal, register your local webhook handler and create an order:

peer-pay-cli --local webhooks create --url http://localhost:3000/webhooks/peer-pay --events ORDER_FULFILLED
peer-pay-cli --local orders create --amount 10
peer-pay-cli --local payments create ORDER_ID --rail venmo
peer-pay-cli --local simulate ORDER_ID --event PAYMENT_SETTLED
peer-pay-cli --local status

Replace ORDER_ID with the returned order ID. The mock listens on 127.0.0.1:4020; your webhook handler stays on localhost. No account, database, or tunnel is needed. The mock serves API endpoints only. No money moves.

Set up your merchant

peer-pay-cli login --email [email protected]
peer-pay-cli setup

Enter the email verification code, answer the setup questions, and review the changes before applying them. The same CLI manages payment settings, webhooks, team invitations, API keys, and hosted sandbox tests.

Email sessions refresh only for management requests when the saved access token is missing or expired, or once after a 401. API-key commands and credentials export do not contact Privy. A management request performs at most one refresh.

Setup requires a hosted profile and offers inline sign-in in a terminal. For scripts, use peer-pay-cli setup --file setup.json --dry-run or --yes after signing in. Run peer-pay-cli sandbox enable to enable, save, and activate the remote sandbox profile in one step.

Continue with a coding agent

peer-pay-cli handoff --harness codex --project ./my-store --launch

Supports Codex, Claude Code (claude), OpenCode (opencode), and Gemini CLI (gemini). Install your chosen agent separately. In a terminal, peer-pay-cli handoff asks for the agent, project directory, and whether to launch. Use --harness prompt for instructions only. In scripts, omit --launch to save instructions without launching. You can also pass --harness, --project, and --launch to setup to continue with the agent after applying your merchant settings. Handoff prompts contain profile references, not credentials.

Help

peer-pay-cli --help
peer-pay-cli orders --help
peer-pay-cli orders create --help

Login names and activates your merchant profile automatically; --profile NAME can name it explicitly. After login, commands target your Peer Pay account. Add --local to target the mock, or run peer-pay-cli use local. Selection is --profile NAME > --local > active profile > saved local. profiles marks the active profile; status reports profile and mode; logout clears the active selection when removing that profile. Serve never changes the active profile. --json returns structured output; piped output is JSON automatically. Credentials are redacted by default. Export them directly to a new private file:

peer-pay-cli credentials export --output .env.peer-pay --webhook-id WEBHOOK_ID

Keep exported credentials and local state out of version control.

Signing in again replaces the profile's API key with the server-authorized key. If the server withholds the key (for example, for a cashier), saved API keys, order tokens, and webhook secrets are cleared. Removing cached credentials does not revoke previously copied merchant keys; revoke them by rotating the merchant key.

Develop from this repository

npm run dev:peer-pay-cli -- --help
npm run build:peer-pay-cli
npm --workspace apps/peer-pay-cli run test
npm --workspace apps/peer-pay-cli run typecheck
npm --workspace apps/peer-pay-cli run lint
npm pack --workspace apps/peer-pay-cli

The npm artifact bundles the local server and installs the official Privy SDK for hosted authentication. It does not require repository files after installation.