> ## Documentation Index
> Fetch the complete documentation index at: https://docs.landing.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI Quickstart

> Install the ade CLI, log in, then parse a document and extract its fields from your terminal.

The ade CLI parses documents into Markdown and extracts fields you define in a schema, recording where on the page each value came from. It accepts PDFs, images, and Office documents, saves every result on your machine, and consumes no credits when you re-run an identical command.

## Install the CLI

The installer downloads a self-contained binary for your platform and puts it in `~/.ade/bin`. No Python or other runtime is needed.

<CodeGroup>
  ```bash macOS / Linux theme={null}
  curl -fsSL https://raw.githubusercontent.com/landing-ai/ade-cli/main/scripts/install.sh | sh
  ```

  ```powershell Windows (PowerShell) theme={null}
  irm https://raw.githubusercontent.com/landing-ai/ade-cli/main/scripts/install.ps1 | iex
  ```

  ```bat Windows (CMD) theme={null}
  curl -fsSL https://raw.githubusercontent.com/landing-ai/ade-cli/main/scripts/install.cmd -o install.cmd && install.cmd && del install.cmd
  ```
</CodeGroup>

## Log In

Log in with your [ADE account](https://ade.landing.ai/). Your browser opens to authenticate, and the CLI stores the credential. For more login options, see [Authentication](./authentication).

```bash theme={null}
ade login
```

## Parse a Document

Download the sample <a href="/examples/patient-statement-brackenmill.pdf" download="patient-statement-brackenmill.pdf">patient billing statement</a>, then point `ade parse` at it. The run creates a folder and saves the parsed Markdown output (`parse.md`) and related files in it. To run more commands on this document, like extract or view, use the `job item` ID.

Passing `--tier standard` runs the parse in the lane that consumes half the credits, at a slower turnaround. The CLI uses the `priority` tier when you omit the flag, so add `--tier standard` whenever you are not waiting on the result. See [Choose a Service Tier](./parse#choose-a-service-tier).

```bash Command theme={null}
ade parse -d patient-statement-brackenmill.pdf --tier standard
```

```text Output theme={null}
parse completed · 75s
Parsed /Users/you/documents/patient-statement-brackenmill.pdf -> job item 6d5d84e646381e4a
  run:     parse-01m1cmcy2bfdzeyyfsv9206jtw
  model:   dpt-3-pro-20260710
  pages:   2 (0 failed)
  credits: 2.3 (standard)
  saved:   ~/.ade/jobs/6d5d84e646381e4a/  (parse.json, parse.md, elements.json)
  next:    ade view 6d5d84e6 --open   ·   ade extract 6d5d84e6 --schema <schema.json>
```

## Extract the Fields You Need

A schema tells the extraction which fields to pull and how to recognize them. Download the <a href="/examples/schema-patient-statement.json" download="schema-patient-statement.json">sample schema</a>, or save the block below as `schema-patient-statement.json`. To create your own later, build it visually in the [Playground](https://ade.landing.ai/) and download the JSON, or write the schema with [Extraction Schema (JSON)](/dpt3/ade-extract-schema-json).

```json schema-patient-statement.json expandable theme={null}
{
  "description": "Root object",
  "type": "object",
  "properties": {
    "patient_name": {
      "description": "The full name of the patient receiving medical services.",
      "x-alternativeNames": [
        "Patient Name",
        "Name of Patient",
        "Recipient Name"
      ],
      "type": "string"
    },
    "medical_record_number": {
      "description": "A unique identifier assigned to the patient's medical records.",
      "x-alternativeNames": [
        "Medical Record Number",
        "Patient ID",
        "Chart Number"
      ],
      "type": "string"
    },
    "balance_due": {
      "description": "The total outstanding amount that the patient or guarantor needs to pay.",
      "x-alternativeNames": [
        "Balance Due",
        "Amount Due",
        "Pay This Amount"
      ],
      "type": "number"
    }
  },
  "required": [
    "patient_name",
    "medical_record_number",
    "balance_due"
  ]
}
```

### Run the Extraction

Run the extraction against your parse, using the job item ID from the parse output. The run saves the extracted values (`extract.json`) and a record of where each value was found (`evidence.json`) in a folder of its own.

```bash Command theme={null}
ade extract 6d5d84e646381e4a --schema schema-patient-statement.json --tier standard
```

```text Output theme={null}
extract completed · 15s
Extracted /Users/you/documents/patient-statement-brackenmill.pdf -> job item 13dace824c25b005
  run:      extract-01m1cmfk1hca1yhwsbdh8pgf3s
  model:    extract-20260819
  fields:   3 (all grounded)
  evidence: grounded (field->box join from stored artifacts)
  credits:  1.1 (standard)
  saved:    ~/.ade/jobs/13dace824c25b005/  (extract.json, evidence.json)
  next:     ade history list --json   ·   ade view 13dace82 --open
```

## See Where Every Value Came From

Open the extraction in your browser. The viewer shows the extracted values beside the original pages, and selecting a field highlights the exact spot on the document it came from:

```bash Command theme={null}
ade view 13dace824c25b005 --open
```

```text Output theme={null}
Viewer for job item 13dace824c25b005 (extract) -> ~/.ade/jobs/13dace824c25b005/view.html (built)
  sidebar: building missing sibling viewers in the background
  opened in browser: file:///Users/you/.ade/jobs/13dace824c25b005/view.html
```

<img src="https://mintcdn.com/landingaitest/R3_V7GJ7W7z6v5a-/images/cli-view-patient-form.png?fit=max&auto=format&n=R3_V7GJ7W7z6v5a-&q=85&s=0d8615b82de5bb5a84897c5e789dd746" alt="The ade viewer in a browser, showing the parsed patient statement with its elements outlined on the left, and the extraction results, per-field metadata, and schema fields on the right." className="bordered-image" width="2520" height="1500" data-path="images/cli-view-patient-form.png" />

## Common Tasks

Each command below takes a job item ID, or any unambiguous prefix of one. AI agents: `ade help --json` returns this whole surface as one JSON object.

| To do this                               | Run                                              | Learn more                                         |
| ---------------------------------------- | ------------------------------------------------ | -------------------------------------------------- |
| Parse a local file at half the credits   | `ade parse -d document.pdf --tier standard`      | [Parse Documents](./parse)                         |
| Parse in the fast lane, at the full rate | `ade parse -d document.pdf --tier priority`      | [Parse Documents](./parse)                         |
| Parse only some pages                    | `ade parse -d document.pdf --pages 1,3-5`        | [Parse Documents](./parse)                         |
| Extract fields from a parse              | `ade extract JOB_ID --schema schema.json`        | [Extract Fields](./extract)                        |
| Get the result as JSON for a script      | `ade extract JOB_ID --schema schema.json --json` | [Scripting and Automation](./scripting-automation) |
| See your past runs                       | `ade history list`                               | [CLI Concepts](./concepts)                         |
| Search a parsed document                 | `ade find JOB_ID "term"`                         | [Find, Crop, and View](./find-crop-view)           |
| Open a document in the viewer            | `ade view JOB_ID --open`                         | [Find, Crop, and View](./find-crop-view)           |
| Save an element as an image              | `ade crop JOB_ID --element-id ID`                | [Find, Crop, and View](./find-crop-view)           |
| Capture an ID for a script               | `ade parse -d document.pdf --id-only`            | [Scripting and Automation](./scripting-automation) |
| Check which account you are using        | `ade auth status`                                | [Authentication](./authentication)                 |
