DEV Community

Axyz
Axyz

Posted on

SlothDesk: I Built a Local AI File Organizer So I Could Stop Sorting Files Manually

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.

Every few days, I find myself doing the same boring task: opening random files, figuring out what they contain, deciding where they belong, and renaming them so I can actually find them later.

notes_final.txt, untitled_2.md, script_v2.py... the filenames don't always tell the whole story.

And honestly, organizing files is one of those tasks that's easy to postpone until the folder becomes a complete mess.

So for Hacktoberfest Week 3, I decided to build something that would let me be a little lazier.

Meet SlothDesk, an open-source, privacy-first AI file organizer that runs locally on your computer.

The idea is simple: let AI do the thinking, but let the human make the final decision.

What I Built

SlothDesk is a local AI-powered file organizer that reads supported documents, understands their contents, and recommends meaningful filenames and categories.

Instead of manually opening and sorting every document, I can place files in an Inbox and let SlothDesk prepare an organization plan.

Here's how it works:

Add files to the Inbox. SlothDesk discovers supported text and code files.

Choose which files to analyze. Select individual files or analyze a batch.

Let local AI understand the contents. Qwen2.5 generates a suggested category, filename, summary, and explanation.

Review the recommendations. Edit suggested filenames and categories, or exclude recommendations you don't want.

Approve the organization. Only then does SlothDesk move the selected files into their destination folders.

Undo when needed. The latest organization batch can be safely reverted.

For example, a file named untitled_2.md containing programming notes might receive a recommendation to move it into the Study category with a clearer filename.

The AI doesn't have permission to make that decision for me. It only prepares the suggestion.

Features I implemented

Local AI inference: Uses Ollama with the open-weight Qwen2.5 1.5B model.

Content-aware organization: Suggests categories, filenames, summaries, and reasons based on file contents.

Human-in-the-loop approval: Files never move simply because the model recommends it.

Selective analysis: Analyze only the files you choose, up to 12 per batch.

Real-time progress: Follow which file is currently being analyzed.

Partial-failure recovery: Successfully analyzed files remain available even if another file fails.

Retry support: Retry failed files without duplicating previous recommendations.

Safe file operations: Path validation, destination collision protection, and rollback safeguards.

Undo and history: Review organization batches and undo the latest active batch.

CSV export: Export the suggested organization plan.

Two visual themes: Warm Ivory with Emerald Green and Vermilion accents, plus a complementary Emerald Night theme.

Keyboard accessibility: Keyboard shortcuts, visible focus indicators, and responsive layouts.

The result is a lightweight application that lets me spend less time sorting files and more time working with them.

Demo

SlothDesk runs entirely on your computer using Ollama and the open-weight Qwen2.5:1.5b model.

Watch SlothDesk in Action

https://youtu.be/2Ciw7B5OaD4

Watch SlothDesk analyze documents locally, generate AI-powered recommendations, organize approved files, and demonstrate the Undo functionality.

SlothDesk in Action

Here's a look at SlothDesk running locally with Ollama and Qwen2.5:1.5b. Every screenshot shows the actual application using fictional sample files.

1. Warm Ivory: The Main Workspace

SlothDesk Warm Ivory interface showing the Inbox, AI Suggestions, organized folders, and history

The Warm Ivory workspace brings file selection, local model status, AI suggestions, and organization history together in one interface.

2. Emerald Night: Dark Mode

SlothDesk Emerald Night dark theme showing the local AI file organizer

The Emerald Night theme offers the same functionality with a darker, focused visual style.

3. Organizing Files and Tracking History

SlothDesk organized files with category counts and batch history

Files are grouped into categories after approval, and SlothDesk keeps a history of organization batches.

4. Local AI Analysis in Action

Qwen2.5 analyzing files locally and generating editable AI recommendations

Qwen2.5 analyzes documents locally and suggests categories, filenames, and summaries. Users can review and modify every recommendation before moving files.

5. Approval, Organization, and Undo

SlothDesk showing organized files, updated category counts, and undo history

After approval, files move into their categories. The latest organization batch can be undone to restore the files.

Try SlothDesk Locally

GitHub Repository: https://github.com/axyz97836/slothdesk

Official Release: https://github.com/axyz97836/slothdesk/releases/tag/v1.0.0

You can also follow the installation instructions in the README to run SlothDesk on your own computer.

SlothDesk is a local-first application, so there is no publicly hosted version. The interface runs on 127.0.0.1:8765, and the AI model runs through Ollama on the user's computer.

You can explore the project, its setup instructions, and the source code here:

Try SlothDesk locally

First, install Ollama and download the model:

ollama pull qwen2.5:1.5b

Make sure Ollama is running, then clone the project:

git clone https://github.com/axyz97836/slothdesk.git
cd slothdesk
python3 app.py

Open:

http://127.0.0.1:8765

From there, load the fictional sample files, select the files you want analyzed, review the AI suggestions, approve an organization plan, and try the Undo functionality.

The complete setup and troubleshooting instructions are available in the repository's README.

What the workflow looks like

    Files in Inbox
          |
          v
   Select Documents
          |
          v
  Local Ollama + Qwen
          |
          v
   AI Recommendations
   /       |        \
Enter fullscreen mode Exit fullscreen mode

Category Filename Summary
\ | /
v
Human Review
|
v
Explicit Approval
|
v
Organized Files
|
v
Undo Available

Everything happens on the user's own machine.

Code

SlothDesk is fully open-source and available under the MIT License.

Source Code:
https://github.com/axyz97836/slothdesk

Official Release:
https://github.com/axyz97836/slothdesk/releases/tag/v1.0.0

The repository includes the application source, automated tests, setup instructions, changelog, contribution guidelines, and security documentation.

The main technologies are:
Component
Technology
Backend
Python standard library
Frontend
HTML, CSS, Vanilla JavaScript
AI runtime
Ollama
Open-weight model
Qwen2.5:1.5b
Data storage
Local filesystem and JSON history
Testing
Python unittest and GitHub Actions
License
MIT
No external database, cloud inference service, or frontend framework is required.

How I Built It

I started with a simple question:

Can a small language model running on my laptop understand enough about a document to help me organize it?

Instead of building a complicated autonomous agent, I decided to keep the architecture straightforward.

  1. Running open-weight AI locally

The core of SlothDesk is Qwen2.5 1.5B, running through Ollama.

I chose a relatively small open-weight model because this task doesn't require a massive general-purpose reasoning system.

For every supported file, the Python backend reads its contents and sends an organization request to the local model.

The model returns structured recommendations containing information such as:

A suggested category

A clearer filename

A short summary

An explanation for the recommendation

The frontend then presents these as editable proposals.

One of the biggest advantages is that file contents don't need to be uploaded to a third-party AI inference service.

After installing Ollama and downloading the model, inference can run locally without an internet connection.

  1. Keeping the architecture lightweight

SlothDesk uses Python's standard library for its backend and regular HTML, CSS, and JavaScript for its frontend.

I deliberately avoided adding a heavy frontend framework, database, or background-job system.

The backend serves the interface, handles local AI requests, validates files, and performs approved filesystem operations.

The frontend handles file selection, recommendation review, progress indicators, editing, and user feedback.

This keeps the project approachable for anyone who wants to understand or modify it.

  1. Making AI recommendations safe

This was one of the most important engineering decisions.

Language models can generate useful suggestions, but they can also produce unexpected filenames or incorrect classifications.

I didn't want a model response to immediately trigger file operations.

SlothDesk separates the workflow into two stages:

Stage 1: Analysis

The AI reads supported files and prepares recommendations.

Stage 2: Approval

The user reviews, edits, and explicitly approves the selected recommendations before any files are moved.

The backend also validates source paths, destination filenames, file types, and file existence.

Destination creation uses no-overwrite safeguards, while organization history supports undoing the latest active batch.

These safeguards are useful, although they are not a claim that every possible filesystem race or platform behavior has been eliminated.

  1. Handling failures without losing progress

Originally, one failed AI request could disrupt an entire analysis batch.

I improved the workflow so that SlothDesk processes files individually and tracks real progress.

If the third file in a five-file batch fails, the successful results are preserved and the remaining files can still be processed.

Failed files are identified, and the user can retry them without generating duplicate recommendation cards.

I also added clearer error messages for situations such as Ollama being offline, inference timeouts, and malformed model responses.

  1. A real bug I encountered during CI

One of the most interesting problems appeared after the application passed its local tests.

A GitHub Actions test failed on Linux because of inode reuse on the ext4 filesystem.

During a simulated rollback race, a destination file was removed and immediately recreated by another process. Linux reused the same inode number, which caused the original rollback identity check to mistake the new file for the old one.

The fix strengthened destination identity verification using device and inode information along with file size and timestamps.

It was a useful lesson: passing tests locally doesn't guarantee that filesystem behavior will be identical across operating systems.

The improved checks passed the regression tests on GitHub Actions. They reduce the identified risk, but they are not an absolute guarantee against every possible concurrent filesystem modification.

  1. Building an interface I'd actually enjoy using

I also wanted SlothDesk to feel like a real productivity tool rather than a generic AI dashboard.

I created a two-pane workspace, with Inbox on one side and AI Suggestions on the other.

The design uses three main colors:

Warm Ivory for calm, readable surfaces.

Emerald Green for primary actions and selection.

Vermilion for distinctive visual accents.

There's also an Emerald Night theme for dark-mode users.

I added subtle animations tied to real events, including file analysis, new recommendations, successful organization, and undo.

The interface also supports keyboard navigation, accessible focus states, and layouts for smaller screens.

  1. Testing the complete workflow

I used AI-assisted development during the project, but I treated generated code as something that still needed review and verification.

The application went through multiple stages covering filesystem safety, UI design, inference reliability, accessibility, and documentation.

The final reported verification included:

38 passing automated Python tests

Python and JavaScript syntax checks

Successful GitHub Actions workflows

Real inference with Qwen2.5:1.5b

Full Inbox → Analysis → Approval → Organization → Undo testing

Responsive checks from 320px to 1440px

Error and recovery testing

The tests cover important regression cases, but like any project, they cannot prove the absence of all bugs.

Why Does Open Innovation Matter?

For me, open innovation isn't just about having access to source code.

It's about who controls the software, the model, and the data.

SlothDesk is a good example of why that matters.

Privacy without unnecessary uploads

The files SlothDesk processes can include personal notes, study materials, source code, or financial documents.

Using local inference means those contents do not need to be sent to a hosted AI provider for classification.

The application runs its inference through Ollama on the user's own machine.

Freedom to experiment

Because the model runs locally and the application is open-source, developers can inspect its behavior, improve prompts, change its organization rules, and extend its supported model configuration.

The AI component isn't hidden behind a proprietary service that users have no control over.

No per-request API billing

SlothDesk doesn't require a paid cloud inference API.

Users still bear their own hardware and electricity costs, but they don't need to purchase API credits just to classify a few documents.

Offline capability

Once the application, runtime, and model are installed, SlothDesk can perform its core analysis without an internet connection.

That's particularly useful for a local file utility.

The ability to learn from the implementation

I learned a lot from building the complete system, especially around local model integration, structured outputs, filesystem safety, concurrency, and testing.

Making the project open-source means someone else can study these decisions, challenge them, and improve them.

That's what I like most about open innovation: you're not only using technology, you're able to understand and change the technology you're relying on.

The Lazy Payoff

SlothDesk doesn't completely eliminate file management. It eliminates much of the repetitive decision-making involved.

Instead of repeatedly opening documents, figuring out their purpose, deciding which category fits, and thinking of better filenames, I can review a plan prepared by local AI.

The difference is that I'm reviewing decisions rather than starting each decision from scratch.

In local testing, the application successfully analyzed fictional sample documents, generated recommendations, organized approved files, and restored them through Undo.

A sample inference run took approximately 3.2 seconds per file on the tested local hardware. That's an inference measurement, not a measured time-saving benchmark.

The actual productivity benefit will depend on the user's files, model performance, and how often they need to correct the suggestions.

And I intentionally kept approval in the workflow.

The goal isn't to let AI take control of my files. It's to make organizing them less tedious while keeping me in control.

What I'd Improve Next

SlothDesk is a working first release, but there are still areas I'd like to explore:

Support for additional document formats, with appropriate parsing and privacy controls.

Better organization suggestions using filename and content context.

More flexible batch history and undo.

Further testing across operating systems and filesystem types.

Improved performance for larger collections.

Additional small local models for users with different hardware.

For now, the focus is on keeping the tool lightweight, understandable, and safe for its supported use cases.

Final Thoughts

Hacktoberfest Week 3's theme was Slow and Steady, and that's exactly the philosophy I tried to follow.

I didn't want to build an AI tool that aggressively changes everything on its own.

I wanted one that quietly does the boring thinking, gives useful recommendations, and lets me decide what happens next.

A little slower, perhaps, but much more deliberate.

That's SlothDesk.

If you're interested in local AI, Python, Ollama, or privacy-first developer tools, feel free to explore the repository, open an issue, or contribute.

GitHub: https://github.com/axyz97836/slothdesk

Release: https://github.com/axyz97836/slothdesk/releases/tag/v1.0.0

Thanks for reading

Top comments (0)