Reevit CLI
Thereevit 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
These npm and Go commands use published CLI 0.7.1, verified against npm and the GitHub release tag. CLI 0.7.2 is a prepared candidate and is not published yet.Set up your project
init walks through everything a new integration needs:
- Login, in the browser. If the CLI has no key yet it opens
dashboard.reevit.iowith 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 with0600permissions. 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,
initoffers a signature-verified webhook handler, a checkout component with a runnable demo route, and a server-side client with a payment-intent example. Pick interactively, or use--goal full|checkout|webhook|server,--target,-yfor the recommended setup,--dry-runto preview. - Env wiring. Project-scoped test credentials and
REEVIT_ORG_IDgo into.env.local/.env, placeholders into.env.example, and the env file is added to.gitignoreif nothing covers it yet.
init is always safe. When a previous setup is detected, the wizard can keep
missing pieces only, replace generated files (with backups), or start fresh.
init always uses test-mode credentials, 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>.Place checkout on an existing page
When checkout is selected, the wizard can insert the generated button into an existing React/Next, Vue, or Svelte page and configure which fields the form collects. Page edits use an idempotentreevit-checkout marker block.
In interactive mode the CLI asks for the same choices. Customer values are
exposed to workflows as
customer_name, customer_email, and
customer_phone; custom keys become metadata_<key> (for example
metadata_order_id).
Verify the setup
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
- env vars, simulator, and allowed checkout origin are wired
--webhook-url and your dev server running, it goes one step further and
proves your webhook wiring both ways:
- It signs a synthetic
payment.succeededwith theREEVIT_WEBHOOK_SECRETfrom 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.
Test with real events
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
Configuration via env vars (override the config file):
REEVIT_API_KEY,
REEVIT_API_URL, REEVIT_MODE, REEVIT_CONFIG.
