CLI Reference

Installation and Authentication

The ReqPour CLI runs via npx without global installation. All commands follow the pattern npx reqpour <command> [options].

To authenticate the CLI with your ReqPour account:

bash
npx reqpour login

This opens your default browser to the ReqPour login page. After authenticating, the browser redirects back and the CLI stores your session token locally. The token persists across terminal sessions until you explicitly log out.

To log out and remove the stored token:

bash
npx reqpour logout

To check your current authentication status:

bash
npx reqpour whoami

Listing Endpoints

View all your endpoints and their status:

bash
npx reqpour list

This displays a table with each endpoint's name, URL, creation date, and request count. The output includes both active and paused endpoints.

Example output:

NAME          URL                              REQUESTS  CREATED
my-stripe     https://abc123.reqpour.com       247       2026-01-15
github-hooks  https://def456.reqpour.com       89        2026-02-01
dev-testing   https://ghi789.reqpour.com       12        2026-03-10

The Relay Command

The relay command forwards incoming webhook requests from your ReqPour endpoint to a local URL:

bash
npx reqpour relay --to <target-url>

Options:

--to <url> (required): The local URL to forward requests to. Example: http://localhost:3000/api/webhooks.

--endpoint <name>: Specify which endpoint to relay from. If omitted, relays from your default endpoint. Example: --endpoint my-stripe.

The relay establishes a WebSocket connection to the ReqPour server and listens for incoming requests. Each request is forwarded to your target URL with the original method, headers, and body preserved. The path from the original request is appended to the target URL.

Example: if a request arrives at https://abc123.reqpour.com/stripe/webhooks and your target is http://localhost:3000, the relay sends the request to http://localhost:3000/stripe/webhooks.

The relay displays each forwarded request in the terminal:

POST /stripe/webhooks -> 200 (42ms)
POST /stripe/webhooks -> 200 (38ms)
PUT  /api/update      -> 500 (124ms) ← Error!

Environment Variables

The CLI supports the following environment variables:

REQPOUR_TOKEN: Set this to authenticate without running reqpour login. Useful for CI/CD environments or headless servers where browser-based login is not possible.

bash
export REQPOUR_TOKEN=your_api_token_here
npx reqpour relay --to http://localhost:3000

REQPOUR_API_URL: Override the API base URL. Used for self-hosted ReqPour instances. Default: https://api.reqpour.com.

bash
export REQPOUR_API_URL=https://reqpour.yourdomain.com/api
npx reqpour relay --to http://localhost:3000

These environment variables take precedence over stored configuration. You can also use a .env file in your project directory — the CLI reads it automatically if present.

Troubleshooting CLI Issues

If the CLI cannot connect, check these common issues:

"Authentication required" — Run npx reqpour login to authenticate, or set the REQPOUR_TOKEN environment variable.

"Connection refused" — Verify your local server is running and the target URL is correct. Check that the port matches your development server.

"WebSocket connection failed" — This usually indicates a network issue. Check your internet connection and firewall settings. The CLI needs outbound WebSocket access to wss://api.reqpour.com.

"Endpoint not found" — Verify the endpoint exists with npx reqpour list. If using --endpoint, ensure the name matches exactly.

For verbose logging, set the DEBUG environment variable:

bash
DEBUG=reqpour* npx reqpour relay --to http://localhost:3000

This outputs detailed connection and forwarding information for diagnosing issues.

Get started with ReqPour

Catch, inspect, and relay webhooks to localhost. Free to start, $3/mo for Pro.