Home / use case

LazyDesk AI: a local file organizer that renames and sorts your Downloads with Qwen3

What they built

Ayush Dinda built LazyDesk AI to clean up Downloads and Desktop folders full of names like INV-98234-billing-oct.txt and Freelance_Consulting_Agreement_Draft.docx without sending bank statements, contracts or homework to a cloud API.

It scans a folder inside configured allowed roots, extracts text from PDFs, Word documents, Markdown, CSVs and image metadata, and asks a local Ollama model for a one-sentence description, a suggested filename, a category from a fixed list (Finance, Work, Education, Projects, Documents, Images, Notes, Other) and a reason.

Nothing moves silently: you review and edit the proposals, preview exact source and destination paths, then execute. Every move is logged with a SHA-256 hash so a batch can be undone with one click. The project is MIT-licensed on GitHub.

Setup

  • Ollama on localhost:11434 with Qwen3 by default and Llama 3.1 as a fallback (any local GGUF model can be used)
  • FastAPI backend (Python 3.11+, Pydantic v2, SQLAlchemy, SQLite)
  • PyMuPDF, python-docx and Pillow for local extraction
  • React 19 + TypeScript + Vite + Tailwind frontend on localhost:5173

How it works

  1. Document text is extracted in memory, capped at 4,000 characters, and sent to the local model, which returns structured JSON with description, suggested_filename, category and reason.
  2. Model output is treated as untrusted: the LLM never writes paths; the backend builds destinations from a category whitelist and a sanitized filename, stripping illegal characters and reserved Windows names and keeping the original extension.
  3. Every target path is resolved with os.path.realpath and must sit inside ALLOWED_ROOTS; symlinks and traversal sequences are rejected, and name collisions get a suffix like Invoice (1).pdf instead of overwriting.
  4. Undo checks that the file is still at the destination, that its SHA-256 hash is unchanged, and that the original location is free before moving it back.
  5. If Ollama is unavailable, a deterministic heuristic classifier takes over so the workflow still runs.

Results & numbers

  • On a test folder of 20+ simulated files, the author estimates 15 to 20 minutes of manual sorting versus under 15 seconds with LazyDesk, with local analysis of the batch taking about 5 to 8 seconds
  • The project ships with 13 pytest unit and integration tests and full mock-AI coverage

Gotchas

  • LLMs can hallucinate paths or produce invalid filename characters, so the model is never allowed to decide where a file goes on disk
  • The benchmark was run on simulated files, not a real-world messy folder
“Stop organizing files manually. Let your local AI do the boring work.”— LazyDesk AI README

Do it yourself

  1. Install Ollama and pull a Qwen3 model (or Llama 3.1).
  2. Clone the LazyDesk-AI repository from GitHub and start the FastAPI backend and the Vite frontend.
  3. Set ALLOWED_ROOTS to the folders you want it to touch, such as Downloads.
  4. Scan a folder, click Analyze with Local AI, then review and edit the proposed names and categories.
  5. Preview the paths, execute the move, and use undo if a batch isn't right.
Source: Ayush Dinda (DEV Community) · 2026-10-20 · Added 2026-10-20. This write-up summarizes the original source; see it for full details.

Related

Gist: an offline exam-prep partner that mines past papers with Ollama

A student built Gist so a friend could study from lecture PDFs and three-plus years of past exam papers without uploading copyrighted course material anywhere; parsing, embeddings, search and the LLM all run on the laptop with Wi-Fi off.

DEV Community (Hacktoberfest Build for a Friend) · 2026-10-04

A 4B local model on a 4 GB laptop GPU as a PASS/FAIL test evaluator

Qwen3 4B Instruct in Ollama (Docker, WSL2) grades a Spring Boot app's root-cause answers against expected ones, returning a JSON verdict, with every speed and memory number measured on a 4 GB Quadro T1000.

Vishnu Vardhan · 2026-10-15

Order Ledger: WhatsApp order chats to a clean order book, offline

A no-dependency Node.js app that sends pasted WhatsApp order chats (English, Hinglish, Kannada) to qwen2.5:7b in Ollama and turns them into structured orders, a delivery schedule, pending payments and a CSV export, all on the seller's laptop.

Khushighosh (DEV Community) · 2026-10-15

Fixing Ollama's defaults for small models in a desktop chat app

Building the Electron app Qwellar on llama3.2:3b, the author found that Ollama's default temperature and 2048-token context were mangling structured tags and silently truncating chats, and fixed it with baseline options, an IPC bug fix and a Settings UI.

Micah Spiegel (DEV Community) · 2026-10-15