CLI
CLI
Command-line interface for DocuTray — convert documents from your terminal
@docutray/cli beta
npm install -g @docutray/clidocutray-cli
@docutray/cli is the official command-line interface for DocuTray. Convert
documents, manage API keys, batch-process folders and tail webhook events
from your terminal or shell scripts — no runtime, no glue code.
Status: Beta. The command surface is stable; flag names may still change between minor versions.
Why a CLI?
The CLI is the right surface when you:
- Need to batch-convert a folder of scans without writing code.
- Want a CI step that converts a file and asserts on extracted fields.
- Are prototyping and don't want to set up an SDK yet.
- Need to stream JSONL straight into a data warehouse (BigQuery, Snowflake, DuckDB).
For everything else, reach for the Node SDK or Python SDK.
Install
npm install -g @docutray/cliVerify:
docutray --versionQuick start
# 1. Authenticate (opens browser, stores token in ~/.docutray/config.json)
docutray auth login
# 2. Convert a single document
docutray convert ./invoice.pdf --type invoice --out ./out.json
# 3. Batch-convert a folder, streaming JSONL to stdout
docutray convert ./invoices/*.pdf --type invoice --jsonl > data.jsonlAvailable commands
| Command | What it does |
|---|---|
docutray auth login | Authenticate with browser flow |
docutray auth logout | Clear stored credentials |
docutray auth status | Print active org and key |
docutray convert <file> | Convert one or many files |
docutray types list | List supported document types |
docutray types show <code> | Print schema for a document type |
docutray webhooks tail | Stream webhook events live |
docutray config | Inspect / edit config |
See the commands reference for full flag listings.
Source
The CLI is open source: github.com/docutray/docutray-cli