Scans a target directory, categorizes files by type, finds duplicates, and generates (or executes) a cleanup plan. Dry-run by default — always shows what will happen before doing it.
All scripts live in scripts/. Run with python3. No third-party dependencies.
ScriptPurposescan.pyWalk a directory, output JSON inventoryfind_duplicates.pyFind duplicate files by content hashorganize.pyGenerate and optionally execute a move planmanifest.pyProduce a markdown before/after manifest
Category mappings (extension → folder) are in references/categories.md. Read it if asked about supported file types or to customize mappings.
bash
python3 scripts/scan.py ~/Downloads --output /tmp/scan.json
Add --hash to pre-compute hashes (needed for duplicate detection without a separate pass).
bash
python3 scripts/find_duplicates.py /tmp/scan.json --output /tmp/dupes.json
Or scan and deduplicate in one step:
bash
python3 scripts/find_duplicates.py --directory ~/Downloads
bash
python3 scripts/organize.py /tmp/scan.json --output /tmp/plan.json
Or scan + plan in one step:
bash
python3 scripts/organize.py --directory ~/Downloads
Key flags:
--dest ~/Downloads/Organized — custom destination (default: <dir>/Organized/)--flat — don't preserve subdirectory structure--dry-run — default, shows plan without moving anything--execute — actually move files (prompts for confirmation)--execute --yes — skip confirmation promptbash
python3 scripts/organize.py /tmp/scan.json --execute
# or skip the prompt:
python3 scripts/organize.py /tmp/scan.json --execute --yes
bash
# From plan JSON
python3 scripts/manifest.py --plan /tmp/plan.json --output /tmp/manifest.md
# Before/after comparison (run scan.py twice)
python3 scripts/manifest.py --before /tmp/before.json --after /tmp/after.json --output /tmp/diff.md
# Simple inventory
python3 scripts/manifest.py --scan /tmp/scan.json --output /tmp/inventory.md
organize.py never deletes files — only moves them--execute must be explicit--yes).dotfiles) are skipped by default; use --include-hidden to include them"Clean up my Downloads folder" → Run scan + organize dry-run, show the plan summary, ask user to confirm before executing.
"Find duplicate files in my Desktop"
→ Run find_duplicates.py --directory ~/Desktop, report groups sorted by wasted space.
"Organize my files and save a report" → Run scan → organize (dry-run) → confirm → organize (execute) → manifest to markdown.
"What file types are supported?"
→ Read references/categories.md and summarize the category mappings.
Default destination for organized files: <target_dir>/Organized/
Subfolders are created per category: Images/, Documents/, Videos/, etc.
Files with unrecognized extensions go to Other/.