# SlothSort — Tidy Files, Slowly

> Source: <https://dev.to/saptanath_dev/slothsort-tidy-files-slowly-5e7o>
> Published: 2026-10-25 19:04:50+00:00

*This is a submission for the [Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady](https://dev.to/challenges/hacktoberfest-week3-2026-10-19)*

My Downloads folder has a familiar problem: files accumulate faster than I organize them. Screenshots end up beside lecture notes, code files get buried under documents, and filenames like document1.pdf, IMG_1234.jpg, and final_final_v2.txt don't make finding anything easier.

I built SlothSort, a local-first, AI-powered file organizer that does the tedious part for me.

SlothSort scans a selected directory, including nested folders, and suggests categories and more descriptive filenames using an open-weight Qwen model running locally through Ollama. It also detects exact duplicate files using SHA-256 hashing.

Instead of immediately making changes to my filesystem, SlothSort lets me review the proposed changes first. It creates organized copies in a dedicated output directory, preserves the original folder paths beneath category folders, and provides an undo mechanism for its copy operations.

The idea is simple: spend less time organizing files and more time doing literally anything else.

What it can do:

📂 Scan directories recursively.

🧠 Use local Qwen inference to suggest file categories and names.

🔍 Detect exact duplicates using file hashes.

✏️ Let users review and edit naming suggestions.

🛡️ Keep the original files untouched when creating organized copies.

↩️ Provide an undo mechanism for supported copy operations.

📴 Run its core workflow locally after the dependencies and model have been installed.

In the demo, I'll show the workflow from selecting a messy test directory to reviewing AI-generated suggestions and creating an organized copy.

The most important part is that SlothSort doesn't need to send my files to a third-party AI API to perform its core AI-assisted workflow.

**A local-first file organizer designed to make folder cleanup safer and less tedious.**

SlothSort is a work-in-progress project built with Python, FastAPI, a lightweight browser interface, and a locally running Ollama model (Qwen).

**Status:** In development. Features and setup instructions may change as the project is tested.

AI analysis may be skipped for file types where it is unlikely to be useful. Exact behavior depends on the current version.

File cleanup can be repetitive, and uploading personal…

The project is built with Python and a lightweight browser interface. Its core components include:

FastAPI for the backend and API endpoints.

HTML, CSS, and JavaScript for the user interface.

Ollama for local model inference.

Qwen 2.5 3B as the initial language model.

Python filesystem operations and SHA-256 hashing for file management and duplicate detection.

The goal is to keep the application simple enough to run on an ordinary laptop without requiring a cloud deployment or a complicated infrastructure setup.

I started with a simple local web application: a Python backend, a browser-based interface, and a local language model.

The first version could scan a folder and suggest categories, but it had two practical problems. It didn't inspect nested folders, and the AI analysis was slow enough that it wasn't always clear whether anything was happening.

I iterated on the application to address those issues.

**1. Local AI with Ollama and Qwen**

SlothSort uses Qwen 2.5 3B through Ollama. The model helps make naming and categorization decisions, while ordinary Python handles deterministic operations such as hashing files, creating directories, and copying files.

This separation matters: the model proposes what should happen, but the application is responsible for carrying out filesystem operations.

**2. Faster analysis**

Calling a language model for every file can be unnecessarily expensive in time and computation. SlothSort therefore uses extension-based rules for familiar file types and reserves AI analysis for text files and unknown file types by default.

An optional all-file analysis mode can request naming suggestions for additional file types, although binary files may provide only filenames and folder-path clues unless their contents are extracted or analyzed by a suitable model.

**3. Recursive scanning and safer organization**

The initial implementation only scanned files directly inside the selected folder. I changed it to scan nested directories and display their relative paths.

I also changed the organization workflow to create copies in a dedicated output directory rather than scatter files throughout the original directory. Existing destination files are not intentionally overwritten, and the original files remain available.

**4. Human review before changes**

AI suggestions aren't always correct. SlothSort lets users inspect the proposed categories and names before applying them.

The application combines AI assistance with conventional safeguards instead of giving the model unrestricted control over the filesystem.

For SlothSort, open innovation isn't just a way to avoid API costs. It changes where the computation happens and who controls the workflow.

**Privacy and local processing**

Files can contain personal documents, university assignments, screenshots, source code, and other sensitive information. Sending all of them to a remote AI service just to organize a folder is often unnecessary.

With Ollama running locally, SlothSort can send supported text previews to a model on the same machine rather than requiring a third-party inference API. This keeps the core workflow local, provided Ollama is configured to use a trusted local endpoint.

**Control over the model**

Using an open-weight model means I'm not locked into a single hosted AI provider. I can experiment with different compatible models, adjust prompts, and change how naming suggestions are generated.

**A more accessible development process**

Running inference locally makes experimentation practical without needing a paid API key or a deployed AI backend. The main costs are the hardware, storage, and time required to run the model.

There are trade-offs, of course. Local inference can be slower on a CPU, and a small model may generate inaccurate or overly generic names. Open innovation gives me the freedom to work on those limitations rather than treating a hosted model as a black box.

For a file organizer, keeping the data and the decision-making process under the user's control is a meaningful advantage.

The intended payoff is straightforward: fewer repetitive file-management decisions.

Instead of manually opening folders, deciding where files belong, and renaming them one by one, I can scan a directory, review a proposed organization plan, and let SlothSort prepare the copies.

I'm not claiming a measured time saving yet. I want to evaluate that properly by comparing manual organization with SlothSort on the same test folder.

The next improvements I'd like to explore are better content-aware naming for PDFs and images, clearer progress reporting, and automated tests for filesystem safety.
