CLI
The extend CLI gives you direct terminal access to Extend’s document operations: parse, extract, classify, split, edit, and run workflows. Reach for it for quick one-off jobs, batch processing, scripting, and CI/CD pipelines. No application code required.
Building a durable integration in your own codebase? Use an SDK (Python, TypeScript, Java, Go) instead. They ship typed clients, polling helpers, and webhook verification.
Installation
Install script
Homebrew
npm
Go
Works on macOS and Linux. The script verifies the release checksum and installs to a directory already on your PATH; see its options with curl -fsSL https://extend.ai/install.sh | sh -s -- --help.
You can also download a signed binary from the releases page. Confirm the install with extend --version.
The CLI’s npm package is @extend-ai/cli, not to be confused with extend-ai, which is the JavaScript/TypeScript SDK. Install @extend-ai/cli for the extend command, and extend-ai for the typed client library.
Setup
The fastest way to get configured is the setup wizard:
It asks how you want to sign in (through your browser with no API key, or with an API key), picks your region, walks you through the rest, and installs the agent skill. Everything it does can also be configured by hand, as described below.
Authentication
The CLI accepts two kinds of credentials:
- Browser login (
extend setup, orextend logindirectly) is best on your own machine: nothing to create or copy, tokens are stored securely and refresh on their own, and the session is scoped to the workspaces and environments you approve.extend logoutrevokes it. - API keys are long-lived and headless, the right choice for scripts, CI, and agents. Save one with
extend setup, or grab a key from the Developers page and set environment variables directly:
When several sources are configured, EXTEND_API_KEY wins (or EXTEND_<LABEL>_API_KEY under --env <label>), then the API key saved by extend setup, then the stored extend login session.
Check who you’re signed in as with extend whoami (or extend config for the full picture), and verify the connection with a read-only command that spends no credits:
For token storage details and troubleshooting, run extend help auth.
Quick examples
Every command takes an <input>: a local file path (uploaded for you), an Extend file_xxx ID, or a publicly reachable https:// URL, across 35+ file types. Results are written to stdout, so redirect them to a file (> result.json) for anything large.
Commands
parse
Convert a document into clean markdown chunks. No configuration required.
extract
Pull structured data into JSON. Pass an inline --config for prototyping, or reference a saved extractor with --using and tweak a single run with --patch.
Schemas validate strictly and every field must be nullable. Keep yours in a file so each fix is incremental, and see the schema reference for custom field types like dates and currency.
classify
Label a document’s type using a saved classifier.
split
Break a multi-document bundle into segments using a saved splitter.
edit
Fill a PDF form’s fields and get back a filled PDF. Use natural-language --instructions for quick fills, or scaffold a schema with detect-form for repeatable, structured fills.
detect-form
Detect a PDF’s form fields and scaffold an edit schema you can hand-edit and pass to extend edit --schema. The command waits for the form detection run by default and prints it with the generated schema under output.schema; pass --wait=false to detach and follow up with extend detect-form runs get|watch <id>.
workflows run
Run a saved workflow, a multi-step pipeline that chains the operations above.
batch
Add batch to any processing command to run across many files at once (extend workflows run batch for workflows).
Managing resources
Beyond processing, the CLI inspects runs and manages the resources behind them. Run commands live under the verb that produced the run, so an ID’s prefix tells you where to look (exr_ is extract runs, pr_ is parse runs, and so on):
Not every kind supports every operation: parse and edit runs cannot be cancelled, edit runs cannot be listed, form detection runs support only get and watch, and only workflow runs support update. Workflow batches have no status endpoint; track them with extend workflows runs list --batch <id>.
Create a saved extractor without leaving the terminal:
Run extend <command> --help for the full flag list on any command, and see the CLI on GitHub for the complete reference.
Output and scripting
-o <format>:json,yaml,raw,id,table, ormarkdown.--jq '<expr>': filter structured results with the built-in jq, e.g.--jq '.output.value.invoice_id' -o raw(no separatejqinstall needed).
Data goes to stdout and status to stderr, so you can pipe results cleanly. The CLI honors NO_COLOR and CLICOLOR_FORCE.
Agent skill
The CLI can describe itself to coding agents as an installable skill: a SKILL.md (following the agentskills.io standard) that teaches harnesses like Claude Code, Codex, Cursor, OpenCode, and Goose how to drive extend correctly. extend setup installs it for you; to install or refresh it directly:
This writes ~/.agents/skills/extend-cli/SKILL.md, the path Codex, OpenCode, Cursor, and most other harnesses read, and symlinks it into ~/.claude/skills/extend-cli for Claude Code. To scope the skill to one project instead of your whole machine:
Or print it to stdout to redirect anywhere with extend skill > SKILL.md. The skill is generated from the CLI’s own command tree, so re-run extend skill install after upgrading to pick up new commands and flag changes. For the full agent setup, including the MCP server and the platform context file for writing SDK code, see the Agent Quickstart.
The CLI is under active development. Commands, flags, and output formats may change. If you depend on a specific output shape (for example in CI), pin to a specific release tag.
Next steps
Set up a coding agent to drive Extend, including the installable CLI skill.
Build durable integrations in Python, TypeScript, Java, or Go.
Give chat and tool-calling clients the whole platform as MCP tools.
Call the Extend API directly for more advanced integrations.

