DEV Community

Cover image for SlothDesk: A Lazy, Offline AI That Cleans Your Downloads Folder
Deependra Gurjar
Deependra Gurjar

Posted on

SlothDesk: A Lazy, Offline AI That Cleans Your Downloads Folder

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 invoices. Sorting them by hand is 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's also built for people who don't want their documents going anywhere. Invoices, ID scans, and personal papers are the files you least want to upload to a cloud API, so SlothDesk runs entirely on your own machine.

What it does:

Reads the first 600 characters of .pdf, .txt, .md, .csv, .json, and .py files to understand what they actually are
Sorts each file into one of seven categories: Invoices & Receipts, Work & Documents, Code & Dev, Personal & Identity, Media & Assets, Archives & Installers, or Miscellaneous
Suggests a descriptive new filename for each file
Shows a dry run table with every proposed move, rename, and the AI's reasoning, so nothing changes until you approve it
SlothDesk runs locally, so there's no hosted link. You can try it yourself in a few minutes with the steps in the README.

Code

GitHub logo DeependraGurjar / SlothDesk

Private, local-first AI file organizer. Reads PDF and text snippets offline via Ollama to automatically rename and sort your Downloads folder without cloud APIs.

🦥 SlothDesk Desktop Cleaner

Clean your messy folders with 100% offline, open-source AI.

SlothDesk is a local-first file organizer built with Python, Streamlit, and Ollama. It reads a short preview of each file, uses a local LLM to decide where it belongs, and suggests a clear filename. Nothing is uploaded anywhere, and nothing moves until you approve it.


Features

  • Offline and private: runs on your machine through Ollama. No cloud APIs.
  • Content-aware: reads the first 600 characters of .pdf, .txt, .md, .csv, .json, and .py files instead of guessing from the extension.
  • Reliable output: Pydantic schemas keep the model's answers clean and valid.
  • Dry run first: preview every proposed move, new filename, and the AI's reasoning before anything changes.

Categories

Files are sorted into one of seven folders:

Category Examples
Invoices & Receipts bills, receipts, payment confirmations
Work & Documents reports, notes, letters
Code &
…

How I Built It

The whole project is built around open-source tools that run on a normal laptop.

Open-weight models via Ollama: SlothDesk uses small 3B models, qwen2.5:3b or llama3.2:3b, served locally by Ollama. They're small enough to run without a GPU, which fits the slow-and-steady theme.
Structured outputs with Pydantic: Small models can ramble or return messy text. I defined a Pydantic schema for the response (category, new filename, reasoning) and pass it to ollama.chat as the output format. That keeps the model's answer valid JSON with a category from the fixed list, so the app can trust the result instead of parsing free text.
Content previews with pypdf: For PDFs, pypdf pulls out the first 600 characters of text. Text-based files are read directly. Giving the model a snippet instead of the whole file keeps things fast and keeps the prompt small.
Streamlit UI: A simple Streamlit app lets you pick a folder, run the analysis, and review the dry-run table before applying anything.

The flow is: scan the folder, extract a preview, ask the local model for a structured answer, show the plan, and only then move files.

Why Does Open Innovation Matter?

For this project, open models weren't just a nice-to-have. They're the whole point.

A file organizer needs to read the contents of your files, and those files are often your most sensitive ones: invoices, certificates, identity documents. With a closed API, using AI for this means sending those documents to someone else's servers. With open-weight models and local inference, nothing leaves your machine. It also works offline, has no API bill, and has no rate limits.

Open tooling also made the project possible for a student on a normal laptop. Ollama, small open models, and Pydantic are all free and well documented, so I could build and test the idea without any paid service. And because the repo is open, anyone can add file types, categories, or support for other models.

Team

Built by me and my teammate Richa Kumari (GitHub).

Top comments (0)