This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Sloth Sorter is a lazy, local AI file tidier. You point it at a messy folder, and an open-weight model running on your own computer decides where every file belongs and what it should be called. You review the plan, click Apply, and if you don't like the result, one click undoes it.
Everyone has a Downloads folder full of new 1.txt, asdf.txt and final_v2_FINAL.txt. I kept putting off tidying mine, because sorting means opening every file just to remember what it is. Sloth Sorter does that part for me. For text files, the model reads the start of the content, not just the filename. So download (1).txt, which is really an electricity bill, becomes electricity-bill-october-2026.txt and lands in Finance.
Here is what it did on a deliberately messy 19-file test folder:
| Original | Sorted to | New name |
|---|---|---|
asdf.txt |
Code | bubble-sort-algorithm.txt |
doc_scan_copy.txt |
Documents | resume-ankit-singh.txt |
download (1).txt |
Finance | electricity-bill-october-2026.txt |
food1.jpg |
Images | food-photography.jpg |
It's for anyone who has a folder they've been avoiding, and especially for people who don't want to upload their bills, resumes and IDs to a cloud AI to get it sorted.
Demo
The video shows the full loop: pick a messy folder, let the local model read it, review the plan, apply, then undo and get every file back exactly where it was.
Code
🦥 Sloth Sorter
A lazy, local-AI file tidier. Point it at a messy folder and an open-weight model running on your own computer decides where every file belongs and what to call it. You review the plan, click apply, and can undo it all. Nothing ever leaves your machine.
Built for the DEV Hacktoberfest Open-Source AI Challenge, Week 3: "Slow and Steady".
Table of contents
- The problem
- What it does
- How it works
- Why open-weight AI
- Tech stack
- Project structure
- API reference
- Getting started
- Usage
- Safety design
- Example results
- Configuration
- Troubleshooting
- Limitations
- Roadmap
- Credits and license
The problem
Everyone has a Downloads folder full of IMG_2231 (1).jpg, final_v2_FINAL.pdf and new 1.txt. Tidying it is a chore people put off for months, and cloud "AI organisers" mean uploading your bills, IDs and resumes to someone else's server.
What it does
- Scans a folder and asks a local model…
MIT licensed. Setup and usage are in the README (tested on Windows 11).
How I Built It
The flow is simple, and every arrow stays on my machine:
Web UI (Next.js) -> FastAPI server -> sorter engine (Python) -> Ollama + Gemma 3 4B
|
your folder
- The model: Gemma 3 4B (open weights), served by Ollama on localhost. For each file, the engine sends the filename and, for text-like files, the first 600 characters. It asks for JSON with a category and a clean name, using a low temperature to keep answers steady.
-
Never trusting the model blindly: the category must be on an allowed list, filenames are sanitised, and an existing file is never overwritten (
name-1.extinstead). If Ollama is unreachable or returns bad JSON, the tool falls back to sorting by file extension instead of failing. -
Safe by default: nothing moves until you've reviewed the plan. Every move is written to an undo log, and the server refuses drive roots like
D:\. -
The engine: one Python file using only the standard library. It works as a CLI too (
--apply,--undo,--no-ai). - The UI: I designed it in v0 and then wired it to the real backend through a small FastAPI server. A Browse button opens a native Windows folder picker. I built it with help from Claude, which paired with me on the backend and the integration.
It isn't perfect, and I'd rather say so. PDFs and images are judged by filename only, so only text-like files get their content read. A 4B model also makes the odd mistake. It once turned my DBMS exam notes into dms-exam-revision-notes, dropping a letter. That's exactly why the plan is shown for review before anything moves.
Why Does Open Innovation Matter?
This project only makes sense because the model is open.
- Privacy. The files people most need to tidy are the ones they least want to upload: bills, bank statements, resumes, screenshots. With a local open-weight model, the AI runs next to the files and nothing is sent to anyone's server.
- No ongoing cost. There's no API key, no per-file fee and no rate limit. Sorting 10,000 files costs the same as sorting 10, which is a bit of electricity.
- It's swappable. Any model Ollama can run works. I develop on Gemma 3 4B, and one environment variable switches to a smaller model for a weaker laptop.
- It's inspectable. The whole pipeline is code I can read and change. When the model made a mistake, I could look at the prompt and the validation logic instead of hoping a hosted service behaves.
I also ran a full scan with Wi-Fi switched off, and it worked the same, because the AI step only ever talks to localhost.
A closed API would have meant either uploading personal documents or not building this at all.
The Lazy Payoff
Scanning my 19-file test folder took about [SCAN TIME] on my laptop, and I didn't touch anything while it ran. Doing it by hand means opening each file to work out what it is, then renaming and moving it, and that's the part I always put off. I haven't done a stopwatch comparison, so I won't claim an exact saving. The real payoff is that the deciding is handled, and I only have to review the plan.
Prize Categories
- Gemma: built around Gemma 3 4B, run locally through Ollama.


Top comments (0)