This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Sloth Sorter is a file tidier that runs entirely on my own machine. Point it at a messy folder (my Downloads folder was a landfill of scan0012.pdf, final_FINAL_v3.docx and IMG_4471.heic). It reads the start of each file, asks a local open-weight model for a category and a clean filename, and files it away.
scan0012.pdf becomes Finance/electricity-bill-2026-03.pdf.
It's safe to be lazy with. It previews by default and only moves files when I pass --apply. Every move is logged, so --undo puts everything back.
Anyone who has a folder they keep promising to sort "this weekend" gets to be a little lazier.
How I Built It
-Model: an open-weight model, Qwen 2.5 3B by default.
-Inference: Ollama, running locally on localhost:11434. There's no API key and no account.
-Glue: plain Python with no pip dependencies. For PDFs it uses pdftotext if it's installed, and falls back to the filename if not.
-Structured output: Ollama's JSON mode makes the model return {"category": ..., "name": ...}. I check the category against an allowed list and clean the filename before touching any file.
-Safety: dry run by default, collision-safe renames (name-1.pdf), and a JSON log for --undo.
-Graceful degradation: if the model isn't running or returns bad JSON, it sorts by file extension instead of crashing. I tested apply and undo in that offline-fallback mode.
Why Does Open Innovation Matter?
-Privacy:A Downloads folder holds tax forms, payslips, medical reports and ID scans. Sorting them with a closed API means uploading all of that to someone else's server. Here the file contents never leave my machine.
-Works offline:There's no dependency on a connection or a vendor being up, and a model I downloaded won't change under me.
-Free after setup:Sorting thousands of files costs only a little electricity, so I can run it on a schedule without watching a bill.
-Right-sized and swappable:Filing is a small task, and a 3B model on a laptop handles it. Because the weights are open, --model lets me try Llama, Gemma or Phi and compare them on my own files.
The trade-off:a small model sometimes picks a vaguer category than a frontier model would. That's why the preview and undo exist. For files this personal, I'll take that trade.
Prize Categories
1.Use of Gemma
2.Use of Entire.
Top comments (0)