Fifteen verbs.
The CLI is the canonical surface. Every command takes --json for shell integration. Requires Node.js ≥ 20.
npm install -g filemayorDiagnose, plan, apply.
scan
filemayor scan <dir>Recursive file inventory. Categorizes by extension, surfaces duplicates and bloat. Read-only — never moves a file. Output is machine-friendly with --json.
filemayor scan ~/Downloads --json | jq ".duplicates"explain
filemayor explain <dir>AI health diagnosis. Returns a 0–100 score plus a plain-English issue list (screenshot clutter, dupe installers, stale archives). Read-only.
filemayor explain ~/DownloadsSends file metadata to the configured AI provider. No file contents.
cure
filemayor cure <dir> [--prompt "..."] [--para]Generate a curative plan. Proposes specific moves with rationale. Writes nothing — outputs the plan only. `--para` asks the AI to sort by actionability into the four PARA buckets. Apply with `filemayor apply` or discard.
filemayor cure ~/Downloads --paraapply
filemayor applyExecute the most recent plan. Every move is journaled. Atomic per category — a failure in one category does not corrupt the others. Reversible with `filemayor undo`.
filemayor applyundo
filemayor undo [--list | --session <id> | --all]Reverse moves and deletions. Plain `undo` reverses the most recent session; `--list` shows undoable history; `--session <id>` reverses a specific past session; `--all` reverses everything. Restores trashed files too. Persists across crashes.
filemayor undo --list
Direct operations.
organize
filemayor organize <dir> [--dry-run]Deterministic auto-organize. Sorts files into 12 smart categories (Code, Images, Archives, Documents, Configs, Media, etc.). No AI involved.
filemayor organize ~/Downloads --dry-runpara
filemayor para <dir> [--archive-after <n>]Sort by actionability using the PARA method (Projects, Areas, Resources, Archives). Deterministic — labels every move with its reason, then apply with `filemayor apply`. No AI key needed.
filemayor para ~/Documentsclean
filemayor clean <dir> [--yes]Remove junk: temp files, .DS_Store, Thumbs.db, .crdownload, node_modules artifacts, OS caches. Prompts before deletion unless --yes.
filemayor clean /tmp --yesanalyze
filemayor analyze <dir>Deep directory intelligence. Surfaces top largest files, duplicate clusters, deep nests, file-age distribution, and bloat sources.
filemayor analyze ~/Downloadsduplicates
filemayor duplicates <dir>Find duplicate files by content hash. Read-only.
filemayor duplicates ~/Photos --jsondedupe
filemayor dedupe <dir>Remove duplicates safely — matched by content hash, not filename. Keeps the oldest copy; the rest go to FileMayor’s trash, journaled, so `filemayor undo` restores them.
filemayor dedupe ~/Photoswatch
filemayor watch <dir> [--para]Live auto-organize. Monitors a folder; routes new arrivals to their correct homes in real-time. `--para` routes each new file into Projects / Areas / Resources / Archives by actionability — journaled, so undo works.
filemayor watch ~/Downloads --para
Configuration and status.
init
filemayor init [--para]Create a `.filemayor.yml` config in the current directory. Defines categories, watch rules, AI provider, and locale. Use `--para` to scaffold the four PARA folders with a tuned config.
filemayor init --parainfo
filemayor infoSystem info, version, AI provider connectivity, and journal location.
filemayor infolicense
filemayor license [activate|deactivate] [<key>]Everything is free — no license required. This command manages an optional license key, retained for organizations that need a formal license record. Validates locally with a 30-day offline grace period.
filemayor license activate FM-XXXX-XXXX
Exit codes
0— success1— generic error2— invalid arguments3— Doctrine block (Guardrail, Validator, or Security layer refused)5— AI provider unreachable (with --offline-fail)