Skip to main content
This reference documents every command in the ade CLI. For the same reference in your terminal, run ade help. New to the CLI? Start with the Quickstart. Commands are listed by group, each with its flags and its --json result keys. Behavior that applies across commands (output modes, exit codes, the local store) is covered in CLI Concepts. AI agents: run ade help --json to get this entire surface as a single JSON object.

Credentials and CLI Lifecycle

ade auth login

Ensure the target environment is logged in; --api-key authenticates with a key directly (’-’ prompts with hidden input). Targets --env, else $ADE_ENV, else production - nothing is stored about the choice. With --json, the command prints an object with these keys:

ade auth status

Show the resolved target’s auth method, identity, and expiry, plus every other environment holding a credential. With --json, the command prints an object with these keys:

ade auth logout

Log out of one environment (the resolved target by default); --all clears every environment. Idempotent; OAuth refresh tokens are revoked best-effort first. With --json, the command prints an object with these keys:

ade auth org list

List the organizations the target’s OAuth session can act in, marking the selected one. Memberships come live from the login provider, so a fresh grant or removal shows immediately - including a selection that is no longer a membership. With --json, the command prints an object with these keys:

ade auth org switch

Switch which organization the target’s OAuth session acts in. Validated against your live memberships here, and membership-verified by the platform on every request regardless. With --json, the command prints an object with these keys:

ade auth org clear

Drop the target’s organization selection, falling back to the platform default. Idempotent, and deliberately offline: this is the way out when a selection has outlived its membership, which is exactly when listing memberships may not work. With --json, the command prints an object with these keys:

ade login

Alias of ade auth login: ensure the target environment is logged in; --api-key authenticates with a key directly (’-’ prompts with hidden input). With --json, the command prints an object with these keys:

ade logout

Alias of ade auth logout: log out of one environment (the resolved target by default); --all clears every environment. With --json, the command prints an object with these keys:

ade version

Print the ade version and install mode: ‘binary’ (the standalone app - ade update replaces it in place) or ‘python’ (uv/pipx - upgrade with uv tool upgrade ade-cli). With --json, the command prints an object with these keys:

ade update

Check the release channel for a newer CLI and self-update on confirmation. A standalone-binary install (see ade version) replaces itself in place after verifying the release checksum; a uv/pipx install is never mutated - the command reports the newer version and points at uv tool upgrade ade-cli. With --json, the command prints an object with these keys:

ade help

Print the whole-surface command reference in one call: every command and flag, the output convention, each verb’s result shape, exit states, and the store layout. The agent bootstrap - run this (with --json) before anything else. help TOPIC prints one conceptual page instead (workflow, output, credentials, errors). With --json, the command prints an object with these keys:

Network Verbs: The ADE Job Contracts

ade parse

Ensure a document is parsed; persist all artifacts locally. The summary names the job item id every other verb takes: find it, view it, extract against it. The raw result stored in parse.json follows the Parse API response schema. With --json, the command prints an object with these keys:

ade extract

Ensure an extraction exists for a parse job item (or bring-your-own markdown); persist the result as its own job item. The schema-shaped result rides in the payload (extraction) with its per-field evidence; view JOB_ITEM_ID renders the same join on the page, and find/crop on the referenced parse reach the cited elements. The raw result stored in extract.json follows the Extract API response schema. With --json, the command prints an object with these keys:

Local Read Models

ade history list

List stored job items: id, kind, state, env, params, source - the newest 100 submissions first (--limit/--all adjust, --asc for oldest first). Extract items referencing a parse item indent beneath it. Bare ade history defaults to this command. With --json, the command prints an array of objects with these keys:

ade history clear

Delete stored job items. Clearing a parse item cascades - with notice - to the extract items referencing it, so the store never holds dangling refs. With --json, the command prints an object with these keys:

ade find

Search parsed elements locally: find JOB_ITEM_ID [QUERY], or --job (repeatable) for several items; no query lists every element. Ids discovered here are what view --element-id deep-links and crop --element-id renders - though crop takes these same filters directly (crop JOB_ITEM_ID --type figure) when you want the images rather than the records. With --json, the command prints an array of objects with these keys:

ade view

Build a job item’s self-contained grounded HTML viewer. With --json, the command prints an object with these keys:

ade crop

Crop element regions from the source document into PNGs: one --element-id, or a filtered batch (--type figure, --page, --all) with the same filters ade find searches by. With --json, the command prints an object with these keys:

Exit States

Every command exits with one of these codes. See Scripting and Automation for how to use them in scripts.

Store Layout

The local store lives at ~/.ade (ADE_HOME overrides).

Conventions

  • --json: Every command supports --json: one stable JSON object/array on stdout (errors and pending payloads follow the same rule). Agents should always pass it. Each command’s published shape is its ‘result’ block below - the full result is always on stdout, never only in a file.
  • --id-only: parse, extract, and find also take --id-only: just the id(s), one per line, for piping (JOB=$(ade parse -d f.pdf --id-only)). Errors and hints go to stderr so a captured id is never a sentence.
  • job item ids: Store commands take a job item id or an unambiguous prefix. Discover ids with history list; ambiguous or unknown ids error with candidates listed. Distinct from the server-side run id: --json payloads report that as run_id, and on-disk records spell the same value job_id (the wire’s name) - neither is ever a job item id.
  • guarantees: parse and extract ensure a run exists rather than fire a request: an already-done run is served from disk free with an explicit notice (--force consents to a re-bill); a pending run is resumed, never resubmitted; Ctrl-C stops the waiting, not the work.
  • env overrides: ADE_HOME relocates the store; ADE_API_KEY overrides stored credentials; ADE_ENDPOINT overrides the stored endpoint.

Help Topics

The CLI ships conceptual help topics (ade help <TOPIC>). Each one is covered in depth by a guide page:

Next Steps

CLI Concepts

Job items, output modes, exit codes, and the local store.

Scripting and Automation

Pipe results, handle exit codes, and run the CLI from agents and CI.