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.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
target | File or directory to export metadata for |
Options
Section titled “Options”| Option | Description |
|---|---|
--format FORMAT | Sidecar format: json or yaml (default: json) |
--batch | Export all tracked files to a single file |
-o, --output PATH | Output path (batch mode only) |
Formats
Section titled “Formats”JSON (default)
Section titled “JSON (default)”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.pdfblake3: a1b2c3d4...sha256: e5f6a7b8...sensitivity: 2category: financialtags: - invoice - acme - 2024Single-file export
Section titled “Single-file export”When target is a file path, a single sidecar is created alongside it:
fialr export ~/Documents/contract.pdf# creates ~/Documents/contract.pdf.fialr.jsonBatch export
Section titled “Batch export”With --batch, all tracked files in the database are exported to a single JSON file:
fialr export --batch -o metadata.jsonUse cases
Section titled “Use cases”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.
On-demand generation
Section titled “On-demand generation”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.
Examples
Section titled “Examples”# JSON sidecar for one filefialr export ~/Documents/contract.pdf
# YAML sidecarfialr export ~/Documents/contract.pdf --format yaml
# Batch export all tracked filesfialr export --batch -o metadata.jsonSee also
Section titled “See also”- Architecture Overview — metadata storage design
- scan — populate the database before exporting