Documentation
CLI/extract

renamed extract

Extract structured data from documents. Turn invoices, receipts, and contracts into JSON or CSV for accounting and automation.

renamed extract <file|directory> [options]

The extract command uses AI to parse documents and extract key fields like dates, amounts, vendor names, and line items. Output as JSON for APIs or CSV for spreadsheets.

Examples

Extract invoice data to JSON:

$ renamed extract invoice.pdf --output json

Batch extract to a single CSV:

$ renamed extract ./invoices/*.pdf --output csv --merge --file invoices.csv

Use a specific document schema:

$ renamed extract receipt.pdf --schema receipt

Options

-o, --output <format>

Output format: json, table. Default: json.

-s, --schema <type>

Built-in schema: invoice, receipt, contract, resume.

-f, --schema-file <path>

Path to a custom JSON schema file for field definitions.

-p, --parser-id <id>

Use a saved parser profile from the web dashboard.

-i, --instructions <text>

Custom AI instructions for extraction.

--merge

Combine all extracted data into a single output file.

--pretty

Pretty-print JSON output with indentation.

Built-in Schemas

invoice — Vendor, invoice number, date, amount, line items, tax

receipt — Store, date, total, payment method, items

contract — Parties, effective date, termination date, terms

resume — Name, contact, skills, experience, education

Custom Schema

Define your own fields with a JSON schema file:

custom-schema.json
{
 "fields": {
 "projectName": "string",
 "budget": "currency",
 "deadline": "date",
 "approved": "boolean"
 }
}

Field types: string, number, date, currency, boolean

Output Example

JSON output from an invoice:

{
 "vendor": "Acme Corp",
 "invoiceNumber": "INV-8847",
 "date": "2026-01-15",
 "amount": 2450.00,
 "currency": "USD",
 "lineItems": [
 {
 "description": "Consulting Services",
 "total": 2000.00
 }
 ]
}

See Also