SlothSort: Let a Local Gemma Model Clean Up Your Messy Folder
Description and use
SlothSort is a privacy‑first CLI that uses a local Gemma model via Ollama to classify and move files in a folder, offering dry‑run previews and undo functionality.
Problem
Users struggle to organize files in a messy folder while preserving privacy and avoiding accidental data loss.
Outcome
SlothSort enables safe, privacy‑preserving organization of a single folder’s immediate files using a local Gemma model, with dry‑run, apply, and undo features.
Workflow
- Select target folder
- Read file names, extensions, and sizes
- Send metadata to local Gemma model via Ollama
- Validate returned JSON plan
- Show dry‑run preview
- Apply moves when --apply is provided
- Create undo manifest
- Undo last operation with --undo
Evidence
SlothSort is a privacy‑first Python CLI that organizes the immediate files in a messy folder.
It shows a dry‑run first, never overwrites files, and can undo the latest organization pass.
SlothSort scans only the immediate files in the selected folder and sends their names, extensions, and sizes to a local gemma3:1b model through Ollama's HTTP API.
I treated model output as untrusted input. SlothSort rejects malformed JSON, invented or duplicated files, incomplete plans, path traversal, unsafe category names, and overwrite collisions.
- Record date: 2026-10-26T10:11:33.456Z