Fourteen 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 "..."]Generate a curative plan. Proposes specific moves with rationale. Writes nothing — outputs the plan only. Apply it with `filemayor apply` or discard.
filemayor cure ~/Downloads --prompt "organize by type"apply
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 [--all]Reverse moves. Without flags, reverses the most recent operation. `--all` reverses the entire session. Persists across crashes.
filemayor undo --all
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-runclean
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. Keeps the canonical copy (oldest, or matching a heuristic), trashes the rest. Journaled.
filemayor dedupe ~/Photoswatch Pro
filemayor watch <dir>Live auto-organize. Monitors a folder; routes new arrivals to their correct homes in real-time. Pro feature.
filemayor watch ~/Downloads
Configuration and status.
init
filemayor initCreate a `.filemayor.json` config in the current directory. Defines categories, watch rules, AI provider, and locale.
filemayor initinfo
filemayor infoSystem info, version, license status, AI provider connectivity, journal location.
filemayor infolicense
filemayor license [activate|deactivate] [<key>]Activate or deactivate a Pro license. 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)4— license required for Pro feature5— AI provider unreachable (with --offline-fail)