reconstruct
Reconstructs a document from the canonical store and outputs it as markdown or PDF. The output format is auto-detected from the file extension or can be specified with --format.
Usage
bash
unsterwerx reconstruct [OPTIONS] --output <OUTPUT> <DOCUMENT_ID>
Arguments
| Argument | Required | Description |
|---|---|---|
DOCUMENT_ID | Yes | Document ID (UUID) to reconstruct |
Options
| Option | Short | Type | Default | Description |
|---|---|---|---|---|
--output | -o | path | required | Output file path |
--at | string | Point-in-time timestamp (ISO 8601) for temporal reconstruction | ||
--format | -f | string | auto | Output format: markdown or pdf. Auto-detected from output extension if omitted |
Examples
Reconstruct as markdown
bash
unsterwerx reconstruct a1b2c3d4-... -o output.md
Reconstructed: output.md
Reconstruct as PDF
bash
unsterwerx reconstruct a1b2c3d4-... -o output.pdf -f pdf
Reconstructed: output.pdf
Temporal reconstruction
Reconstruct the document as it existed at a specific point in time:
bash
unsterwerx reconstruct a1b2c3d4-... -o output.md --at 2026-02-20T00:00:00Z
Notes
- PDF output is generated as a read-only document with RC4 encryption (V=1/R=2) to prevent casual editing.
- The
--formatflag overrides auto-detection. Without it,.mdfiles produce markdown and.pdffiles produce PDF. - Temporal reconstruction uses the canonical content plus any stored diffs to reconstruct the document state at the requested timestamp.
- The document must have canonical content (status
canonicalorclassified). Documents inerrororunsupportedstatus cannot be reconstructed.