Build agent interfaces from your API

Create and deploy a CLI in minutes with Petl

Built by engineers from

CoinbaseNotionAmazonGoogleMercor

Agents ❤️ CLIs

Andrej Karpathy on CLIs and agents
Garry Tan on CLIs and agents
greg on CLIs and agents

What each CLI ships with

Every command, designed for agents.

bash — 80×24
$

FAQ

Common questions

MCPs expose tools over a JSON-RPC protocol and typically run as a sidecar process. petl generates a standalone binary — no server, no protocol overhead. Agents invoke it like any shell command and get structured JSON back. It composes with pipes, works in CI, and doesn't inflate your token budget.

No. You point the generator at your OpenAPI spec and it emits a complete Go project — commands, flags, auth, pagination, output formatting — all from the spec. The only thing you configure is the CLI name, env-var prefix, and Go module path.

OpenAPI 3.0 and 3.1. JSON and YAML. The parser resolves $ref chains, handles circular references, and validates the spec before generating anything.

Run ./mycli --schema and the CLI emits a machine-readable JSON document describing every command group, flag, auth scheme, and output format. Agents read this once, cache it, and never need to trial-and-error. There's also --usage per-command for inline introspection.

The generator is template-based and deterministic — same spec in, same code out. You can fork the generated project and edit it freely. For common customizations (renaming commands, hiding operations) we're building x-cli extensions into the spec directly so customizations survive regeneration.

API key (header and query param) and HTTP Bearer. OAuth flows are planned for v2. Credentials resolve from CLI flags, environment variables, and a config file in that order of precedence.

Built for the agent era.

Generate your CLI.