Downloads Sloth 🦥: Slow, Steady, and Lazy File Sorting with Open-Weight AI
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
🏆 The Challenge: Slow and Steady
The prompt for Week 3 was to build something with open-source AI at its core that rewards laziness .
My Downloads folder is a graveyard of forgotten installers, random screenshots, and invoices named document(1).pdf. Manual sorting is tedious, and giving a closed-source AI access to my personal files felt risky.
Enter Downloads Sloth: a lazy, careful, open-weight file tidier. It embraces the "Slow and Steady" philosophy by waiting for downloads to finish, respecting API rate limits, and previewing moves before executing them. It rewards laziness by running silently in the background, sorting your mess, and writing a daily digest—so you never have to look at your Downloads folder again.
🎥 Demo Video
Here is a quick code-only demo showing the Sloth in action: checking API limits, running a safe dry-run, sorting files for real, and using the local dashboard.
🦥 What I Built
Downloads Sloth is a Python automation that watches your Downloads folder, reads new files, gives them sensible names, sorts them into categories, and logs every decision to SQLite.
How it rewards laziness:
- Set it and forget it: Run it via Windows Task Scheduler on logon. It watches continuously.
-
Zero API waste: Obvious files (
.zip,.exe,.mp4) are sorted locally via extension rules. -
Privacy-first: Files matching patterns like
passport,bank,tax, orresumeare never sent to the AI. They are sorted locally by name. - Safe by default: It defaults to a dry run. It predicts where files will go without moving them. When you're ready, you sort for real.
-
Fully undoable: Made a mistake?
python sloth.py undo --last 5puts everything back exactly where it was.
🛠️ How I Built It
The project is intentionally lightweight and relies on open-source tools:
-
Core: Python 3.11+ (using standard library
sqlite3,http.server, andtomllib). - The Brain: Gemma 4 31B (an open-weight model under Apache 2.0) via OpenRouter.
-
Vision/Docs:
Pillowfor downscaling images,pypdfandpython-docxfor extracting text excerpts. -
UI: A zero-dependency, local-only web dashboard built with Python's standard library
http.serverand vanilla JS. It shows the "pile" of waiting files, the "shelves" of sorted files, and a live console.
🌍 Why Open Innovation Matters for this Project
The challenge asked us to explain why open-source AI matters for what we built . For a file sorter, open innovation is a strict requirement for trust.
- Privacy and Transparency: You are asking an AI to read your financial statements, medical prescriptions, and personal resumes. With closed-source models, you are sending that text into a black box. By using an open-weight model like Gemma 4, the community can audit how the model behaves.
-
No Vendor Lock-in: Because the Sloth uses an OpenAI-compatible API endpoint, you aren't tied to one provider. If you want maximum privacy, you can change one line in
config.tomlto point to a local Ollama server running on your own hardware. Open-source AI gives users the freedom to own their inference. -
Community Extensibility: Hacktoberfest is about community. Because the sorting logic, privacy rules, and categories are exposed in a simple
config.tomland standard Python code, anyone can fork the repo, add new extension rules, or translate the dashboard without fighting a proprietary API.
💻 Try It Yourself (The Lazy Way)
Repo:
Downloads Sloth
A lazy file tidier powered by an open-weight model (Gemma 4 31B via OpenRouter) Drop files in Downloads. The sloth reads them, renames them, sorts them, and leaves a short digest. It never deletes anything, and every move can be undone.
Setup (Windows, PowerShell)
pip install -r requirements.txt
setx OPENROUTER_API_KEY "sk-or-your-key" # then close and reopen PowerShell
Edit config.toml if your folders differ (defaults: ~/Downloads -> ~/Downloads/_Sorted).
Use
python sloth.py check # test key + show your real OpenRouter limits
python sloth.py once --limit 10 # dry run on 10 files (default mode: moves nothing)
python sloth.py once --live # actually move files
python sloth.py run --live # watch continuously
python sloth.py undo --last 5 # put the last 5 moves back
python sloth.py digest # write today's summary
python sloth.py ui # local web dashboard (needs nothing extra)
Dashboard
python sloth.py ui opens http://127.0.0.1:8765. It…
# 1. Install dependencies
pip install -r requirements.txt
# 2. Set your OpenRouter API key (free tier works fine!)
setx OPENROUTER_API_KEY "sk-or-your-key"
# 3. Check your limits and test the model
python sloth.py check
# 4. Preview what the sloth wants to do (moves nothing)
python sloth.py once --limit 10
# 5. Sort for real
python sloth.py once --live
# 6. Open the local web dashboard
python sloth.py ui
🌱 Hacktoberfest Contribution Ideas
Want to earn your Hacktoberfest PRs? The Sloth needs your help:
- Add more local extension rules or privacy patterns.
- Improve the vanilla JS dashboard styling.
- Add support for local audio transcription for
.mp3sorting. - Write unit tests for the privacy regex engine.
Check out the code
Downloads Sloth
A lazy file tidier powered by an open-weight model (Gemma 4 31B via OpenRouter) Drop files in Downloads. The sloth reads them, renames them, sorts them, and leaves a short digest. It never deletes anything, and every move can be undone.
Setup (Windows, PowerShell)
pip install -r requirements.txt
setx OPENROUTER_API_KEY "sk-or-your-key" # then close and reopen PowerShell
Edit config.toml if your folders differ (defaults: ~/Downloads -> ~/Downloads/_Sorted).
Use
python sloth.py check # test key + show your real OpenRouter limits
python sloth.py once --limit 10 # dry run on 10 files (default mode: moves nothing)
python sloth.py once --live # actually move files
python sloth.py run --live # watch continuously
python sloth.py undo --last 5 # put the last 5 moves back
python sloth.py digest # write today's summary
python sloth.py ui # local web dashboard (needs nothing extra)
Dashboard
python sloth.py ui opens http://127.0.0.1:8765. It…
, drop a star, and let the Sloth tidy up your digital life! 🦥
Top comments (0)