CLI and coding agents

The Jitterbox CLI does everything the dashboard does: projects, endpoints, failure scenarios, requests, reports and CI runs. It's built so a coding agent (Claude Code, Codex, and the like) can set Jitterbox up for you: every command takes --json, nothing prompts, and exit codes are stable.

npx jitterbox login   # opens the browser to approve the CLI
npx jitterbox guide   # the how-to written for agents

Needs Node 18 or newer.

Signing in

jitterbox login prints a short code and opens Jitterbox in the browser. Check the code matches and approve: the CLI gets a personal token that acts as you, with your role in each workspace. Tokens are listed and revocable in Settings → Account → Personal tokens, where you can also create one by hand for CI or an agent's sandbox (JITTERBOX_TOKEN=jbp_…).

A personal token can't create more tokens, approve other sign-ins or delete your account; those stay in the dashboard. A project API key (jb_…, Settings → API keys) is narrower still: it can only switch failure scenarios and read results, for CI.

Config as code

Describe the fake API in jitterbox.yaml, then jitterbox apply:

project: payments-api            # created if it doesn't exist
endpoints:
  - method: POST
    path: /payments
    status: 201
    json: { id: pay_123, status: succeeded }
scenarios:
  - name: Flaky gateway
    endpoints: ["POST /payments"]
    faults:
      - error: 503
        rate: 20%
      - latency: 500-3000ms

jitterbox diff shows what would change and jitterbox pull writes your project to the file. Endpoints are matched by "METHOD /path" and scenarios by name; fields you leave out keep their values, and nothing is deleted unless you pass --prune.

Telling your agent about it

Add a line to your repo's AGENTS.md or CLAUDE.md:

To mock or break third-party APIs in tests, use the Jitterbox CLI. Run npx jitterbox guide first.

The guide covers signing in, picking a project, the YAML format, every fault kind, and a typical "make our client resilient" task from start to finish.

Set up a project from your code

Want the agent to do the whole setup? Copy the prompt from Set up with your coding agent (on Home, an empty Endpoints page, or Settings → General) and paste it into Claude Code, Codex or Cursor. The agent finds the APIs your code calls, describes them in jitterbox.yaml, shows you the diff before applying it, adds a failure scenario or two, points your tests (never production) at the project's base URL, and runs them with jitterbox run. You approve the sign-in in your browser, so no token ever goes in the prompt.