DEV Community

Cover image for πŸ¦₯ SlothSort : Messy files πŸ“ to Calm folders πŸ—‚οΈ
Shreyas Guha Neogi
Shreyas Guha Neogi

Posted on

πŸ¦₯ SlothSort : Messy files πŸ“ to Calm folders πŸ—‚οΈ

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

SlothSort is a privacy-first, local AI file organizer that turns your chaotic Downloads folder into a structured workspace. It scans your digital clutter, uses local AI to classify each file, and presents a neat organization plan. You simply review the proposed folders and click "Approve"β€”letting you reclaim your time and embrace your inner sloth without compromising your data.

Demo

Project will run on localhost and does not have a .com link

Code

        .-""""-
       /  .--.  \      πŸ¦₯  slow sorting, steady results
      /  /    \  \
      | | 0  0 | |      [ messy files ]  ->  [ calm folders ]
      | |  __  | |
       \ \____/ /
        '.___.'
          /|\
       __/ | \__

SlothSort

Python Streamlit Ollama License: MIT

SlothSort uses local AI to turn your messy Downloads folder into an organized workspace, without uploading your private files.

πŸ¦₯ Slow and Steady

SlothSort is built for the DEV Community Slow and Steady theme: let a local open-weight model do the tedious sorting work while you stay relaxed, private, and in control. It rewards laziness without outsourcing your data: Gemma runs through Ollama on your machine, SlothSort proposes a plan, and you approve only the moves you actually want.

The app is deliberately cautious. It scans direct child files, classifies filename and extension metadata, shows a review table, and waits for an explicit approval before moving anything.

🎬

…

How I Built It

SlothSort is designed entirely for local, offline execution to prioritize data sovereignty:

  • UI & Logic: Py & Streamlit power user interface & safe-move execution layer.

  • Inference: Ollama handles the local model serving.

  • The Brain: Gemma 3 : 1B evaluates file metadata and outputs constrained JSON to assign predefined categories (e.g., Finance, Documents, Media).

The architecture separates planning from execution. The AI suggests the plan, but a strict Python validation layer enforces collision protection, path traversal blocks, and requires explicit human approval before a single file is moved.

Why Does Open Innovation Matter?

Sorting personal files demands absolute privacy. Relying on a closed-source API would mean streaming sensitive filenames (like 2026_Tax_Return.pdf or Medical_Records.docx) to third-party cloud servers. By leveraging open-weight models like Gemma running locally, SlothSort guarantees zero data leakage, zero API subscription costs, and the freedom to automate your chores completely offline.

My Agent Session

Building SlothSort: A Slow and Steady Local-AI File Organizer
You

Build SlothSort incrementally as a local-AI file organizer using Python, Streamlit, and Ollama, with strict privacy and no-overwrite requirements.

Agent

Audited the repository, confirmed Python and local Ollama availability, and planned a focused package structure without modifying code during the audit.

You

Implement the project scaffold, read-only scanner, local Ollama adapter, classification planner, Streamlit review workflow, and safe execution layer.

Agent

Implemented the system in incremental phases: pathlib scanning, localhost-only Ollama JSON inference, allowlisted classification, root-safe planning, human approval, and collision/symlink-protected execution. Each phase was tested and committed separately.

You

Perform a comprehensive regression and security audit.

Agent

Ran the full suite, fixed a destination symlink-component issue, added regression coverage, and verified that model output cannot supply trusted paths and session state does not retain file contents.

You

Prepare the final demo and hackathon README.

Agent

Generated ignored demo files, verified repository hygiene, wrote a judge-focused README with privacy guarantees and architecture details, and added an MIT license. The final project emphasizes local open-weight inference, explicit approval, and slow-and-steady safety.

The Lazy Payoff

Instead of spending thirty minutes a week agonizing over where to drag-and-drop hundreds of random downloads, I now click a single button, review the table, and hit "Organize." What used to be a dreaded, procrastinated digital chore is now a satisfying 10-second approval task.

Prize Categories

  • Open-Weight Champion (Gemma)
  • Local Inference Hero

Top comments (1)

Collapse
 
parsa_m profile image
Parsa Mohammadi •

nice that python owns the paths, the model can’t move something it made up. i’d write each move to a log before doing it, src and dst. then undo is just running it backwards, and if it dies halfway you know what moved