Skip to main content
Every ade CLI command prints a result a script can parse, returns an exit code that says what to do next, and is safe to re-run. So you can:
  • Pipe IDs and results straight into other tools (--id-only, --json).
  • Submit long jobs now and collect them later (--wait 0).
  • Batch whole folders, and re-run after a crash: finished work is served from disk.

Capture an ID for Piping

The --id-only flag prints just the job item ID, one per line. Errors go to stderr, so a captured ID is never an error sentence:
Command
Output
Assign it directly in a script, then feed it to any command that takes an ID:

Pipe Results to Other Tools

With --json, the whole result is on stdout as one object or array, so a script never reads files out of the store. Failures and unfinished jobs use the same shape, so one parser handles every outcome. The large artifacts stay on disk unless you carry them along with --include. Here the parse markdown flows straight into another tool:
Command
Output

Branch on Exit Codes

Exit codes separate “wrong” from “not yet.” Codes 3 (wait expired, job still running) and 4 (rate-limited, nothing consumed) both mean the same recovery: run the same command again. The CLI Reference lists every code.

Submit Now, Collect Later

Pass --wait 0 to submit a job and return immediately with exit code 3. Collect the result whenever you like by re-running the same command: it reconnects to the recorded job and never consumes credits twice.

Process a Folder of Documents

Free re-runs make batch jobs resumable. If this loop dies halfway, run it again, and only the unfinished documents do real work.

Run Unattended

In an unattended environment, such as a continuous integration (CI) pipeline, a cron job, or an AI agent harness, set the ADE_API_KEY environment variable for credentials. Authentication covers the options. Non-interactive shells source no profile, so the ade command your login shell finds may not be on the job’s PATH. Call the binary by its absolute path, or add it to PATH inside the job:

Next Steps

CLI Reference

Every command, flag, and payload key these patterns build on.

CLI Concepts

Why re-runs are free: job items, guarantees, and the local store.