SlothDesk: A Lazy, Offline AI That Cleans Your Downloads Folder
hacktoberfest #hf26challenge #ai #opensource
Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.
What I Built
SlothDesk is a private, local-first AI file organizer. It reads a short text preview of the files in a messy folder (my Downloads folder was the inspiration), decides where each one belongs, and suggests a clear, descriptive filename.
Everyone has a folder full of scan_0043.pdf, final_final_v2.docx, and random receipts. Sorting them by hand is tedious and exactly the kind of chore a sloth would avoid. SlothDesk does the thinking for you, so you only have to look over the plan and click apply.
It is also built for anyone who doesn't want their documents uploaded to a remote server. Invoices, ID scans, and personal papers are the files you least want to send to a third-party cloud API, so SlothDesk runs entirely on your own machine.
What it does
Reads the first 250–600 characters of .pdf, .txt, .md, .csv, .json, and .py files to understand what they actually contain.
Sorts each file into one of standard categories: Invoices & Receipts, Work & Documents, Code & Dev, Personal & Identity, Media & Assets, Archives & Installers, or Miscellaneous.
Suggests a descriptive, clean filename for each file while preserving the extension.
Shows a dry-run table with every proposed move, rename, and the AI's reasoning, so nothing changes on your disk until you approve it.
SlothDesk runs locally, so there is no hosted web link. You can run it on your own machine in a few minutes with the steps in the repo.
Code
🦥 SlothDesk: The "Slow and Steady" Offline File Organizer
Channel your inner sloth. Let local open-source AI clean your chaotic Downloads folder so you don't have to.
📖 Overview
SlothDesk is an automated desktop tidy-up agent built for the "Slow and Steady" open-source AI hackathon.
Instead of spending hours manually dragging invoices, receipts, code snippets, and installers into designated folders, SlothDesk inspects your chaotic directories, understands the contents, renames files cleanly, and proposes a tidy reorganization plan—all running completely on your local machine.
🌟 Why Open Source Matters (The Core Philosophy)
Closed-source cloud APIs make privacy impossible for desktop automation. A file organizer needs to touch bank statements, tax documents, ID copies, and proprietary code files. Sending those files across the wire to a remote cloud server is a major security and privacy compromise.
SlothDesk solves this through open innovation:
- 100% Local & Confidential: Using Ollama and open-weight models (…
How I Built It
The entire project is built around open-source tools that run smoothly on a regular laptop.
Open-weight models via Ollama: SlothDesk uses lightweight models (llama3.2:1b or llama3.2:3b) served locally by Ollama. They are small enough to run on standard hardware without requiring an expensive cloud GPU setup.
Structured outputs with Pydantic: Small local models can sometimes produce conversational filler text. I defined a Pydantic schema for the output (category, suggested_filename, reason) and passed it directly to ollama.chat using its JSON schema mode. This ensures the output is always valid JSON matching the exact categories.
Content previews with pypdf: For PDFs, pypdf extracts the first snippet of text. Text-based files are read directly from the disk. Passing only an opening preview keeps prompt processing fast and prevents memory bottlenecks.
Streamlit UI: A simple Streamlit dashboard lets you pick the directory, tune batch sizes, run the analysis, and review the dry-run table before moving anything.
The core flow is: scan the directory, extract a lightweight snippet, ask the local model for a structured response, display the dry-run plan, and execute file moves only after user confirmation.
Why Does Open Innovation Matter?
For this project, open models weren't just an alternative—they were the entire point.
A file organizer needs to inspect the actual contents of your documents, and those files are often sensitive: invoices, certificates, and personal identity papers. With closed APIs, using AI requires sending that private data over the network to a third party's servers. With open-weight models and local inference via Ollama, zero bytes leave your laptop.
Open tooling also makes this accessible on standard hardware without recurring subscription bills or API rate limits. Ollama, open-weight models, Python, and Streamlit are completely free and transparent, making it possible to build, test, and adapt the project off-grid with full control.****
Top comments (0)