classify
fialr classify <target> [options]Classify each file into a sensitivity tier and suggest a category. Classification uses structural signals only — filename patterns, extensions, directory heuristics, and MIME type. File content is never read during classification.
Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
target | Directory to classify (required) |
Options
Section titled “Options”| Option | Description |
|---|---|
-o, --output PATH | Write classifications JSON to this path |
--sensitivity-rules PATH | Path to sensitivity.yaml (default: config/sensitivity.yaml) |
What it does
Section titled “What it does”classify runs a scan first (identical to fialr scan), then applies sensitivity rules from sensitivity.yaml to assign each file a tier:
| Tier | Label | Meaning |
|---|---|---|
| 1 | RESTRICTED | No AI access. Manual operations only. Encrypted vault. |
| 2 | SENSITIVE | Local LLM on extracted text. Human confirmation required. |
| 3 | INTERNAL | Full local enrichment. Automated above confidence threshold. |
Tier assignment is rule-based. Rules match against path patterns, filename patterns, and file extensions. Tier 1 rules are evaluated first; if no Tier 1 or Tier 2 rule matches, the file defaults to Tier 3.
Category suggestion
Section titled “Category suggestion”Each file also receives a category suggestion (e.g., financial, legal, medical, technical, media). Categories are defined in sensitivity.yaml and matched by the same structural signals. The category determines the destination directory during planning.
Tier 1 flagging
Section titled “Tier 1 flagging”Every file classified as Tier 1 is added to the review queue. Tier 1 files are never processed automatically by any subsequent command. They require manual review and confirmation before any operation.
Output
Section titled “Output”To stderr:
classify ~/Documents
SCAN 847 files (2.3s) CLASSIFY 847 files (0.1s)──────────────────────────────────────────────────────── tier 1 12 RESTRICTED tier 2 89 SENSITIVE tier 3 746 INTERNAL total 2.4sWhen --output is specified, the full classification results are written as JSON — one entry per file with sensitivity tier, category, reason, and review flag.
Examples
Section titled “Examples”# Classify a directoryfialr classify ~/Documents
# Write classification results to filefialr classify ~/Documents -o classifications.json
# Use custom sensitivity rulesfialr classify ~/Documents --sensitivity-rules ./my-rules.yamlSee also
Section titled “See also”- Sensitivity Tiers — how tiers are defined and enforced
- Classification guide — walkthrough of the classification process
- plan — generate a plan from classified files