> ## Documentation Index
> Fetch the complete documentation index at: https://unfold-0a6049eb.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Parse and compare documents from the terminal.

The CLI requires Node.js 22.14 or newer. Run it without a permanent installation:

```bash theme={null}
npx @file_router/cli@latest login
```

The login command opens Unfold in your browser, asks you to approve a device code, creates a Unfold API key, and stores it in your user configuration directory.

## Parse

```bash theme={null}
npx @file_router/cli@latest parse report.pdf
```

```bash theme={null}
npx @file_router/cli@latest parse report.pdf \
  --provider mistral-ocr \
  --outputs markdown,pages \
  --json \
  --out result.json
```

## Compare

```bash theme={null}
npx @file_router/cli@latest compare report.pdf \
  --providers llamaparse,mistral-ocr,datalab \
  --outputs markdown
```

## Direct processing

Add `--local` to use provider API keys from your environment and bypass Unfold infrastructure:

```bash theme={null}
LLAMA_CLOUD_API_KEY="..." \
  npx @file_router/cli@latest parse report.pdf --local
```

The built-in adapters read `LLAMA_CLOUD_API_KEY`, `MISTRAL_API_KEY`, and `DATALAB_API_KEY`.

## List adapters

```bash theme={null}
npx @file_router/cli@latest providers
npx @file_router/cli@latest providers --json
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.