Most document tooling assumes a human is sitting at a keyboard, writing a script, managing a virtual environment, and reading a traceback when something breaks. The ADE CLI takes the opposite bet: a single terminal command should be enough to parse a document, pull structured fields out of it, and hand back clean JSON — whether the caller is you or an AI agent.
The ADE CLI is a terminal-first tool that drives LandingAI's Agentic Document Extraction (ADE) v2 APIs. It runs as one self-contained binary, installs in a single line, and speaks the two things automation understands best: JSON on stdout and a meaningful exit code.
Source code:
landing-ai/ade-clion GitHub — browse the code, file issues, and follow releases.
Video walkthrough
Watch the ADE CLI install, authenticate, and run a parse-then-extract workflow end to end:
Built for AI agents
Agents talk to a terminal far more cleanly than they talk to a Python SDK. An SDK means writing script files, managing virtual environments, pip install-ing dependencies, and parsing Python tracebacks when something goes wrong. The CLI collapses all of that into a contract an agent already knows how to use:
- Run one command — no scaffolding, no project setup.
- JSON on stdout — structured, parseable output every time.
- Read the exit code — success and failure are unambiguous.
- No setup, no env — nothing to install or configure first.
The result is a runtime an agent can drive on the first try, without a human in the loop.
A self-contained binary
The CLI ships as a single standalone executable for macOS, Windows, and Linux, built for both Arm64 and x86_64. There is no Python interpreter to install and no package manager to manage — the binary is the whole thing.
Installation is one line that auto-detects your platform and puts the binary on your PATH:
# macOS / Linux
curl -fsSL ade.sh | sh
# Windows (PowerShell)
irm ade.ps1 | iexThe installer drops the binary at ~/.ade/bin/ade and symlinks it into ~/.local/bin/ade so you can run ade from anywhere — no config files, no manual PATH edits. Confirm it worked:
$ ade --version
ade 1.0.0
detected: darwin-arm64Stays current on its own
Upgrades are a single command:
ade updateUnder the hood it checks the release channel, verifies the download against a SHA-256 checksum, and replaces the binary in place. When you're working interactively, it also runs a quiet daily background check so you're rarely far behind a release.
Auth: interactive or headless
Authentication uses one command — ade auth login — that adapts to where it's running:
- Interactive development: opens a browser OAuth flow and stores refreshable tokens locally.
- Headless / CI / Docker: reads an
ADE_API_KEYfrom the environment, or accepts a key piped in —echo $KEY | ade auth login— with no browser and no prompts.
Critically for automation, if there's no key available the command exits immediately with an error instead of hanging — so a misconfigured pipeline fails fast rather than blocking forever.
The core workflow: parse, then extract
Parse a document
ade parse invoice.pdfParsing runs on DPT-3 (dpt-3-pro-latest) and turns a complex document into grounded Markdown plus a structured element tree. The parse response has three top-level fields:
markdown— the whole document as one Markdown string, in reading order, with tables and figures preserved.structure— a nested tree ofdocument → page → blocks, where each block (text-0,table-0,figure-0, …) carries inline grounding back to the source.metadata—job_id,model_version,page_count, and billing (total_credits).
A local store that skips repeat work
Every job is written to a local store under ~/.ade/, keyed by a hash of the file + params + env. Run the same command again and the result is served straight from disk: 0 API calls, $0. A new call only happens if the parameters change, the document is edited, or you pass --force.
The same store makes runs resilient: if a job is interrupted by Ctrl-C or a network glitch, the CLI resumes the pending run and picks up where it stopped.
Extract structured fields
ade extract -d invoice.pdf --schema '…'Point extract at a schema (for example, invoice_number, line_items, total) and it returns matching JSON. Because it works off the local store, giving it a document path that was already parsed means it reuses the local artifacts and bills the parse only once — no duplicate uploads, no duplicate parse charges.
Inspect everything locally
Three commands let you look at parsed results without spending a single API credit — they're 100% local, 0 API credits:
ade view— opens a side-by-side viewer linking each Markdown element to its bounding box on the page; click an element to jump to its location.ade crop JOB_ID --type figure— slices figures (or other block types) out of the source into a stack of PNGs.ade find— searches across every parsed element with regex and case-insensitive options, returning each match with its element id and page.
The agent contract
The CLI is designed so a coding agent can discover how to use it without human help — no docs site to crawl, no SDK reference to load, no hand-written integration notes. The contract is the command line itself:
ade help --jsonade help --json returns the full set of commands, flags, result shapes, and exit states as structured JSON. An agent runs it once, learns the entire surface, and knows exactly how to call parse, extract, and the rest — including how to read success and failure from exit codes. Paired with JSON on stdout for every command, that stable, self-describing surface turns the CLI into a robust runtime for document workflows that agents can operate reliably.
Getting started
Install the ADE CLI, authenticate, and parse your first document in under a minute:
curl -fsSL ade.sh | sh # install (macOS / Linux)
ade auth login # authenticate
ade parse your-document.pdf # parse- Install the ADE CLI with the three commands above — or grab a release binary from
landing-ai/ade-clion GitHub. - Authenticate with
ade auth login— browser OAuth locally, or anADE_API_KEYfor headless and CI runs. - Point it at your own documents — run
ade parse, thenade extractwith your schema, and inspect the results withade view. - Or let an agent drive it — point Claude Code (or any coding agent) at the CLI; a single
ade help --jsonteaches it the whole command surface, and it can build the pipeline for you. - Read more in the ADE documentation.
