Skip to content

export

fialr export <target> [options]

Export file metadata as portable sidecar files alongside the originals. Sidecars include content hashes, sensitivity tier, category, tags, and operation history.


ArgumentDescription
targetFile or directory to export metadata for
OptionDescription
--format FORMATSidecar format: json or yaml (default: json)
--batchExport all tracked files to a single file
-o, --output PATHOutput path (batch mode only)

Machine-readable. Creates a .fialr.json file alongside each source file. Suitable for programmatic consumption, CI pipelines, and tool interop.

{
"file": "2024-03-15_acme_invoice_v1.pdf",
"blake3": "a1b2c3d4...",
"sha256": "e5f6a7b8...",
"sensitivity": 2,
"category": "financial",
"tags": ["invoice", "acme", "2024"],
"mime_type": "application/pdf",
"size": 142857
}

Structured, human-editable. Creates a .fialr.yaml file alongside each source file. Suitable for archival documentation and manual review.

file: 2024-03-15_acme_invoice_v1.pdf
blake3: a1b2c3d4...
sha256: e5f6a7b8...
sensitivity: 2
category: financial
tags:
- invoice
- acme
- 2024

When target is a file path, a single sidecar is created alongside it:

Terminal window
fialr export ~/Documents/contract.pdf
# creates ~/Documents/contract.pdf.fialr.json

With --batch, all tracked files in the database are exported to a single JSON file:

Terminal window
fialr export --batch -o metadata.json

Handoff. Sidecar files travel with the original files when copied or moved to external drives, shared folders, or other systems. The receiving party gets metadata without needing fialr installed.

Archival. Sidecars provide a human-readable record of file identity and classification at the time of export. Useful for long-term storage where the SQLite database may not accompany the files.

PKM ingestion. Structured sidecar files can be ingested by personal knowledge management systems, search indices, or automation pipelines that read JSON or YAML.


Sidecar files are generated on demand, not continuously maintained. They reflect the state of the database and XATTRs at the time of export. If file metadata changes after export, the sidecar becomes stale. Re-run fialr export to update.


Terminal window
# JSON sidecar for one file
fialr export ~/Documents/contract.pdf
# YAML sidecar
fialr export ~/Documents/contract.pdf --format yaml
# Batch export all tracked files
fialr export --batch -o metadata.json