DocuTray
CLI

CLI

Command-line interface for DocuTray — convert documents from your terminal

@docutray/cli betanpm install -g @docutray/cli

docutray-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/cli

Verify:

docutray --version

Quick 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.jsonl

Available commands

CommandWhat it does
docutray auth loginAuthenticate with browser flow
docutray auth logoutClear stored credentials
docutray auth statusPrint active org and key
docutray convert <file>Convert one or many files
docutray types listList supported document types
docutray types show <code>Print schema for a document type
docutray webhooks tailStream webhook events live
docutray configInspect / edit config

See the commands reference for full flag listings.

Source

The CLI is open source: github.com/docutray/docutray-cli

On this page