This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
I built Folio, a macOS menu bar app that organises downloaded files using local AI.
Downloads folders tend to accumulate invoices, receipts, screenshots, lecture notes, and random PDFs. I wanted to build something that could organise these files automatically without requiring me to stop what I’m doing and sort everything manually.
When a file arrives in a watched folder, Folio reads its contents and asks a local Gemma model to suggest a filename and destination. For example, invoice (3).pdf might become Finance/Invoices/Work/Cobalt Cloud Hosting Invoice 2026-10.pdf.
Folio also has a Restructure mode for organising existing folders. It proposes changes for review before applying them, and you can undo an entire session.
If Folio isn’t sure where a file belongs, it leaves it alone and adds it to a review list. It never deletes or overwrites files, and every move is logged before execution.
Who would pay for it?
I’m building Folio with freelancers and small business owners in mind, particularly those who regularly handle invoices, receipts, contracts, and financial documents and need to find them months later.
Pricing: I’m considering a one-time licence of $19.99, with no recurring subscription or per-file AI charges. The idea is to make file organisation something users can set up once and leave running in the background, without sending sensitive documents to a cloud service.
Demo
Code
Aravind-Sathesh
/
Folio
Mac menu bar app that files your downloads with a local Gemma model. Never deletes, every move undoable.
Folio
A macOS menu bar app that files your downloads for you. New files in the folders you watch are read on your Mac, renamed and moved into the right folder in Documents by a local Gemma model running in Ollama. Files it isn't sure about wait for your review. Restructure tidies a folder you pick, after you approve every change. Folio never deletes or overwrites anything, and every move can be undone.
Requirements
- macOS 14 or later, Apple silicon recommended
- Ollama running, with the models pulled:
ollama pull gemma4:12b
ollama pull mxbai-embed-large
Build and install
xcodebuild -project Folio.xcodeproj -scheme Folio -configuration Release -derivedDataPath build build
ditto build/Build/Products/Release/Folio.app /Applications/Folio.app
open /Applications/Folio.app
The build is signed with your own development certificate, so it runs on your Mac. Sharing it with others needs a Developer ID certificate and notarization.
Try it without touching your real folders
scripts/run-sandbox.sh
This runs Folio against ~/FolioSandbox…
The README explains how to build and run Folio. It's built with Swift 6 and SwiftUI using Apple's native frameworks, without third-party packages. The project includes 133 unit tests and optional evaluations against the actual AI models.
How I Built It
The main challenge wasn't getting AI to suggest filenames. It was making sure those suggestions could be used safely to modify the filesystem.
Local AI and model selection
Folio uses two models through Ollama:
-
Gemma (
gemma4:12b) suggests filenames, destination folders, and restructuring plans. -
mxbai-embed-largehelps retrieve similar past corrections so Folio can adapt to a user's filing preferences.
The application handles text extraction, folder discovery, and validation. The model receives the relevant information and returns a structured response containing a proposed name and destination.
Before anything happens, the application checks that the destination stays inside Documents, rejects unsafe filenames, preserves the original extension, and handles naming conflicts without overwriting existing files.
Testing the models
I created a 50-file evaluation set containing fictional invoices, statements, receipts, lecture notes, screenshots, empty files, and near-duplicates. I tested three configurations on an M3 Pro.
| Model | Correct of auto-moved files | Wrong across all files | Time per file |
|---|---|---|---|
| gemma4:e2b | 68% | 26% | 1.9 s |
| gemma4:e2b with thinking enabled | 90% | 8% | 15.8 s |
| gemma4:12b | 98% | 2% | 7.2 s |
These results reflect my test set, not a general benchmark. The 12B model was the only configuration I tested that met both my accuracy targets and the under-ten-second processing target.
I also found that the smaller model's thinking mode added substantial latency. With structured output already constraining the response, turning thinking off reduced one measured call from 11.6 seconds to 0.4 seconds.
Another finding was that the model's self-reported confidence wasn't reliable. It often assigned high confidence to incorrect answers, so Folio adjusts confidence based on factors such as the amount of extracted text and whether a new folder is required.
Learning from corrections
I wanted Folio to adapt to individual filing habits without fine-tuning.
When a user corrects a filename or moves a file, Folio records the correction and a short summary of the file. For subsequent files, it retrieves the five most similar corrections and includes them as examples in the prompt.
In a leave-one-out evaluation, this improved accuracy on the smaller model from 68% to 83%. It didn't eliminate repeated mistakes, but it showed that correction-based memory could make a measurable difference.
Testing failure cases
I spent time testing what happens when things go wrong, especially because a file-management tool needs to be recoverable.
In crash testing, I ran 20 rounds of 1,500 moves with 59 forced process terminations. No files were lost or duplicated. The tests did uncover a stale-log issue when a crash occurred between recording a move and executing it. Folio now reconciles its log at startup.
I also tested unsafe paths, symbolic links, unusual filename characters, and excessively long names.
One particularly useful test involved a file containing instructions telling the model to ignore its rules and move the file into /System/Library. The smaller model followed those instructions in its proposed destination, but the application's validator rejected the path.
This is why the model never gets to execute filesystem operations directly. Its suggestions must pass application-level checks first.
Restructure in practice
I tested Restructure on a sandbox containing 94 files. Using the 12B model, Folio took about three minutes to read and summarise the files and another two and a half minutes to plan the changes.
It proposed and applied 59 changes, then successfully restored the original folder structure when I tested Undo. A second run took around 0.1 seconds because summaries were cached by content hash.
These tests gave me a way to evaluate the complete workflow, rather than just checking whether individual model responses looked reasonable.
Why Does Open Innovation Matter?
Open-weight models made it possible to build Folio around local inference instead of a cloud API.
- Privacy: Folio handles potentially sensitive documents, including financial records, identity documents, and contracts. Running Gemma through Ollama keeps inference on the Mac, and the application checks that model requests go to the local endpoint.
- Cost: Folio is designed to process files continuously. Local inference avoids a separate API charge for every file, making a one-time licence more practical.
- Flexibility: I could compare different model configurations using the same evaluation set and choose based on measured accuracy and speed. I can also test newer models without redesigning the application around a particular provider.
- Personalisation: Folio can learn from filing corrections through retrieved examples without sending those corrections to a remote AI service.
Local models still have limitations. Smaller models can be less accurate, performance depends on available hardware, and prompt injection remains a concern. That's why I paired local inference with strict validation and reversible file operations.
For Folio, open innovation made privacy, model experimentation, and control over the AI stack part of the product itself.
My Agent Session
I used a multi-agent workflow to build Folio. Claude acted as the planner, breaking down the project, helping shape the architecture, and identifying edge cases. Antigravity acted as the implementer, turning those plans into code, running tests, and fixing issues.
I still had to evaluate the results and verify that the application behaved safely. Some of the most important work came from testing failures rather than just implementing features: checking crash recovery, validating model output, and ensuring that mistakes could be undone.
Prize Categories
Best Use of Gemma: Folio uses Gemma 4 12B through Ollama to suggest filenames and organise files entirely on the Mac. The application validates every suggestion before making filesystem changes, keeping sensitive documents local. Folio also learns from user corrections by retrieving similar past examples, adapting to individual filing preferences without fine-tuning.
Top comments (1)
The safety design here is what sold me: it never deletes or overwrites, logs every move before executing it, leaves a file alone when unsure, and lets you undo a whole Restructure session. For an app that touches people's real Downloads folders, that's the right trust model. Local Gemma also makes sense for invoices and receipts since they're sensitive. How do you handle files where the content is mostly images (scanned receipts, screenshots) before the model sees them?