extend-cli

module
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 9, 2026 License: MIT

README

extend-cli

[!WARNING] This CLI is under active development. The command surface, flags, and output formats are not yet stable and may change without notice. Pin to a specific tag if you depend on a particular shape of output.

A CLI for Extend.

Install

Install script (macOS, Linux):

curl -fsSL https://extend.ai/install.sh | sh

Homebrew (macOS, Linux):

brew install extend-hq/tap/extend

npm / npx (no install):

npx @extend-ai/cli --help
# or globally
npm install -g @extend-ai/cli

From source (requires Go toolchain):

go install github.com/extend-hq/extend-cli/cmd/extend@latest

Or grab a signed binary from the releases page. The install script downloads the latest release binary, verifies it with SHA256SUMS, and installs it to ~/.local/bin by default. To choose a different location, pass --bin-dir:

curl -fsSL https://extend.ai/install.sh | sh -s -- --bin-dir /usr/local/bin

Use with coding agents

The CLI ships a SKILL.md that teaches agent harnesses (Claude Code, Codex, OpenCode, Cursor, Goose, etc.) to use extend correctly without you having to spell out every command.

Install to the cross-client default path:

extend skill install

This writes ~/.agents/skills/extend/SKILL.md, the path Codex, OpenCode, Cursor, and most other harnesses look at. Claude Code reads from ~/.claude/skills/ instead, so point --target at it:

extend skill install --target ~/.claude/skills/extend/SKILL.md

Make sure to re-run extend skill install after upgrading to pick up new commands and flag changes.

Authenticate

export EXTEND_API_KEY=sk_xxx

Optional:

export EXTEND_REGION=us                        # us | us2 | eu (default: us)
export EXTEND_WORKSPACE_ID=ws_xxx              # for org-scoped keys

Examples

# extract structured data from a local PDF
extend extract invoice.pdf --using ex_abc

# parse to markdown
extend parse contract.pdf > contract.md

# run a workflow async; poll later
RUN=$(extend run doc.pdf --using workflow_abc -o id)
extend runs watch "$RUN"

# filter JSON with jq
extend extract invoice.pdf --using ex_abc --jq '.output.value.invoice_id' -o raw

# batch
extend extract batch invoices/*.pdf --using ex_abc

Inputs can be a local path (auto-uploads), a file_xxx ID, or an https:// URL.

Commands

extract | classify | split | run  <input> --using <id>
parse <input>
edit <input> --schema schema.json
<action> batch <inputs>... [--files-from list.txt]

runs    get | list | watch | cancel | delete | update
batches get | watch
files   upload | list | get | delete | download

extractors  | classifiers | splitters | workflows
    list | get | create | update | versions ...

evaluations         list | get | create
evaluations items   list | get | create | update | delete
evaluations runs    get

webhooks endpoints     | subscriptions   list | get | create | update | delete
webhooks verify

Run extend <command> --help for flags.

Output

-o json|yaml|raw|id|table|markdown overrides the per-command default. --jq '<expr>' filters structured payloads before json, yaml, raw, or id formatting. Data goes to stdout, status to stderr. Honors NO_COLOR and CLICOLOR_FORCE.

Directories

Path Synopsis
cmd
extend command
evals
stub command
Command stub is a fake `extend` binary for the eval runner.
Command stub is a fake `extend` binary for the eval runner.
internal
cli
config
Package config reads and writes the CLI's on-disk configuration file, written by `extend setup` and consumed as the lowest-precedence source of auth/routing settings by every command (flag > env > this file > default).
Package config reads and writes the CLI's on-disk configuration file, written by `extend setup` and consumed as the lowest-precedence source of auth/routing settings by every command (flag > env > this file > default).
extendx
Package extendx contains CLI-only abstractions the SDK doesn't (and shouldn't) provide:
Package extendx contains CLI-only abstractions the SDK doesn't (and shouldn't) provide:
iostreams
Package iostreams abstracts stdin/stdout/stderr with TTY and color detection.
Package iostreams abstracts stdin/stdout/stderr with TTY and color detection.
output
Package output renders API payloads in user-selected formats (json, yaml, raw, id) with optional --jq filtering.
Package output renders API payloads in user-selected formats (json, yaml, raw, id) with optional --jq filtering.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL