I Taught a Sloth to Write Its Own Chores (Then Put It in a Cage)
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built Sloth is a single Python file that does file chores from one sentence. You type something like sort everything in Downloads by file type , a local open-weight model writes a tiny script for it, Sloth shows you the plan, and you press y once. That is the whole interface. I pointed it at my own…
The wire material details the creation of a Python-based program called Sloth, which uses a local open-weight model to automate file management tasks without requiring any cloud-based services or per-run costs. The user simply describes a chore in English, and Sloth generates a tiny script using a small set of helper functions to execute the chore.
The entire process occurs locally through Ollama, a self-hosted open-source AI platform. Sloth can read the contents of PDFs, Word files, and screenshots, allowing it to sort files based on their content rather than just file extensions. The program runs on models and packages that were already available on the user's laptop, with no additional downloads required.
The author presents an example where they used Sloth to sort files in their Downloads folder by file type, resulting in 15 sorted files. By using an undo stack, the user can easily revert any changes made by Sloth if needed.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.