Skip to main content
Early Access - The Dcycle CLI is currently available for enterprise customers. Contact us to learn more about access.

Overview

The Files module lets you upload documents (invoices, utility bills, waste certificates), view extracted readings, correct parsed data, and create linked records — all from the terminal. The CLI uses a presigned upload flow by default:
  1. Request a presigned URL from POST /v1/files/presigned-urls
  2. Upload the file directly to S3
  3. Confirm the upload with PATCH /v1/files/batch-update
This means uploads can run autonomously from scripts and CI jobs while still triggering the normal file classification and extraction pipeline.

Upload a File

Output:

Upload Flags

Upload Examples

When --project-id is present, the CLI passes it to the batch-update step so the backend creates file_project associations automatically after the S3 upload succeeds.

List Files

Output:

List Flags

List Examples


Show File Details

Output:

Delete a File


Recover a Deleted File

Restore a previously deleted file:

Retry File Processing

If a file was uploaded and classified but hasn’t produced a reading, re-queue it for processing:
Output:
This sends a PROCESS_DOCUMENT event to the backend pipeline. Use it when a file is stuck in uploaded status or when the extraction pipeline needs to re-run.

File Readings

File readings contain the data extracted from uploaded documents by the AI classification and parsing pipeline.

List Readings

Output:

List Reading Flags

List Reading Examples

Show a File’s Reading

View the parsed reading content for a specific file:
Output:

Correct Reading Content

If the extracted data has errors, prepare a JSON file with the corrected content and update the reading:
The JSON file can be in any of these formats: Full content object:
Items wrapper:
Raw items array:

Create Records from Readings

Convert a parsed reading into invoices or waste records, assigning facility allocations:
Output:

Split Across Multiple Facilities

Allocate the reading’s data across facilities by percentage (total must be ≤ 1.0):
The backend currently processes one file reading per create-records request.

Typical Workflows

Upload and Process Invoice

Upload an invoice PDF, wait for extraction, then create invoice records:

Batch Upload Documents

Upload all PDFs in a directory:

Find Unlinked Readings

Identify files that have been parsed but not yet converted to records:

Correct and Re-create Records

Fix extracted data and create records from the corrected reading:

CI/CD Automation

Upload files from a CI pipeline using API key authentication:

Next Steps

Invoices

Manage energy invoices created from file readings

Data Imports

Bulk import CSV/Excel with guided mapping and validation

Projects

Organize files and emissions data into sustainability projects

Configuration

Set up environments and API keys for automation

MCP Tools

Query files from AI assistants via MCP