DEV Community

Vibhanshu Singh
Vibhanshu Singh

Posted on Fully Autonomous

SlothSort: Let Your Downloads Folder Tidy Itself

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

What I Built

Downloads folders collect tiny decisions: keep the duplicate? Which file is latest? Is it safe to rename?

SlothSort takes one folder at a time. It asks a model running on the same machine for cleaner filenames, sorts top-level files into familiar type folders, then pauses for a person to review. You can untick any row. Nothing moves until you press Tidy selected.

Demo

Try the sample demo. The hosted page uses a fixed example pile; it cannot access a visitor's folders or run AI. To use local scanning and Gemma, follow the local setup steps.

Code

View SlothSort on GitHub.

How I Built It

SlothSort is a small Python server with a plain HTML, CSS, and JavaScript interface. The server binds to 127.0.0.1; Gemma 3 1B runs through Ollama on that same machine.

The app scans only the selected folder's top level. It sends filenames and extensions to Gemma, never file contents. File size and modified time stay local, where the server uses them for the list and to catch files that changed after a plan was made. Gemma suggests simpler names; a small extension map chooses predictable destination folders. I kept those two jobs separate so a model can't accidentally sort a JPEG into Documents.

Every move requires review. The server checks for existing destination names before starting, rejects stale plans, and offers an undo for the latest pass while the app remains open. It won't recurse into folders or make guesses about what's inside a file.

Why Does Open Innovation Matter?

A downloads folder can reveal a lot about someone. This task doesn't need document contents, and it doesn't need a hosted inference service. With open-weight Gemma running locally, even filenames stay on the machine; after the model is downloaded, the tidy-up flow can run without an API key or per-request cloud bill.

The model is also replaceable: SlothSort can use another model already installed in Ollama. The file-moving rules remain visible in the code, and the person with the folder still gets the final say.

Prize Categories

  • Best Use of Gemma

Top comments (0)