LazyAI:以本機 AI 助理處理重複的檔案整理工作
# LazyAI: Stop Doing It Twice. Let AI Do It for You. 🤖
LazyAI 是一款本機 AI 個人自動化助理,利用本機模型為檔案整理制定計劃,讓用戶預覽及批准後才執行。系統以 Ollama 配合開放權重模型運行,後端測試有 45 項通過、零失敗,前端正式版本建置亦成功。
LazyAI: Stop Doing It Twice. Let AI Do It for You. 🤖
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.
What I Built
Meet LazyAI — a local AI-powered personal automation assistant designed to take repetitive file-organization tasks off your hands.
We all waste time doing the same things repeatedly: organizing files, deciding where they belong, checking for duplicate filenames, and cleaning up messy folders. LazyAI aims to make those tasks easier without giving an AI unrestricted access to your computer.
With LazyAI, you can:
- 📂 Scan folders and analyze file metadata.
- 🧠 Generate organization plans using a locally running AI model.
- 👀 Preview proposed changes before anything happens.
- ✅ Review and explicitly approve a plan before execution.
- 🛡️ Detect filename conflicts and enforce filesystem safety boundaries.
- ↩️ Roll back supported operations when you need to undo changes.
- 📋 Review activity logs and reuse saved workflows with fresh approval.
The main idea: AI should handle the planning, but you should remain in control of the execution.
LazyAI is built around a simple principle: automate the repetitive work, not the user's judgment.
Demo
demo video link: https://drive.google.com/file/d/1NHdqgQuWkUxGgAMWGLt7hESjuVnqG9Pc/view?usp=sharing
LazyAI currently runs locally on your machine.
The frontend provides a dashboard, File Organizer, Workflow Library, Activity Logs, and Settings.
To try it locally, you'll need Python, Node.js, and Ollama installed, along with a downloaded model.
Start the backend:
cd backend
python -m pip install -r requirements.txt
python run.py
Start the frontend in another terminal:
cd frontend
npm install
npm run dev
Open the frontend at http://localhost:5173.
The backend API documentation is available at http://127.0.0.1:8000/docs.
Before testing file operations, use a disposable test folder rather than important personal files. The application is designed to preview changes and require approval, but testing in a sandbox is still the sensible approach.
A hosted demo or recorded walkthrough can be added here when available.
Code
🚀 GitHub Repository:
https://github.com/naveensri4518/LazyAi-Hack4week
The repository contains the frontend, backend, API routes, filesystem handling, execution and rollback logic, tests, and project documentation.
Feel free to explore the code, report issues, and suggest improvements!
How I Built It
I built LazyAI using a modern frontend, a lightweight Python backend, and local AI inference.
Technology Stack
- Frontend: React 19, Vite, TypeScript, Tailwind CSS
- Backend: Python, FastAPI
- Database: SQLite with SQLAlchemy
- AI inference: Ollama with a locally running open-weight model, such as Llama 3.2
- Testing: Backend automated tests and frontend production builds
How the AI Workflow Works
LazyAI separates AI-generated planning from actual filesystem operations.
- Scan: The application scans the selected folder and gathers file metadata.
- Plan: The local AI model helps produce a structured organization plan.
- Validate: The backend validates the proposed operations and checks filesystem boundaries and destination conflicts.
- Preview: The user reviews the proposed changes before approving them.
- Execute: The backend revalidates the plan and executes approved operations.
- Audit and rollback: Actions are recorded so supported operations can be reviewed or rolled back safely.
The backend also implements staged plans, expiration, replay protection, collision handling, and safeguards against rolling back files that have changed since execution.
I deliberately avoided letting the AI generate arbitrary shell commands or directly modify the filesystem. The AI proposes a plan; deterministic backend code validates and executes the approved operations.
Testing and Reliability
During final integration, the backend test suite reported 45 passing tests and zero failures. The frontend production build also completed successfully.
I additionally verified the main workflow, including scanning, planning, previewing, approval, execution, audit logging, rollback, and workflow reuse.
For a project that changes files on someone's computer, safety and predictable behavior matter just as much as the AI itself.
Why Does Open Innovation Matter?
For LazyAI, open innovation makes local AI experimentation possible without making every operation dependent on a closed, cloud-hosted AI API.
Using Ollama with an open-weight model lets users run inference on their own machines after installing the required dependencies and downloading the model.
That creates several advantages:
- Local processing: File metadata and instructions can be processed locally rather than sent to a remote AI service.
- More control: Developers can experiment with different supported models and compare their behavior.
- Accessibility: Developers can explore AI-powered automation without requiring a paid hosted-model API.
- Transparency: The application’s planning, validation, execution, and rollback logic can be inspected in the source code.
- Extensibility: Other developers can improve the workflow, add integrations, and contribute safety checks.
Open-weight models are not automatically equivalent to unrestricted open-source software; their licenses still matter. For example, Llama 3.2 is distributed under Meta's Llama Community License Agreement.
The broader lesson is that AI automation doesn't always need a remote service. With the right architecture, useful AI features can run locally while keeping important decisions under user control.
The Lazy Payoff
LazyAI is designed to reduce the repetitive effort involved in organizing files and reviewing proposed changes.
Instead of manually deciding where each file belongs and performing every operation individually, users can review a proposed plan and approve the supported changes as a batch.
I haven't established a reliable real-world time-saving measurement yet, so I won't claim a specific number of minutes saved. The current milestone is a working, tested local workflow with preview, approval, execution, audit logging, and rollback.
The next step is to measure how much time it saves on realistic folders and improve the planning accuracy based on those results.
Slow and steady means building automation that people can trust—not simply making it faster.
What's Next?
Some limitations remain. LazyAI currently reasons primarily from file metadata rather than reading document contents, and rollback refuses to proceed when a destination has been modified in a way that makes restoration unsafe.
Future improvements could include better file classification, more workflow templates, additional model support, and broader testing across operating systems.
For now, I'm happy to have taken LazyAI from a dashboard concept to a tested application with a safety-conscious execution workflow.
Thanks for checking out my project! If you have ideas, feedback, or suggestions, I'd love to hear them in the comments. 🚀
Built solo by: @naveensri4518
來源:DEV Community · dev.to