I Built SlothSort AI: A Local-First File Organizer with AI-Powered Naming Suggestions 🦥
Have you ever opened a folder and found yourself staring at filenames like lec-3.pdf, stuff.txt, or IMG_2026.png, wondering what to rename first?
Renaming files one by one is repetitive. I wanted to build something that could make this process simpler while keeping the user in control.
That's how SlothSort AI came to life.
🔗 GitHub Repository: https://github.com/Manish010325/slothsort-ai
💡 What is SlothSort AI?
SlothSort AI is a file organizer that uses a locally running AI model to suggest clearer, more consistent filenames.
Instead of automatically renaming everything, it follows a simple principle:
AI suggests. You decide.
The user reviews the suggestions, selects the desired changes, and can undo the last rename operation.
✨ What can it do?
- 📂 Scan folders: View filenames, extensions, file sizes, and modification dates.
- 🧠 Generate suggestions: Use a local Gemma model through Ollama to suggest better filenames.
- ✅ Keep control: Select which suggested renames to apply.
- ↩️ Undo changes: Restore filenames from the most recent rename batch.
- 🛡️ Validate requests: Check proposed changes before renaming files.
- 🔒 Run locally: Use local AI inference instead of relying on a hosted AI API for filename suggestions.
🛠️ Tech Stack
Here's what I used to build it:
- Frontend: HTML, CSS, JavaScript
- Backend: Node.js and Express.js
- Local AI: Ollama with Gemma (
gemma4:e2b) - Testing: Node.js built-in test runner
I wanted to keep the stack straightforward while learning how a frontend, backend, file system operations, and a locally running AI model can work together.
⚙️ How does it work?
The workflow is simple:
- Scan the demo folder.
- Review the available file information.
- Generate filename suggestions using the local model.
- Select the changes you want to apply.
- Apply the renames or undo the last batch.
The application works with filenames and file metadata; it doesn't need to read document contents to generate suggestions.
🚀 Run it locally
You'll need Node.js, npm, and Ollama installed.
1. Clone the repository
git clone https://github.com/Manish010325/slothsort-ai.git cd slothsort-ai 2. Install dependencies
npm install 3. Download the model
ollama pull gemma4:e2b Make sure Ollama is running.
4. Start the application
npm run dev Open http://localhost:3000 in your browser.
5. Run the tests
npm test The current test suite covers folder scanning, AI suggestion validation, and rename/undo behavior. All nine tests passed in my latest local run.
🔐 Why local-first AI?
I wanted to explore a practical use of AI without making a hosted AI service a requirement for filename suggestions.
Running the model locally keeps the inference process on the user's machine. However, this doesn't replace normal file backups or eliminate every possible file-system risk, so changes should still be reviewed carefully.
🌱 What I learned
Building SlothSort AI helped me bring together several concepts:
- Integrating a local AI model into a Node.js application
- Validating model-generated output before using it
- Working with file-system operations and rename conflicts
- Writing automated tests for important application behavior
- Designing a workflow where users approve AI-generated changes
One important lesson: getting AI to generate a suggestion is only part of the job. Building safeguards around what happens next matters just as much.
🤝 Explore the project
SlothSort AI is an open-source learning project, and I'd love for developers to explore the code, try it locally, and share constructive feedback.
🔗 Repository: https://github.com/Manish010325/slothsort-ai
I'd especially appreciate feedback on the filename suggestion workflow, file-safety checks, and ways to make the project more useful.
A question for the community: Would you prefer an AI file organizer that suggests filenames only, or one that also recommends folders and categories?
Thanks for reading! 🦥

