This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
Have you ever opened your Downloads folder and wondered how it got that messy? π
Files everywhere. Documents with names like document (3).pdf. Installers you downloaded months ago and completely forgot about. Random files you don't even remember downloading.
You tell yourself, "I'll organize everything later." And somehow, later never comes.
Well, I think most of us have been there at some point.
While scrolling through DEV, I came across the Hacktoberfest Open-Source AI Challenge β Week 3: Slow and Steady. As I went through the challenge, I noticed that they were suggesting a project idea around organizing messy Downloads folders.
And honestly, it felt a little too relatable. π
I thought, "Wait, why not? Let's actually build something for this."
That was how I started working on LazyFold β a desktop application that helps organize files, clean up unnecessary clutter, and automate routine tidying on Windows and macOS.
But I didn't want to build just another file organizer. I wanted to explore a bigger question:
Can we use AI to take care of boring, repetitive tasks without giving it unrestricted control over our personal files?
That question became the foundation of LazyFold. And as I started building it, I realized that making files move is the easy part. Making sure they move to the right place, safely and reversibly, is where things get interesting.
Demo
Code
marasinibishesh
/
Lazyfold
Windows & Mac app that tidies your Downloads folder and frees disk space, safely and locally. TabPFN predicts which moves you would accept; local Gemma 4 reads documents. By Bishesh Marasini.
Lazyfold
A Windows and Mac app that tidies your messy Downloads folder and frees up disk space β safely, on your own PC.
Created by Bishesh Marasini.
-
Organize β sorts files into folders (Documents, Images, Installersβ¦) and suggests a clear name for each file from what's inside it, for example
Presentation1.pptxβContoso Coffee Q3 2026 Sales Review.pptx. One click keeps or drops each name. Nothing moves until you approve, and every run can be undone. -
Clean up β finds temporary files and caches you can safely remove (the safe version of Windows+R β
%temp%). Files go to the Recycle Bin (the Trash on a Mac) by default. -
Automation β tidy on a schedule, from the right-click menu (a Finder Quick Action on a Mac), or with Windows+R β
lazyfold. - Private β everything runs on your computer. No account, no upload.
Partner technology
Lazyfold works likeβ¦
Technical Features: What's Under the Hood?
1. Smart File Organization
LazyFold scans a selected folder and proposes where files should go, using their actual file types, keywords, dates, and download sources. It can also suggest meaningful names for files that have names like document (3).pdf or scan0001.pdf.
2. Local AI with Gemma 4
Gemma 4 E2B, running locally through Ollama, helps classify documents and suggest meaningful filenames. Its output follows a predefined JSON schema, and suggested names are checked against the document's contents. Files whose moves are influenced by Gemma always wait for user review.
3. Personalized Predictions with TabPFN
TabPFN learns from a user's review history to predict whether they would accept a proposed file move unchanged. It helps prioritize decisions that may need attention and can hold back uncertain moves from automatic tidying.
4. Automatic Tidying
LazyFold can automatically handle proposed moves when the built-in rules are confident and TabPFN agrees. Moves that don't meet the requirements wait for review. TabPFN can restrict the automatic set, but it cannot authorize additional moves.
5. Safe File Operations and Undo
Every operation is revalidated before execution. LazyFold prevents overwriting existing files and journals moves before carrying them out, helping recover interrupted runs. Organizing files doesn't delete them, and completed runs can be undone.
How I Built It
The interesting part of LazyFold wasn't just adding AI to a file organizer. It was figuring out how to make different components work together without compromising the safety of someone's personal files.
I ended up building the core around three steps: propose, predict, and act or ask.
1. The Core Idea: Propose, Predict, Act or Ask
Instead of letting an AI model decide everything, I separated the responsibilities.
First, LazyFold proposes. A rule-based engine scans the selected folder and analyzes files using their actual file types, keywords, dates, and download sources. It prepares a plan showing where each file should go.
For documents with meaningless names, such as document (3).pdf or scan0001.pdf, LazyFold can also use Gemma 4 E2B to help identify the document and suggest a more meaningful filename.
Then, TabPFN predicts. It looks at the proposed move and the user's previous review decisions to estimate the probability that the user would accept that move without changing it.
Finally, LazyFold acts or asks. Deterministic code decides what happens next. Automatic tidying only proceeds when the built-in rules are confident and TabPFN agrees. Otherwise, the file waits for the user to review it.
This separation is important because neither model gets to authorize a file operation. The models provide information; the application enforces the rules.
2. Teaching LazyFold My Filing Habits with TabPFN
One thing I quickly realized is that people don't organize files in the same way.
I might want all my screenshots to stay exactly where they are, while someone else might prefer to move downloaded documents from a particular website into a dedicated folder. Hardcoding every possible preference would quickly become complicated.
That's where TabPFN, a pretrained tabular foundation model from Prior Labs, comes in.
LazyFold maintains a local review history in reviews.jsonl. Each reviewed move contributes information such as:
- File type, size, and age
- The website the file came from
- The folder LazyFold proposed
- The folder the user actually chose
- Whether the user accepted the proposal unchanged
Importantly, this table doesn't store filenames or file contents.
TabPFN uses these examples to predict whether a future proposed move is likely to be accepted. It doesn't require a separate model-training pipeline for each user; it makes predictions using the small table of review history.
The prediction has two main uses. First, it helps prioritize the files that deserve attention during manual review. Second, it can hold back proposed moves from automatic tidying when the predicted acceptance probability falls below a configurable threshold, set to 85% by default.
TabPFN can make the automatic process more conservative, but it cannot add moves to the automatic set or silently change the user's review selections.
I also added a Check now feature so users can test the predictor against their own history. It trains on older review sessions and evaluates against newer, unseen sessions, comparing its results with a simple baseline that accepts every proposed move.
That matters because a model shouldn't be considered useful just because it uses AI. It should demonstrate that it helps.
3. Using Gemma 4 to Understand Documents
Rules work well for many files, but they have limitations. A .pdf extension tells us the file format, not whether the document is an invoice, a receipt, a boarding pass, or something else.
To improve document classification, I integrated Gemma 4 E2B, running locally through Ollama.
For supported documents, Gemma provides a category, a suggested filename, a confidence score, and a reason. Its response follows a predefined JSON schema, so the application expects a constrained structure rather than arbitrary instructions or file paths.
I also added several safeguards:
- If the model returns an invalid response, LazyFold falls back to the rules-based classification.
- Suggested filenames must be grounded in words found in the document, reducing the risk of invented names or dates.
- Only files with meaningless names are eligible for automatic renaming suggestions.
- Any move influenced by Gemma must wait for user review rather than being carried out automatically.
I tested this approach on a blind, held-out dataset of 77 files. In that evaluation, classification accuracy increased from 80.5% with rules alone to 97.4% with rules and Gemma combined. All eight trap files, including disguised executables and HTML files pretending to be PDFs, were left untouched by both approaches.
These results apply to that particular test set, but they gave me a useful way to measure whether the additional model was actually helping.
4. Making File Operations Safe and Reversible
This was the part I didn't want to rush.
File organization sounds harmless until an application moves the wrong document, overwrites an existing file, or crashes halfway through a batch operation. That's why safety isn't something I left to the AI models.
LazyFold validates each operation again when it is executed, checks that files haven't changed since the preview, and prevents existing files from being overwritten. It also writes a journal entry before each move so interrupted operations can be reconciled and recovered.
During security testing, an independent reviewer agent identified a race condition in which a destination folder could be swapped for a junction between validation and the move. I fixed the issue by holding the relevant folders open without delete-sharing during the operation.
In the attack test, the number of successful escapes dropped from 30 out of 60 attempts to zero out of 60 after the fix.
I also tested cases involving disguised executable files, manipulated plans, prompt injection, interrupted moves, and recovery. The project now has 547 tests on Windows, and the same test suite runs on macOS in CI.
The goal wasn't to make a model promise that everything would be safe. It was to build safeguards into the code that actually handles the files.
Why Does Open Innovation Matter?
A Downloads folder can contain bank statements, invoices, CVs, and other personal documents. Uploading them to an external AI service just to organize them doesn't feel right to me.
That's why LazyFold uses Gemma 4 and TabPFN locally, keeping its AI-powered workflow on the user's computer. I can also test their performance: in a held-out set of 77 files, combining Gemma with rules improved classification accuracy from 80.5% to 97.4%.
Open source matters just as much. LazyFold is MIT-licensed, so people can inspect its code and safety mechanisms instead of blindly trusting a black box.
For me, open innovation means building with open models, measuring their real contributions, and giving users more control over their data.
Who Is LazyFold For?
Do you use a computer or laptop? π» Are you a Windows user or a macOS user? And be honestβ¦ is your workspace or Downloads folder a mess? π
The answer is simple: LazyFold is for you! π
Whether you're a student managing assignments, a professional handling documents, or someone tired of a cluttered Downloads folder, LazyFold helps you organize files, clean up clutter, and automate routine tidying while keeping you in control.
The Lazy Payoff
The goal of LazyFold is simple: spend less time organizing files and more time doing something useful.
On a test folder containing 77 files, one review and one click replaced 69 file moves, 20 renames, and 18 new folders that would otherwise require manual work.
The storage cleanup feature also found 6.3 GB (on my first test) of temporary and cache files on PC, with 2.3 GB preselected as safe to remove.
And with TabPFN, the goal is to make routine tidying even less hands-on by automatically handling only the moves that meet the safety rules and match the user's learned preferences.
Less repetitive work, fewer files to sort manually, and the confidence that changes can be undone. That's the lazy payoff I wanted LazyFold to deliver.
How this can be helpful
Prize Categories
LazyFold brings together open models, practical AI, and automated testing, aligning with three challenge categories:
- Best Use of TabPFN: I integrated TabPFN as a personalized act-or-ask gate. It learns from review history, helps prioritize files for review, and holds back moves the user is unlikely to accept.
- Best Use of Gemma: Gemma 4 E2B runs locally through Ollama to classify documents and suggest meaningful filenames. In my 77-file held-out test, it helped improve classification accuracy from 80.5% to 97.4% when combined with the rules-based classifier.
- Best Use of GitHub Copilot (GitHub Actions): GitHub Actions runs tests on Windows and macOS, builds and smoke-tests the installers, and publishes releases for tagged versions.
- Best Use of ElevenLabs: Voiceover of Demo Video.
Each category represents a different part of the project: making AI useful, keeping it local, and testing the application across platforms.



Top comments (0)