- authenticate
- build an API from a URL
- inspect its published contract
- call endpoints
- revise or rebuild later
- export OpenAPI or MCP
- install the hosted MCP server into local agent clients
session_required endpoint calls, run the API’s login endpoint first, then pass the returned session_id and encryption_key with peel call --session-id ... --encryption-key ....
Install status
The public npm release is not live yet. The package name is
@peel/cli, but for now the supported install path is a source checkout.Run it today from source
https://api.peel.sh. Browser auth and peel open still take you to the Peel app at https://peel.sh. Override the API host with PEEL_API_BASE_URL, legacy PEEL_BASE_URL, or --base-url when you want to point at another deployment.
First-time setup
peel setup is the canonical onboarding path.
- authenticates you
- installs MCP config for detected agent clients
- runs
peel doctor
claude-codecodexcursorclaude-desktopall
--ci or --json for fully non-interactive setup. Passing --api-key and --target skips auth and MCP target prompts, but interactive setup may still offer coding-agent skill installation unless you opt into CI or JSON mode.
Auth flows
Browser device flow
peel auth login uses device-code browser auth by default.
POST /public/device/start and POST /public/device/exchange helpers; the browser approval step stays inside the signed-in Peel app.
Direct API key
For CI or headless environments, pass a key directly:Signup, status, and logout
signup is only available when the target server has public signup enabled. On peel.sh, signup is closed during private preview. Use peel auth login with an existing account or peel auth login --api-key ... with a key from settings.
Build, inspect, and call
peel buildwaits for completion by defaultmatched: truemeans Peel reused an existing compatible APIpeel apis getis the main contract-inspection command before runtime callspeel apis getshows endpointruntime_policyandruntime_verificationmetadata when Peel has deterministic runtime constraints or build-time verification evidence for an endpointpeel callaccepts repeatable-p key=value, full JSON with--params, or request JSON from--stdin- On successful HTTP responses,
peel callprints the same sanitized response envelope as REST:call:status,status_code,data,error,error_code,execution_time, and optionaltransport,session_id,encryption_key, andraw_output - On non-2xx responses,
peel callexits with a CLI error wrapper. Use--jsonwhen scripts need the runtime envelope under the wrapper’sdatafield. peel call --session-id ... --encryption-key ...sends target-site session credentials forsession_requiredendpoints
Check balance and health
peel credits before long build batches or expensive runtime calls. Use peel apis health before deciding whether to revise or rebuild, and to distinguish pending_build from build_failed when an API has not published a binding yet. For failed builds, peel apis health prints the same structured failure diagnostics as peel apis get.
Revise, rebuild, and respond
revisewhen the site is right but the requested shape is wrongrebuildwhen the site changed or the compiled evidence driftedrespondwhenpeel apis getshowsstatus: needs_input
revise and rebuild support --yes and --dry-run.
Export and MCP
peel setup or peel mcp add when you want your local agent client to talk to the hosted MCP server directly.
Open the hosted app
peel open launches the hosted app in a browser. Passing an api-id opens that API directly.
Machine-readable mode
Most commands support--json. Use it for CI, agent wrappers, and shell pipelines.