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

Prebuilt binaries for every platform are on the releases page.

Set up your project

init walks through everything a new integration needs:
  1. 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.
  2. 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.
  3. Choose what to scaffold. Depending on the stack, init offers 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, -y for the recommended setup, --dry-run to preview.
  4. Env wiring. Project-scoped test credentials 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 by default — re-running 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 idempotent reevit-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
With --webhook-url and your dev server running, it goes one step further and proves your webhook wiring both ways:
  1. It signs a synthetic payment.succeeded with the REEVIT_WEBHOOK_SECRET from your env file and POSTs it — your handler must accept it.
  2. 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

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.