Your Desktop is full of Screenshot 2026-10-14 at 9.41.22 AM.png. You'll rename them later. You won't. Sloth Sort uses Google's open-weight Gemma 3, running on your own laptop, to look at each file and give it a name a tidy person would have picked.
Sloth Sort sits in the background and moves at its own pace: one file at a time, about four seconds each, on a laptop.
When a new screenshot, photo or PDF lands in ~/Desktop or ~/Downloads, it gets a real name within seconds. The model unloads itself when there's nothing to do.
Only throwaway names get touched: Screenshot …, IMG_4821, download (2).pdf, hashes. taxes 2025 notes.pdf stays as you named it.
Each rename is written to a journal before the file moves. A local review page shows every change, with one-click undo or a retype box.
Look at what's actually in a Downloads folder: bank statements, utility bills with your address, screenshots of private group chats, a settings page with your API keys still on it.
A cloud vision API would need every one of those uploaded just to come up with a filename. That's a bad trade for something you'd run on everything, all the time, without looking.
127.0.0.1.A small model is great at reading a boarding pass. It is not something to trust with your file system. Gemma only suggests words; plain Python decides what a filename may contain.
| Rule | Why |
|---|---|
| Long digit runs, emails and phone numbers are scrubbed from every name | Filenames show up in Spotlight, cloud sync logs and email attachments. chase-statement-7730-2219-5541.pdf should never exist. |
| A date from the model is used only if a full day, month and year is printed on the file | Small models fill gaps. A cart that said "Thu, Oct 29" once became 2023-10-29, and "Q3 2026" once became July 1. |
Never overwrite. A clash becomes -2, -3 | Your files are worth more than a pretty name. |
| Wait until a file stops growing | No renaming half-downloaded PDFs. |
| Flag passwords, keys and card numbers | The review page warns you, so a screenshot of your API keys doesn't sit on your Desktop forever. |
I scored Gemma 3 4B on 11 made-up files: screenshots, a text PDF, an image-only phone scan, a chart, a meme and a page full of API keys. Each name is checked for the right words, category, date and secret flag. The misses are shown too.
| Before | After | Words | Category | Date | Secret flag |
|---|
Runs on your machine at 127.0.0.1:8765. Undo anything, retype anything, or tidy up the backlog of old files in one click.
You need macOS or Linux, Python 3.11+ and Ollama.
ollama pull gemma3:4b pip install -r requirements.txt python -m slothsort # then open http://127.0.0.1:8765
Want to see what it would do first? python -m slothsort scan ~/Downloads previews names without touching anything.