Skip to main content
FetchSandbox Docs

CLI reference

FetchSandbox CLI

Run any FetchSandbox workflow from your shell. Pipe results into CI/CD. Drop the verified-skill file into Cursor or Claude Code so the agent runs the same commands you do.

Install

$ npm install -g fetchsandbox

Requires Node 18+. Source on GitHub, package on npm.

Quickstart

# 1. Create a sandbox from any OpenAPI spec
$ fetchsandbox generate stripe
# 2. Run a multi-step workflow against it
$ fetchsandbox run stripe accept_payment
# 3. Pipe into CI/CD with JSON output
$ fetchsandbox run stripe accept_payment --json --preflight

Commands

17 commands total. The most-used is run — it has the most flags and is what your agent or CI invokes.

fetchsandbox generate <spec>

Create a sandbox from an OpenAPI spec (URL or file path).

$ fetchsandbox generate stripe
fetchsandbox list

List your sandboxes.

$ fetchsandbox list
fetchsandbox delete <id>

Delete a sandbox.

-f, --force
$ fetchsandbox delete abc123 --force
fetchsandbox endpoints <id>

List the endpoints in a sandbox.

-s, --search <term>
$ fetchsandbox endpoints stripe --search payment
fetchsandbox docs <id>

Print the docs for a sandbox to your terminal.

$ fetchsandbox docs stripe
fetchsandbox workflows <id>

List workflows for a sandbox.

-n, --name <name>
$ fetchsandbox workflows stripe --name accept_payment
fetchsandbox request <id> <method> <path>

Send a raw HTTP request through the sandbox.

-d, --data <json>
$ fetchsandbox request stripe POST /v1/customers -d '{"email":"[email protected]"}'
fetchsandbox run <id> [workflow]

Execute a workflow. The most-used command — supports failure scenarios, JSON output for CI/CD, and proof-checking.

--all--scenario <name>--verbose--json--preflight
$ fetchsandbox run stripe accept_payment --json --preflight
fetchsandbox status <id>

Print a one-shot status snapshot of the sandbox.

$ fetchsandbox status stripe
fetchsandbox logs <id>

Show recent request logs.

-f, --follow--status <code>-l, --limit <n>
$ fetchsandbox logs stripe --follow --status 4xx
fetchsandbox scenario <id>

View or set the active failure scenario for a sandbox.

-n, --name <name>
$ fetchsandbox scenario stripe -n auth_failure
fetchsandbox state <id> [resource]

Inspect resource state inside the sandbox.

--id <resource-id>
$ fetchsandbox state stripe customers --id cus_abc
fetchsandbox reset <id>

Reset a sandbox to its initial state.

$ fetchsandbox reset stripe
fetchsandbox diff <id>

Show recent mutations applied to the sandbox.

--last <n>
$ fetchsandbox diff stripe --last 10
fetchsandbox webhook-listen <id>

Tail webhook events as they fire.

--verbose--event-type <type>
$ fetchsandbox webhook-listen stripe --event-type payment_intent.succeeded
fetchsandbox skill <id>

Generate a verified-skill file for an AI agent (Cursor / Claude Code).

--output <file>
$ fetchsandbox skill stripe --output ./.fetchsandbox/
fetchsandbox check <id>

Health check — verify the sandbox is reachable and healthy.

$ fetchsandbox check stripe

Common patterns

CI/CD: assert your integration before deploy

Run the workflow with --preflight --json to get a pass/fail you can pipe into your pipeline.

fetchsandbox run stripe accept_payment --preflight --json | jq '.passed'

Test failure handling without touching production

Switch to a failure scenario, run the workflow, see how your handler behaves.

fetchsandbox run stripe accept_payment --scenario auth_failure

Agent integration via verified-skill files

Generate a skill file, drop into your AI agent's context. The agent reads the spec, calls the sandbox, integrates without inventing endpoints.

fetchsandbox skill stripe --output ./.fetchsandbox/
← Back to homeBrowse the catalogSource on GitHub