This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Everyone's default Downloads and Desktop folders quickly become digital landfills of chaos. Cryptic files like download (1).pdf, scan_0042.jpg, W2_Tax_Year_2025.txt, and untitled_notes_oct.md pile up over months. We all know we should organize them, but manual file triage is one of the most soul-crushing, procrastination-inducing chores on a computer.
SlothSort is built to let you channel your inner sloth. It is an autonomous, 100% local file and clutter organizer powered by quantized open-weight Small Language Models (SLMs) such as Llama 3.2 3B and Qwen 2.5 3B running through Ollama.
What It Does:
- Sniffs 2KB File Headers: Instead of freezing your computer by reading massive files, SlothSort safely samples the first 2,048 bytes of documents, scripts, and media metadata.
- Understands Document Intent: The local open-weight model analyzes the snippet, infers the true semantic purpose of the file, assigns it to one of 18 structured vault domains, and generates a clean, normalized, date-stamped title (e.g., transforming
download (1).txtinto2026-10-22_Cloud_Compute_Invoice.txt). - Reversible Safe Move: Files are moved into structured category vaults with automatic collision prevention.
- Append-Only Audit Manifest: Every single file operation is logged into an immutable JSONL manifest (
slothsort_manifest.jsonl), enabling instant 1-click total undo. - Modern Glassmorphic Web Dashboard: A viewport-fitted (
100vh) dashboard with dense ~38px file tiles, in-app file modal previewer (image rendering, syntax highlighting), batch operations (move, bulk delete, ZIP archive download), and a collapsible real-time engine stream terminal.
Who gets to be lazier?
Developers, students, remote workers, accountants, and anyone who has ever stared at a 500-item Downloads folder in quiet despair. You click "Sort Now" once, and your clutter vanishes into organized vaults while you relax.
Demo
- GitHub Repository: https://github.com/tharu200304/SlothSort
- Latest Release: SlothSort v1.0.0 on GitHub Releases
Visual Dashboard Highlights:
Autonomous Sorting in Action:
The dashboard displays a dual-panel workspace: messy inbox on the left with instant AI pre-scan confidence, and the categorized Organized Vault on the right.High-Density Compact Tiles:
File cards are condensed down to sleek ~38px two-line tiles showing category icons, original vs. new filenames, file size, truncated AI reasoning snippets (💡 ...), and micro-action toolbars (Copy Path, Move, Rename, Download, Preview, Delete).In-App Modal Previewer & Batch Actions:
Inspect syntax-highlighted code, Markdown notes, or images directly in-browser. Multi-select files to batch-move across categories or download as a bundled ZIP archive.
Code
tharu200304 / SlothSort
SlothSort is an autonomous local file and clutter tidier.
SlothSort
Autonomous Local AI File & Clutter Tidier powered by Open-Weight Models.
100% Offline • Zero Cloud Egress • Zero Marginal Token Fees • Complete Reversibility
📑 Table of Contents
- The Problem & The Vision
- Why Local Open-Weight AI Matters
- How SlothSort Works (Under the Hood)
- Key Features
- System Architecture
- The 18 Built-in Semantic Domains
- Supported Local AI Models
- Installation & Quickstart
- Command Line Interface (CLI)
- REST API Reference
- Security, Privacy & Safety Guarantees
- Project Structure
- Troubleshooting & FAQ
- License & Acknowledgements
💡 The Problem & The Vision
Every developer, knowledge worker, and student knows the "Downloads Folder Graveyard." Over weeks and months, our default download and desktop directories become chaotic dumping grounds for hundreds of files:
Downloads/ ├── download (1).pdf <-- Actually a quarterly cloud compute invoice ├── scan_0042.jpg <-- Prescription blood test lab results ├── W2_Tax_Year_2025.txt <-- Personal income tax…The repository is structured with clean separation of concerns and zero unnecessary dependencies:
slothsort/ ├── app.py # FastAPI backend server with REST endpoints & file management ├── slothsort.py # Core local AI sorting engine, CLI, & heuristic classification ├── requirements.txt # Minimal Python dependencies (FastAPI, Uvicorn, Requests) ├── LICENSE # MIT License ├── README.md # Comprehensive documentation & architectural diagrams ├── assets/ # Cover banners & media assets ├── messy_inbox/ # Default sandbox input directory for unorganized files ├── organized_vault/ # Default output directory with categorized subvaults └── static/ # Modern Glassmorphic Web Dashboard ├── index.html # Viewport-fitted semantic HTML interface ├── style.css # Vanilla CSS design system (Dark mode, glassmorphism) └── app.js # Reactive vanilla client with preview & batch workflows How I Built It
SlothSort is designed around the philosophy that local Small Language Models (SLMs) are the perfect tool for local desktop automation.
1. Local Open-Weight Inference (Ollama)
I integrated Ollama to orchestrate local open-weight models:
-
Llama 3.2 3B(Meta): The default engine. At only ~2.0 GB of VRAM/RAM, it runs blisteringly fast even on low-power laptop CPUs. -
Qwen 2.5 3B(Alibaba): Secondary model option with outstanding multilingual handling and code comprehension. -
Phi-3.5 Mini&Mistral 7B: Available for deeper semantic understanding and strict JSON schema generation.
The model is prompted with strict JSON schema instructions:
{ "category": "Invoices & Receipts", "suggested_filename": "2026-10-22_Cloud_Compute_Invoice.txt", "summary": "Cloud infrastructure compute invoice for October billing cycle", "reasoning": "Detected compute instance charges, billing account ID, and total due", "tags": ["invoice", "cloud", "billing"], "confidence": "98% (High)" } 2. Dual-Engine Architecture with Heuristic Fallback
If a user hasn't installed Ollama or doesn't have it running, SlothSort does not break. It features a built-in deterministic heuristic rule engine covering all 18 semantic categories with binary magic number detection, regex pattern matching, and file signature parsing.
3. Backend (FastAPI & Python 3.9+)
The backend in app.py exposes lightweight REST endpoints (/api/state, /api/sort, /api/undo, /api/file-content, /api/batch-action) with universal path resolution that supports Windows drive letters (D:\...), Unix home paths (~/...), and relative paths.
4. Viewport-Constrained Frontend (Vanilla HTML/CSS/JS)
The web interface is built with zero heavyweight frontend frameworks:
- Strict 100vh constraint: The page fits completely inside the browser viewport with zero outer body scrolling.
- Sub-40px Compact Tiles: Formatted to display dozens of files on screen simultaneously.
- Docked Collapsible Terminal: The bottom engine stream stays out of the way as a 26px live status ticker, expanding via
▲ / ▼into an audit history.
Why Does Open Innovation Matter?
Open innovation isn't just a technical preference for this project—it is the only way this project could ethically and practically exist.
1. The Ultimate Privacy Barrier
The files inside a person's Downloads or Desktop folder are the most sensitive data on their machine:
- Personal tax returns (W-2s, 1099s)
- Bank statements and credit card receipts
- Proprietary source code and API credentials
- Client non-disclosure agreements and contracts
- Medical lab reports and prescriptions
Sending these personal documents across the internet to a third-party commercial cloud AI API violates personal privacy, GDPR, and enterprise compliance. With open-weight models running on localhost, not a single byte ever leaves the user's computer.
2. Zero Marginal Cost for Background Daemons
Continuous background automation using closed proprietary APIs creates constant token anxiety. If a script runs in the background sorting dozens of files every day, subscription bills quickly accumulate. With open-source 3B models, inference costs $0.00 forever.
3. Air-Gapped Autonomy
Closed AI fails the moment you lose internet access. Open-weight models allow SlothSort to organize files seamlessly on an airplane, on a train, or in an off-grid cabin.
4. Full Auditability and Trust
Because the code, the model weights, and the audit manifest (slothsort_manifest.jsonl) are open-source and inspectable, users don't have to take our word for it—they can verify that their files are never tampered with and can always be reverted with a single click.
My Agent Session
The entire development process of SlothSort—from initial architecture brainstorming, designing the dual-engine heuristic and local LLM pipelines, creating the FastAPI + Vanilla JS glassmorphic dashboard, to setting up reversible undo manifests and releases—was developed interactively with the AI agent.
You can inspect the full, interactive transcript of this development session directly on DEV:
