SlothSort: An AI Folder Tidier That Does the Work While You Do Nothing (Local Gemma)

SlothSort: An AI Folder Tidier That Does the Work While You Do Nothing (Local Gemma)

# devchallenge# hf26challenge# opensource# weekendchallenge
SlothSort: An AI Folder Tidier That Does the Work While You Do Nothing (Local Gemma)Diptanil Sen

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady ...

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

SlothSort tidies a messy folder so you don't have to.

Everyone has a Downloads folder full of files like IMG_20251003_184512.jpg, download(3).zip and final_FINAL_v3.docx. Sorting them is a chore that never gets done. With SlothSort, you type the folder path and press one button. It reads each file's name (and the first few lines of text files) and suggests a folder and a clean name for each one. You look over the list, untick anything you want left alone, and press Tidy it up.

It's built for anyone who keeps putting off tidying their files. It never deletes anything, never overwrites a file, and has an Undo button for the last tidy-up.

Demo

Code

SlothSort

Lazy file tidier: Gemma (running locally in Ollama) suggests folders and clean names for a messy folder. You review, press one button, and it moves files. Nothing is deleted, and the last tidy-up can be undone. Run: pip install -r requirements.txt && python -m uvicorn app:app --port 8003 (open http://127.0.0.1:8003)




How I Built It

  • Model: Gemma 3, an open-weight model, running locally through Ollama.
  • Backend: a small FastAPI app in Python. It lists the loose files in a folder, sends their names and short text snippets to Gemma in one prompt, and parses the JSON that comes back.
  • Safety: the server cleans every suggested folder and file name, keeps each file's original extension, refuses paths outside the chosen folder, and adds a number to a name instead of overwriting anything. Every move is logged so it can be undone.
  • Frontend: a single HTML page with a folder box, a reviewable list with checkboxes, and Tidy and Undo buttons.
  • Auto-detect: the app finds whichever Gemma model is installed in Ollama, so there is nothing to configure.

I built the project with AI assistance (Claude) and ran it on my own Ubuntu laptop.

Why Does Open Innovation Matter?

  • Privacy: file names and the contents of notes, invoices and personal documents stay on my machine. A tool like this would be uncomfortable to run through a cloud API.
  • Offline: once the model is downloaded, it needs no internet connection.
  • Cost: there are no per-request fees, so I can run it on any folder as often as I like, forever.
  • Control: because the model is open, I can swap it for another one or change the naming rules in the prompt without asking anyone.

The Lazy Payoff

I tested SlothSort on a folder of 23 messy files: photos named IMG_2025..., PDFs like Invoice-4821 (1).pdf, a few zips, and ten text files with notes, a grocery list and a CSV of expenses.

By hand: I sorted them into folders and gave them proper names. It took me 11 minutes, and I gave up on renaming the last few.

With SlothSort: I typed the folder path and pressed one button. Gemma 3 (4B) on my laptop, with no graphics card, took about 3 minutes to read the files and suggest a plan. I spent roughly 40 seconds looking over the list and unticking two files, then pressed Tidy it up. The move itself took under a second. I did other things while it thought, so the time I actually spent was under a minute.

What it got right: It made sensible folders like Invoices, Photos and Notes, and it turned the text files into good names. The note starting "Meeting notes 12 Oct 2026" became meeting-notes-2026-10-12.txt.

What it got wrong: It put boarding-pass-CCU-DEL.pdf in Invoices instead of a travel folder. Because it only sees the file names for photos and PDFs, it also couldn't tell what the two photos were. That's why the list is a preview with checkboxes, not an automatic move. The Undo button put everything back in one click.

Verdict: For a folder this size the saving is small, but a Downloads folder with hundreds of files is where this gets worth it. I'd like to add a "read the first page of each PDF" step next.

Prize Categories

  • Best Use of Gemma