Documents and files
Manage documents and their file packs from a terminal, and print a document's OCR text as plain text.
A document is a titled pack of files. standards documents lists and edits documents, adds and removes files from a pack, and prints the pack's aggregated text. To upload a new file and attach it to a record, use records attach-document.
Commands
| Command | What it does | What it prints |
|---|---|---|
standards documents list --limit 20 | Lists documents. | { data, page }. |
standards documents get <documentId> | Reads one document. | The document. |
standards documents create --title "Q1 report" --values '{"year":2026}' | Creates a document. --title is required; --values carries attribute values as JSON. | The created document. |
standards documents update <documentId> --title "Q1 report (final)" | Sends a PATCH with the fields you pass (--title, --values). | The updated document. |
standards documents delete <documentId> | Deletes the document. | Nothing. |
standards documents preview <documentId> | Returns the pack's preview file. | The preview file. |
standards documents files <documentId> | Lists the pack. | One row per file. |
standards documents add-file <documentId> --file-id <fileId> | Appends an already uploaded file to the pack. | The updated pack. |
standards documents remove-file <documentId> <fileId> | Removes one file from the pack. | The updated pack. |
standards documents content <documentId> | Prints the pack's OCR text. | Plain text. |
Files in a pack
files lists the pack in position order. In table format each row shows id, position, type, size and ocrStatus; json and csv print the raw rows.
standards documents files <documentId> --format tableadd-file takes the id of a file that is already uploaded; remove-file takes the file id shown by files. The document survives an empty pack.
Content
documents content prints the OCR text of every file in the pack, in position order, as plain text. It ignores --format.
standards documents content <documentId> > report.txtFiles still being processed contribute nothing yet: check ocrStatus in documents files first.
Next steps
- Records: upload a file and attach it to a record.
- Files and documents: packs, OCR and previews explained.
- CLI: output formats and exit codes.