@zkp2p/peer-pay-cli
v0.12.0
Published
Test Peer Pay locally and manage your merchant account from the terminal
Keywords
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-cliRun peer-pay-cli in a terminal to choose from a menu, or
peer-pay-cli --help to list commands.
Test locally
Start the mock backend in one terminal:
peer-pay-cli serve --state ./peer-pay.jsonIn another terminal, register your local webhook handler and run 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 statusReplace ORDER_ID with the returned order ID. The mock listens on
127.0.0.1:4020 and calls your localhost handler directly. No account, database,
or tunnel is needed, and no money moves.
Set up your merchant
peer-pay-cli login --email [email protected]
peer-pay-cli setupEnter the code from the email, answer the setup questions, and review the changes
before they apply. For scripts, sign in first and run
peer-pay-cli setup --file setup.json --dry-run or --yes.
peer-pay-cli sandbox enable enables your hosted sandbox and switches to its
profile.
Continue with a coding agent
peer-pay-cli handoff --harness codex --project ./my-store --launchSupports Codex (codex), Claude Code (claude), OpenCode (opencode), and Gemini
CLI (gemini); install the agent separately. Use --harness prompt to only write
the instructions. The instructions name your profile but contain no credentials.
Handoff also starts a setup run that your Peer Pay dashboard follows: the agent
reports its milestones with peer-pay-cli progress, and handoff reports when the
agent exits.
Profiles and credentials
Login saves your merchant as a profile and makes it active, so commands then
target your Peer Pay account. Add --local, or run peer-pay-cli use local, to
target the mock. peer-pay-cli profiles lists saved profiles.
Output redacts credentials. Export them to a new private file instead:
peer-pay-cli credentials export --output .env.peer-pay --webhook-id WEBHOOK_IDKeep exported credentials and local state out of version control.
