跳到正文
DEV Community· Omkar Tipugade·· 28 天前AI 評分49

SlothDesk:主打私隱、以本機 AI 整理檔案的桌面工具

SlothDesk: The Privacy-First Local AI File Organizer That Rewards Your Laziness 🦥

AI 導讀

SlothDesk 使用 Ollama 本機執行開放權重模型 qwen3:4b,掃描檔名、副檔名及檔案大小,並提出分為 10 類的整理方案。用戶可先預覽及核准檔案移動;工具不會刪除檔案,亦會以 SHA-256 偵測完全重複的檔案。項目以 MIT License 開源,整理約 350 個檔案的示例中,掃描及規劃需時 6 至 8 秒。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady

What I Built

Almost every developer and computer user shares the same guilty secret: a chaotic Downloads or Desktop folder.

Invoices from last spring sit next to software installers, resume revisions (resume_final_v3_really_final.pdf), random screenshots, podcast clips, and zip files. Cleaning it up is a chore we all dread. The thought of manually creating folders, clicking and dragging hundreds of files, and double-checking that we don’t accidentally delete a tax document or legal agreement is paralyzing.

In honor of International Sloth Day and Hacktoberfest’s "Slow and Steady" theme, I built SlothDesk 🦥.

SlothDesk is a desktop file organization assistant that brings order to cluttered directories using 100% local, open-source AI (qwen3:4b via Ollama).

Who gets to be lazy because of it?

Anyone with a messy computer who never wants to spend their Sunday afternoon sorting files again! Instead of manually curating files:

  1. You point SlothDesk to your messy folder.
  2. The local AI scans file metadata and proposes a structured organization plan into 10 distinct categories (Documents, Invoices, Resumes, Code, Data, Images, Audio, Video, Notes, Other).
  3. You review the proposed moves in a clean dashboard and click Confirm.
  4. SlothDesk executes the moves safely and atomically.

Key Safety Principles:

  • 🔒 Zero Cloud Calls: All inference runs offline on your machine via Ollama. No bank statements, resumes, or client contracts are ever sent to third-party servers.
  • 🛡️ Human-in-the-Loop: It never moves a single file without your explicit preview and approval.
  • 🚫 Never Deletes: SlothDesk only reorganizes and archives — it never deletes your files.
  • 🔍 Duplicate Detection: Scans for exact duplicates via fast SHA-256 content hashing without altering original files.

Demo

Watch the full walkthrough and live demonstration of SlothDesk in action:

Direct link: https://youtu.be/ed1we1ikHrk


Code

SlothDesk is 100% free and open source under the MIT License:

GitHub Repository: https://github.com/OmkarTipugade/SlothDesk


How I Built It

SlothDesk was designed from the ground up around local-first open-source AI inference and non-destructive execution.

1. The AI Engine: Open-Weight Inference with Ollama & Qwen

Rather than hardcoding rigid regex rules or file-extension dictionaries (which fail when distinguishing a receipt.pdf from a resume.pdf), SlothDesk uses the open-weight qwen3:4b model hosted locally through Ollama.

  • Read-Only Metadata Scanner: SlothDesk only inspects filenames, extensions, and file sizes. It never needs to parse or upload document contents.
  • Structured JSON Planning: The backend streams the sanitized inventory to Ollama using structured prompt heuristics, receiving back exact categorical destinations with human-readable reasoning for every file.

2. Two-Phase Move Protection & Security

Desktop file management requires zero margin for error:

  • Symlink & Traversal Guards: Resolves strict real paths to prevent path traversal (../) attacks.
  • Collision Avoidance: Checks if a target file already exists in the destination folder to prevent overwriting existing work.
  • SQLite Audit Trail: Every moved file is recorded with timestamps, source, and destination paths in a local SQLite database for complete transparency.

3. The Tech Stack

  • AI Core: Ollama running qwen3:4b (Open-weight model)
  • Backend: Python 3.9+, FastAPI, Pydantic, SQLite
  • Frontend: React 19, TypeScript, Vite, Modern Responsive Design (Dark/Light Mode)

Why Does Open Innovation Matter?

When we think about AI file organizers, the easy path today is hooking into a closed cloud API like OpenAI or Google Gemini. But for desktop file organization, closed APIs are a non-starter:

  1. Absolute Data Privacy: Would you upload your tax returns, bank statements, medical records, or proprietary company codebases to a cloud API just to sort your Downloads folder? Absolutely not. Open innovation and open-weight models give us data sovereignty — what happens on your laptop stays on your laptop.
  2. Zero Cost & No Subscriptions: Closed APIs charge per token. If you have 2,000 files in your archive, sorting them with a closed API incurs costs and API key hurdles. With open-weight models on Ollama, inference is free and runs as many times as you want.
  3. True Offline Resilience: SlothDesk functions completely offline. Whether you are on an airplane, in a remote cabin, or experiencing an internet outage, your assistant keeps working.
  4. Customizability: Because models like Qwen are open, developers can inspect prompts, fine-tune models on specialized taxonomies, and tweak classification behaviors without waiting on a provider’s policy change.

Open-source AI transforms AI from a rented luxury into personal, sovereign desktop utility.


The Lazy Payoff

Before building SlothDesk, cleaning my Downloads folder of ~350 files took 30 to 45 minutes of manual sorting, second-guessing filenames, and dragging icons into subfolders.

With SlothDesk:

  • Time spent scanning & planning: 6 to 8 seconds.
  • Time spent reviewing suggestions: ~20 seconds.
  • Time spent organizing: Instantaneous.

Total effort saved: Over 40 minutes per cleanup session, with zero cognitive fatigue and zero fear of accidental deletion. You literally channel your inner sloth: sit back, sip your coffee, click "Confirm", and let local AI do all the heavy lifting.


Prize Categories

  • Overall Hacktoberfest Open-Source AI Challenge Winner (Week 3: Slow and Steady) (Entered as a solo project built around open-weight models and local inference with Ollama & Qwen).

Thank you for checking out SlothDesk! If this tool saves you from messy folder dread, please consider giving the project a ⭐ on GitHub and let me know your thoughts in the comments below!

來源:DEV Community · dev.to