跳到正文
DEV Community· DEV KUMAR CHAUBEY·· 3 小時前AI 評分40

LazyFile:讓本地 AI 整理下載資料夾

LazyFile: Let Local AI Clean Up Your Downloads

AI 導讀

LazyFile 是一款以離線優先的 AI 檔案整理工具,可將檔案分類為 14 個類別,並在套用變更前讓用戶預覽和審核建議。工具可選用本地 Ollama 模型改善檔名和分類建議;即使沒有 AI 模型或雲端服務,也可使用規則引擎整理檔案。

正文

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

What I Built

I have always found one small computer task unnecessarily repetitive: keeping the Downloads folder organized.

PDFs get mixed with screenshots, source code files sit alongside ZIP archives, and useful documents become harder to find over time. Sorting everything manually takes attention away from the work that actually matters.

That is why I built LazyFile, an offline-first AI-powered file organizer designed around a simple idea: let the computer do the repetitive work, but keep the human in control.

LazyFile scans a folder, categorizes files, suggests cleaner organization, and creates a preview of the proposed changes. Instead of blindly moving everything, it lets users review and approve the suggestions they want to apply.

What makes LazyFile useful?

Smart categorization: Organizes files into 14 categories, including Documents, Finance, Images, Code, Archives, and more.

AI-assisted suggestions: Optionally uses a local Ollama model to improve filenames and category suggestions.

Offline fallback: A deterministic rule-based engine keeps the core workflow useful without an AI model or cloud service.

Preview before action: Users can inspect the source, destination, category, and reason before making changes.

Safety first: Collision checks, path validation, dry-run mode, and safeguards against overwriting files.

Undo support: Reverses supported operations when the recorded file state still matches.

Lightweight by design: Python standard library for the backend and plain HTML, CSS, and JavaScript for the interface, with no mandatory pip packages.

The principle is simple: AI proposes. You decide. LazyFile handles the repetitive part.

Demo

Watch the LazyFile demo to see how it scans a folder, suggests file organization, and lets users preview changes before applying them.

YouTube Demo: https://youtu.be/0UX9EkAf8S0

Code

Explore the complete source code, implementation, and setup instructions for LazyFile on GitHub.

GitHub Repository: https://github.com/vash57/LazyFile

How I Built It

I built LazyFile using Python's standard library, HTML, CSS, and JavaScript to keep the application lightweight and easy to run.

For AI-powered suggestions, LazyFile supports Ollama, which allows users to run open-weight language models locally instead of relying on a cloud AI API.

The application has two modes:

  • Rule-based mode: Categorizes files using extensions and filename keywords. It works offline without requiring an AI model.
  • Local AI mode: When Ollama is available, a locally running model can suggest file categories and cleaner filenames. The suggestions are validated before they are presented to the user.

I designed LazyFile so that AI is an optional enhancement rather than a mandatory dependency. This makes the application more practical for users with limited hardware resources.

The backend uses Python's built-in HTTP server, while the frontend is built with plain HTML, CSS, and JavaScript. No external Python packages are required for the core functionality.

The AI coding agent helped me implement and refine the project, but the file organization logic, local AI integration, and safety workflow are part of the LazyFile application itself.

Post not found or has been removed.

Why Does Open Innovation Matter?

Open innovation matters to LazyFile because file organization often involves personal documents, invoices, assignments, and other sensitive information.

By building LazyFile around local processing and open-weight AI, I wanted to give users more control over where their data goes and how their files are organized.

A closed, cloud-based AI API would typically require sending file metadata to an external service for AI-powered suggestions. With Ollama, users can instead run compatible open-weight models on their own machines, keeping the AI processing local.

Open-source tools also gave me the flexibility to design LazyFile around my actual hardware constraints. Rather than requiring a large model or expensive cloud infrastructure, I made AI optional and kept a lightweight rule-based engine as the foundation.

This means users can inspect the logic, modify the categorization rules, choose a compatible local model, and use the application without depending on a single proprietary AI provider.

For me, open innovation is about making useful AI automation more accessible, transparent, and adaptable. LazyFile demonstrates that a small, local-first tool can reduce repetitive work without requiring users to hand over control of their files to a cloud service.

My Agent Session

The Lazy Payoff

Prize Categories

來源:DEV Community · dev.to