Installation
Install the Reducto CLI using pip:Authentication
Before using the CLI, authenticate by running:Quick Examples
<filename>.parse.md. Extraction reuses existing parses when possible and saves <filename>.extract.json containing only the payload.
Supported File Types
The CLI supports the same file types as the Reducto API:| Format | Extensions |
|---|---|
.pdf | |
| Images | .png, .jpg, .jpeg |
| Office documents | .doc, .docx, .ppt, .pptx |
| Spreadsheets | .xls, .xlsx |
Parse Command
Theparse command converts documents into structured markdown output.
Flags
| Flag | Description |
|---|---|
--agentic | Enables all agentic options for tables, text, and figures. Increases accuracy but also increases latency. Use when document quality or complex layouts require enhanced processing. |
--change-tracking | Enables change tracking during parsing. Returns <s> tags around strikethrough text, <u> tags around underlined text, and <change> tags around colored adjacent strikethrough and underlined text. Useful for documents with revision history. |
--highlights | Include highlighted text in the parsed output. |
--hyperlinks | Include embedded hyperlinks in the parsed output. |
--comments | Include document comments in the parsed output. |
Examples
Extract Command
Theextract command pulls structured data from documents according to a JSON Schema you provide. It automates information extraction by mapping complex or unstructured documents into machine-readable JSON.
Common Use Cases
- Extracting line items, totals, vendor/customer info from invoices and receipts
- Pulling key fields, tables, or sections from contracts or legal documents
- Capturing form field values from scanned forms or applications
- Summarizing structured results from reports, statements, or medical records
Schema Guidelines
- Schemas must be valid JSON Schema documents
- The top-level schema must be an object (
{"type": "object", ...}) β inline strings or arrays are not permitted - Provide explicit property definitions so the extractor can map fields deterministically
- Schemas may be supplied as file paths or inline JSON strings
Example Schema
You can reuse parses across multiple extractions: the CLI automatically detects existing
.parse.md files, rehydrates the recorded job ID, and uses jobid://<id> references to accelerate extraction jobs.Edit Command
Theedit command modifies documents using natural language instructions. It uploads the document, applies the specified edits, and downloads the resulting file.
Usage
Parameters
| Parameter | Required | Description |
|---|---|---|
path | Yes | Path to a file or directory. Directories are scanned recursively for supported file types. |
--instructions, -i | Yes | Natural language instructions describing the edits to apply. |
Output
Edited files are saved alongside the original with the naming pattern<filename>.edited.<extension>. For example:
invoice.pdfbecomesinvoice.edited.pdfreport.docxbecomesreport.edited.docx
Examples
Tips for Effective Instructions
For best results with the--instructions flag:
- Be specific about what content to modify and how
- Reference specific elements (headers, footers, tables, specific text)
- Describe the desired outcome clearly
- For bulk operations on directories, ensure instructions apply uniformly to all file types
Next Steps
API Quickstart
Learn to use the Reducto API directly for more advanced integrations.
Parse Options
Explore all available parsing configurations.
Extract Overview
Deep dive into structured data extraction.
Edit Overview
Learn more about document editing capabilities.