raereverse-api-engineer

Scripted usage

Drive the CLI from another agent or a wrapper script with --no-interactive and --json.

The CLI can be driven by another agent, a CI job, or a wrapper script. Use agent --json or engineer --json for a single machine-readable result, list --json and show --json for history inspection, and run --no-interactive to avoid script-picker and dependency prompts.

When --json is set:

  • stdout contains exactly one JSON document (the final result).
  • stderr receives Rich logs and progress updates.
  • The process exits with a stable exit code.

Examples

Run an autonomous capture and read the result as JSON

reverse-api-engineer agent \
  --prompt "capture the public jobs api" \
  --url https://example.com/jobs \
  --json | jq

List and inspect runs

# empty history returns []
reverse-api-engineer list --json
 
# inspect a run
reverse-api-engineer show <run_id> --json

Run a generated script non-interactively

reverse-api-engineer run <run_id> --file api_client.py \
  --no-interactive --auto-install -- --org acme
  • --no-interactive: never open the script-picker or install confirm.
  • --auto-install: install missing deps on retry without asking.
  • Everything after -- is forwarded to the underlying script.

agent --json output schema

FieldTypeNotes
schema_versionintCurrently 1. Bumped on breaking changes.
status"ok" | "error"Top-level result.
run_idstring | nullStable id for follow-up show / engineer / run calls.
promptstringThe prompt passed in.
urlstring | nullOptional starting URL.
modestring | nullProvider used ("auto" for Playwright MCP, "chrome-mcp").
har_pathstring | nullAbsolute path to the captured HAR (recording.har).
script_pathstring | nullAbsolute path to the generated client when reverse engineering ran.
usageobjectNormalized token plus cost usage (input_tokens, output_tokens, cache_read_tokens, cache_write_tokens, total_cost_usd) plus raw SDK usage under raw.
errorstring | nullHuman-readable error message when status == "error".
error_kindstring | nullMachine-readable error category such as misuse, network, or engine_failure.

Exit codes

CodeMeaning
0Success.
1Runtime error (capture or engineering failed; details in error).
2Misuse: required arg missing under --no-interactive / --json.

For run, the exit code is the underlying script's return code on success, or 1 if no script was found, or non-zero if --no-interactive would otherwise have to prompt.