@restaq/cli
CLI for Restaq migrations, development, and execution inspection.
restaq bundles this package's relay bin automatically — most projects
never need to install @restaq/cli directly. See CLI for the
zero-install npx restaq@latest init flow. Install it standalone only if
you want the CLI without the rest of restaq (e.g. a CI image that only
runs relay migrate).
Install
pnpm add -D @restaq/clinpm install -D @restaq/cliyarn add -D @restaq/clibun add -d @restaq/cliOr install globally:
pnpm add -g @restaq/clinpm install -g @restaq/cliyarn global add @restaq/clibun add -g @restaq/clirelay --helpCommands
| Command | Description |
|---|---|
init [--force] [--dir <path>] | Scaffold relay.ts + relay.handlers.ts and install packages |
migrate [--dir <path>] | Apply pending schema migrations |
dev [--dir <path>] | Run the app's dev server and tail executions live |
trigger <provider> <eventType> [--data] [--forward] | Simulate a signed provider webhook |
inspect <id> [--json] [--history] [--dir] | Show an execution's status, steps, and logs |
replay <id> [--forward] [--print] [--dir] | Replay a historical execution as a new one |
events list [--json] [--limit] [--dir] | List recent executions, newest first |
Every command except init and trigger loads relay.ts from --dir (defaults to cwd) — see the full page for each command for options, examples, and output.
Environment variables
| Variable | Read by | Purpose |
|---|---|---|
RESTAQ_BASE_URL | trigger, replay | Base URL for webhook/replay requests when --forward isn't passed. Defaults to http://localhost:3000 |
<PROVIDER>_WEBHOOK_SECRET | trigger | Signs the simulated webhook (e.g. STRIPE_WEBHOOK_SECRET) |
There's no DATABASE_URL here — migrate, dev, inspect, replay, and events list all load relay.ts and use whatever database client it configures.
Status icons
Executions and steps print as ✔ completed, ✖ failed, or … pending — used by dev, inspect, and events list.