InboxSpecDocumentation

Developer tools

Command line

Use the InboxSpec CLI in a terminal or test runner.

First follow client installation and set your API address and project key in the terminal environment. The examples below also support a repository checkout.

Alternative: CLI from a source checkout

Run from the repository root. The function makes the commands in this guide available in the same Bash terminal.

Example
bun install --frozen-lockfile
export INBOXSPEC_CHECKOUT="$PWD"
inboxspec() { bun run "$INBOXSPEC_CHECKOUT/packages/cli/src/bin.ts" "$@"; }
inboxspec --help

Run the first-email recipe, then use inboxspec messages body "$MESSAGE_ID" --format text. Wait exits 0 for a match, 1 for a timeout, 2 for invalid usage, 3 for authentication, 4 for limits and 5 for service failures. Ctrl+C cancels the client; do not retry indefinitely.