Reevit CLI
The reevit CLI gets Reevit into your project in one command and gives you a
tight local loop for testing: trigger real sandbox payments, stream signed
webhooks to your dev server, and verify the whole setup end to end.
Install
brew install reevit-platform/tap/reevit
npm install -g @reevit/cli
go install github.com/Reevit-Platform/cli@latest
Prebuilt binaries for every platform are on the
releases page.
Set up your project
cd your-project
reevit init
init walks through everything a new integration needs:
- Login, in the browser. If the CLI has no key yet it opens
dashboard.reevit.io with a pairing code. Check the code matches your
terminal, pick your organization, and approve — a test-mode API key is
minted for the CLI, delivered once, and stored locally with 0600
permissions. No copy-pasting keys.
- Stack detection. Next.js, React, Vue, Svelte, Node/Express, Go, PHP,
and Python are recognized, including TypeScript-vs-JavaScript and
src/
layouts. Every JS package manager with a lockfile is detected — repos that
keep multiple lockfiles get the SDK installed with all of them.
- Choose what to scaffold. Depending on the stack,
init offers a
signature-verified webhook handler, a checkout component
(ReevitCheckout), and a server-side client with a payment-intent
example. Pick interactively, or use --target webhook,checkout,client,
-y for everything, --dry-run to preview.
- Env wiring.
REEVIT_API_KEY (your test key) and REEVIT_ORG_ID go
into .env.local/.env, placeholders into .env.example, and the env
file is added to .gitignore if nothing covers it yet.
Existing files and env values are never overwritten — re-running init is
always safe.
init always uses a test-mode key, so nothing it scaffolds can touch real
money. When you’re ready for live traffic, create a live key in
Dashboard → Developers → API keys and run reevit login --key <live_key>.
Verify the setup
reevit doctor --webhook-url http://localhost:3000/api/webhooks/reevit
doctor checks each layer and exits non-zero if anything fails (CI-friendly):
- your CLI key is present and accepted by the API
- the project, SDK dependency, and scaffolded webhook handler are detected
REEVIT_API_KEY, REEVIT_ORG_ID, and REEVIT_WEBHOOK_SECRET are wired
With --webhook-url and your dev server running, it goes one step further and
proves your webhook wiring both ways:
- It signs a synthetic
payment.succeeded with the REEVIT_WEBHOOK_SECRET
from your env file and POSTs it — your handler must accept it.
- It sends the same payload with a tampered signature — your handler must
reject it.
A handler that passes both checks verifies real production deliveries by
construction.
Test with real events
# Stream signed test-mode events to your local handler
reevit listen --forward-to http://localhost:3000/api/webhooks/reevit
# In another terminal: fire outcomes by name
reevit trigger payment.succeeded
reevit trigger payment.timeout # exercises routing failover
trigger creates real sandbox payments through the simulator (nothing is
mocked — events come from the production pipeline), and listen forwards them
to your endpoint with production-valid X-Reevit-Signature headers. See
Test Your Integration for the full magic-amount
catalog.
Command reference
| Command | What it does |
|---|
reevit login | Browser pairing → test-mode key. --key to paste manually, --no-browser to print the URL |
reevit init | Detect, install, wire env, scaffold. --target, -y, --dry-run |
reevit doctor | Verify credentials, env, SDK, and (with --webhook-url) live signature checks |
reevit payments list | Recent payments in the current mode |
reevit trigger <event> | Fire a named outcome via the simulator |
reevit listen --forward-to <url> | Stream signed test-mode events to your endpoint |
Configuration via env vars (override the config file): REEVIT_API_KEY,
REEVIT_API_URL, REEVIT_MODE, REEVIT_CONFIG.