Axonix Tools
ClearBox: Open-Source Gmail Cleanup Dashboard powered by AI
Back to Insights
Open SourceToolsAI

ClearBox: Open-Source Gmail Cleanup Dashboard powered by AI

6 min read
Reviewed:

Why we built ClearBox, the open-source Next.js application that uses the Gmail API and local Ollama AI to roast your inbox and unsubscribe from spam instantly.

Ask any developer to show you their personal Gmail inbox, and you will likely see a horror story: 14,000 unread emails.

Eighty percent of those are automated marketing blasts. Ten percent are cold outreach emails. Five percent are actual receipts. And somewhere, buried under a mountain of digital noise, is one message from an actual human being that needs a response.

Email was supposed to be a tool for communication. Instead, it became a massive, unsearchable storage drive for brands screaming for your attention.

We got tired of deleting emails one by one, so we built ClearBox. It’s an open-source, AI-powered Gmail cleanup dashboard built specifically for developers who want their inbox back. And because we respect your privacy, it runs locally.

What makes ClearBox Different?

There are dozens of inbox cleanup tools on the market. The problem is their business model. They require full read/write access to your entire email history, and then they charge you $10/month to use an algorithm to sort it. If you aren't paying, they are likely monetizing your purchasing data.

We went a different route.

ClearBox is an open-source Next.js application that you host yourself (or run locally on your laptop). It authenticates directly against your own Google Cloud project using the highly secure Gmail API.

No man-in-the-middle servers. No data harvesting.

The Core Features of an AI Inbox

When you link your Gmail account to ClearBox, the dashboard gives you a brutally honest assessment of your digital hoarding habits.

1. The Bulk Unsubscriber

The number one reason people have overwhelming inboxes is "promotional" newsletters they never intended to subscribe to. ClearBox scans the headers of your latest 5,000 emails, aggregates the most frequent senders, and provides a one-click bulk unsubscribe and delete button.

It doesn’t just move them to the trash. It actively finds the List-Unsubscribe header and nukes your subscription. We’ve seen users delete 10,000 marketing emails in under 60 seconds.

2. Finance & Receipt Extraction

For freelancers and small business owners, finding tax receipts in December is a nightmare. ClearBox has a dedicated financial filter that natively parses emails from Stripe, PayPal, Apple, and specific vendors.

It aggregates the total spend visually in the dashboard, letting you see exactly how much you paid Amazon or Vercel over the last 90 days. It turns your inbox into an actionable financial ledger.

3. Local AI Inbox Roasting with Ollama

This is the feature that makes ClearBox uniquely 2026.

We integrated ClearBox with Ollama, an open-source platform that lets you run Large Language Models (LLMs) locally on your own GPU. We feed anonymized metadata (sender volumes, subject line trends, unread counts) to a local AI model and ask it to analyze your email habits.

The result is the "AI Roast"—a brutally funny, personalized teardown of your digital life.

“You have 400 unread emails from LinkedIn. You know none of those people are actually offering you a job, right?”

Because the AI runs locally via Ollama, none of your actual email data is sent to OpenAI or Anthropic. It’s the perfect blend of cutting-edge AI insights without the privacy nightmare.

Deploying ClearBox

ClearBox is meant for developers. The setup takes about 10 minutes:

  1. Clone the repository.
  2. Create a free Google Cloud Console project and enable the Gmail API.
  3. Drop your OAuth credentials into the .env.local file.
  4. Run npm install and npm run dev.

That's it. You now have a hyper-secure, self-hosted, infinitely customizable email client running on your localhost.

We Need Your Contributions

ClearBox is in active development, and we want to expand it. We are looking for contributors to help build out Microsoft Outlook support, add more Ollama model prompt variants, and improve the React UI.

If you are a Next.js or React developer tired of your messy inbox, grab the code from our GitHub repository and check out the Open Source projects page. Fork it, run it, and let’s take back the inbox together.

What we learned building it

A few things surprised us during development:

The volume of marketing emails is staggering. During testing, one of our team members had over 8,000 promotional emails from the past year alone. Most of them were from services he signed up for once and forgot about. The average developer receives 40-60 marketing emails per day. ClearBox makes that visible in a way that changes your behavior.

Receipt extraction was the most requested feature. We expected the AI roast to be the fan favorite. It is, but the financial filter gets used more. Freelancers and small business owners were spending hours each quarter hunting through their inboxes for tax-relevant receipts. Parsing those automatically saves real money.

The Gmail API rate limits are generous but real. The Gmail API allows 250 quota units per user per second. For most operations, this isn't a problem. But when scanning 5,000 emails for the first time, you'll hit the limit if you're not careful. ClearBox handles this with exponential backoff, so the initial scan takes a few minutes rather than failing outright.

What we'd do differently

If we were starting over, we'd add Outlook support from day one. About a third of the developers we talked to use Outlook through their company. We're working on it now, but it would have been better to build it in from the start.

We'd also build a more sophisticated email classification model. The current version groups emails by sender frequency. A future version could use the local LLM to categorize emails by intent: transactional, promotional, social, or personal. That's on the roadmap.

The privacy angle matters more than you think

Most email cleanup tools require OAuth access to your entire mailbox and then process your data on their servers. That means someone else's computer is reading your emails. For personal Gmail accounts, that might be fine. For work accounts with client communications, financial data, or legal documents, it's a problem.

ClearBox processes everything locally. The only external call is to Google's API to fetch the email metadata. Your actual email content never leaves your machine. The LLM runs on your GPU through Ollama. The financial parsing happens in your browser.

This isn't just a nice-to-have. It's the reason we built the tool in the first place.

Setting up the Google Cloud project

The trickiest part of the setup is the Google Cloud Console configuration. Here's a step-by-step walkthrough that saves you time:

  1. Go to the Google Cloud Console and create a new project.
  2. Navigate to "APIs & Services" and search for the Gmail API. Enable it.
  3. Go to "Credentials" and create an OAuth 2.0 Client ID.
  4. Set the application type to "Web application."
  5. Add http://localhost:3000 as an authorized redirect URI.
  6. Copy the Client ID and Client Secret into your .env.local file.

The first time you run ClearBox, Google will ask you to verify the app (since it's not in production). Click "Advanced" and then "Go to [your app name] (unsafe)." This only happens once.

If you get a "Gmail API has not been used in project [number]" error, wait five minutes after enabling the API. Google's propagation delay is real but temporary.

Practical tips for ongoing inbox hygiene

ClearBox isn't a one-time fix. Inbox clutter comes back. Here's what we recommend:

Run the bulk unsubscriber weekly. Set a recurring reminder. Every Friday morning, open ClearBox, check new senders, and unsubscribe from anything you don't actively read. Five minutes prevents months of buildup.

Check the financial filter monthly. If you're freelancing or running a business, monthly receipt extraction keeps your books cleaner. Export the data before ClearBox deletes the source emails.

Re-run the AI roast quarterly. It's entertaining, but it also reveals patterns you might not notice. The roast told one user that 60% of their unread emails were from the same three SaaS products they'd already cancelled. That's useful information even if the delivery is comedy.

AT

Axonix Team

Technical Writers & Contributors

The collective editorial team behind Axonix Tools. We write practical tutorials, developer guides, and tool documentation focused on web development, design...

Share this article

Discover More

View all articles

Need a tool for this workflow?

Axonix provides 100+ browser-based tools for practical development, design, file, and productivity tasks.

Explore Our Tools