Restaq
CLI

relay dev

Run your app's dev server and tail live execution activity.

Start your application's dev server (typically pnpm dev) and tail new executions as they're processed.

Usage

relay dev [--dir <path>]

Options

FlagDefaultDescription
--dircurrent directoryPath to the project root (where package.json is)

What it does

  1. Spawns pnpm run dev in the given directory (or current directory if --dir is not set)
  2. Loads relay.ts from that same directory and polls it every 1 second for new executions, printing them to the terminal — works with whatever database dialect your relay.ts configures
  3. Captures SIGINT (Ctrl+C) and gracefully shuts down both processes

Each line shows the status icon ( completed, failed, pending), event type, attempt number, and execution ID.

Examples

# Run dev server in current directory, tail executions
relay dev

# Run dev server in a subdirectory
relay dev --dir path/to/app

Output:

[relay dev] starting dev server in /Users/alice/myapp
[relay dev] watching for executions...
✔ stripe.charge.succeeded (attempt 1) evt_a1b2c3d4...
✔ test.ping (attempt 1) test_1234...
✖ stripe.charge.succeeded (attempt 2) evt_e5f6g7h8...

Requirements

  • The dev server must be runnable via pnpm run dev
  • A relay.ts in the target directory, for the execution feed

Without a relay.ts

If relay.ts can't be found or fails to load, relay dev simply runs the dev server without the execution feed:

[relay dev] starting dev server in /Users/alice/myapp
[relay dev] Could not find relay.ts in /Users/alice/myapp. Run "relay init" first, or pass --dir. - skipping live execution feed

This is fine for quick testing, but you won't see the live feed of executions.

Testing during dev

While relay dev is running, you can test webhooks in another terminal:

# Test with a signed Stripe event (same secret as the running app)
STRIPE_WEBHOOK_SECRET=whsec_dev relay trigger stripe charge.succeeded \
  --data '{"id":"ch_1234","amount":1000,"currency":"usd"}'

# Watch the execution appear in the relay dev tail

See relay trigger for more testing examples.

On this page