LazyDesk AI
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built:- LazyDesk AI is a local-first, privacy-respecting desktop assistant designed to tackle one of the most universal computer headaches: the chaotic, overflowing Downloads and Desktop folders, redu

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
LazyDesk AI is a local-first, privacy-respecting desktop assistant designed to tackle one of the most universal computer headaches: the chaotic, overflowing Downloads and Desktop folders, redundant duplicate files, and unread PDF documents.
Instead of sending private desktop files to external cloud AI APIs, LazyDesk AI executes all processing locally on your own machine. It pairs deterministic system utilities for file operations with Google's open-weight Gemma 3 4B (via Ollama) for document synthesis and grounded Q&A.
What effort does it save? Zero-effort file organization: Automatically sorts hundreds of scattered files into 8 clean category folders (Documents, Spreadsheets, Images, Videos, Audio, Code, Archives, Other) with interactive dry-run previews, automated filename conflict renaming (file_1.ext), and a 1-click undo history. Effortless duplicate discovery: Scans files using a fast two-stage algorithm (matching byte sizes first, followed by streaming SHA-256 chunked hashing) to uncover exact duplicates regardless of different filenamesβwithout ever deleting anything automatically.
Instant document synthesis: Extracts digital text from multi-page PDFs in milliseconds with PyMuPDF, feeding it directly to local Gemma 3 4B to generate a structured 5-part executive summary: Executive Overview Key Points & Insights Important Dates, Deadlines & Entities Action Items & Next Steps Document Notes & Uncertainties Grounded Document Q&A: Lets users query documents and receive answers strictly grounded in the document text, with explicit page references. Who gets to be a little lazier because of it? Developers & Tech Workers who let installer scripts, log dumps, and code snippets pile up in their default directories.
Researchers & Students juggling dozens of academic papers, syllabi, and lecture slide decks who need immediate summaries and action items without reading 40 pages. Freelancers & Consultants managing confidential client invoices, contracts, and tax receipts who refuse to upload private client data to cloud AI services. Demo
LazyDesk AI features a modern, responsive dark dashboard built in Streamlit with a muted slate/indigo theme.
Quick Local Walkthrough: Launch the app with python -m streamlit run app.py (opens at http://localhost:8501 ). Click "π Load Demo Sandbox Path" in the sidebar to load the included, fully-isolated demo environment without touching any personal files. Open π File Dashboard to view live metrics, category breakdowns, and searchable file tables.
Switch to ποΈ Smart Organizer, click "π Generate Move Preview", run a Dry Run, and inspect the automated conflict renaming. Check π Duplicate Detector to see identical SHA-256 invoice duplicates detected with reclaimable space calculations. Head to π PDF Summarizer, upload the included LazyDesk_Product_Specification.pdf, and watch local Gemma 3 4B generate a complete executive breakdown with action items. +--------------------------------------------------------------------------+ | [DEMO PREVIEW] π File Dashboard | | Scans direct files, calculates byte sizes, and charts category breakdowns| +--------------------------------------------------------------------------+ | [DEMO PREVIEW] ποΈ Smart File Organizer | | Interactive proposed move plan, conflict check, dry-run & 1-click undo | +--------------------------------------------------------------------------+ | [DEMO PREVIEW] π Duplicate Detector | | Streaming SHA-256 checksums, identical content grouping, report-only | +--------------------------------------------------------------------------+ | [DEMO PREVIEW] π Local AI PDF Summarizer & Grounded Q&A | | Sub-second PyMuPDF extraction + Gemma 3 4B structured executive summary | +--------------------------------------------------------------------------+
(Demo video / GIF walkthrough link: https://github.com/your-username/lazydesk-ai#demo )
The complete source code is open source and structured into clean, modular Python components:
text lazydesk-ai/ βββ app.py # Streamlit productivity dashboard & views βββ.streamlit/config.toml # Dark muted-neutral theme configuration βββ modules/ β βββ config.py # Category mappings, exclusions, AI defaults β βββ file_scanner.py # Direct-file scanner & metric aggregation β βββ organizer.py # Conflict resolution, preview, move & rollback β βββ duplicate_detector.py # Size pre-filter + SHA-256 chunked hashing β βββ pdf_processor.py # PyMuPDF text engine & scanned PDF detector β βββ local_ai.py # Ollama REST API client (Gemma 3 4B) β βββ operation_history.py # JSON audit history logger for undo support βββ sample_data/ # Isolated test files (never touches real data) β βββ create_demo_data.py # Demo generator β βββ demo_sandbox/ # Sample PDFs, CSVs, scripts, and duplicates βββ tests/ # 30 passing unit tests (100% green) βββ requirements.txt # Dependencies (PyMuPDF, Streamlit, Ollama client) βββ README.md # Complete Windows/Linux setup instructions GitHub Repository
π https://github.com/your-username/lazydesk-ai
Key Code Highlight: Local AI Generation with Zero Cloud Calls python
def generate_document_summary( document_text: str, filename: str = "document.pdf", model: str = "gemma3:4b", base_url: str = " http://localhost:11434 ", timeout: int = 90, ) -> AISummaryResult: """Send document text strictly to local Ollama instance.""" prompt = build_summarization_prompt(document_text, filename) endpoint = f"{base_url.rstrip('/')}/api/generate" payload = { "model": model, "prompt": prompt, "stream": False, "options": {"temperature": 0.2, "top_p": 0.9}, } # Strict local execution with low temperature for factual fidelity response = requests.post(endpoint, json=payload, timeout=timeout) response.raise_for_status() return AISummaryResult( success=True, summary_markdown=response.json().get("response", "").strip(), model_used=model, ) How I Built It
LazyDesk AI was built using a hybrid architecture that pairs deterministic software engineering with open-weight language modeling:
Local Open-Weight Model: Gemma 3 4B served locally by Ollama ( http://localhost:11434 ). It provides an ideal balance of fast CPU/GPU inference and sharp reasoning for structured extraction without needing 32 GB of VRAM. User Interface: Streamlit 1.38+, heavily customized with a dark theme (#0b0f19 background, #131c2e surface cards, #6366f1 indigo accents) to feel like a polished desktop utility rather than a tutorial app.
PDF Text Extraction: PyMuPDF (fitz), delivering sub-second parsing across complex PDF structures. Cryptographic Duplicate Detection: Python hashlib using SHA-256 streamed in 64 KB chunks to handle multi-gigabyte files without memory bottlenecks. Safety Invariants: Never Overwrite: Automated renaming (report_1.pdf) preserves existing files.
Dry Run Verification: Preview simulated actions before writing to disk. Audit Trail & Reversal: All movements are logged to ~/.lazydesk/operations_history.json and can be undone with a single click. No Silent Hallucination on Scanned PDFs: If a user uploads an image-only scanned PDF without an OCR text layer, LazyDesk AI identifies this immediately and informs the user that digital text is absent, rather than fabricating a summary.
100% Mocked Automated Tests: 30 comprehensive unit tests using pytest mock Ollama endpoints, ensuring test suites run anywhere without downloading weights. Why Does Open Innovation Matter?
Desktop AI tools present a profound privacy dilemma. When an AI app asks to inspect your folders or read your documents, sending that data over the public internet to closed-source, centralized cloud APIs creates serious risks:
Data Sovereignty: Financial statements, confidential NDAs, personal tax records, and medical PDFs should never leave your hard drive. Open-weight models running on localhost make true data sovereignty possible. No Metered Costs: Closed APIs charge per token.
A user sorting their desktop or summarizing a 50-page PDF shouldn't have to calculate API costs or fear subscription tier upgrades. Open innovation enables unlimited, predictable, zero-marginal-cost productivity. Offline Reliability: Trains, airplanes, and rural job sites don't always have reliable Wi-Fi.
Because LazyDesk AI relies on open weights and local runtimes, it functions identically with or without an internet connection. Freedom of Choice: Users aren't locked into a single proprietary vendor. If a user prefers llama3.2, mistral, or phi3, they can switch the model name directly in the LazyDesk settings panel without rewriting code.
My Agent Session
This project was built pair-programming with the Antigravity autonomous AI coding agent.
The agent played the role of full-stack architect, test engineer, and UX designer:
Scaffolding the 6 modular subsystems (file_scanner.py, organizer.py, duplicate_detector.py, pdf_processor.py, local_ai.py, operation_history.py). Creating an isolated sandbox demo environment to verify safety without touching personal directories. Writing and executing 30 unit tests with pytest, catching real edge cases (like dataclass argument ordering and multi-line PyMuPDF bounding boxes) during development. Starting and verifying the live Streamlit server over localhost. The Lazy Payoff
Here is how LazyDesk AI lets users embrace their inner sloth while staying organized:
Task The Hard Way (Manual / Cloud) The LazyDesk AI Way Cleaning a 150-file Downloads folder 30β45 minutes of manual dragging, creating folders, and checking file extensions. 3 seconds: Click Preview, Click Confirm. Files are safely categorized.
Finding redundant duplicate downloads Opening files side-by-side, comparing file dates, checking byte sizes. Instant: Automated SHA-256 scan shows duplicate groups and reclaimable bytes. Reading a 25-page product spec or agreement 30 minutes of skimming for deadlines, names, and deliverables.
15 seconds: Gemma 3 4B extracts exact deadlines, named entities, and action items. Fixing an accidental reorganization Panicking and manually moving files back one by one. 1 click: Click "Undo Operation" in History to restore original file locations.
Prize Categories Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady (Focusing on genuine open-weight AI performing real application tasks without external cloud dependencies).
Built with β€οΈ for Hacktoberfest 2026. Keep it local, keep it open.