Restaq
Reference

@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/cli

Or install globally:

pnpm add -g @restaq/cli
relay --help

Commands

CommandDescription
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

VariableRead byPurpose
RESTAQ_BASE_URLtrigger, replayBase URL for webhook/replay requests when --forward isn't passed. Defaults to http://localhost:3000
<PROVIDER>_WEBHOOK_SECRETtriggerSigns 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.

See also

On this page