Automatically organize your Gmail inbox using AI. labelr runs in the background, reads new emails, and applies the right label.
macOS / Linux:
curl -sSL https://raw.githubusercontent.com/Pankaj3112/labelr/main/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/Pankaj3112/labelr/main/install.ps1 | iexOr grab a binary from the releases page.
labelr setupThe wizard connects your Gmail, picks an AI provider, sets up labels, and starts the background service. That's it.
Note: During Gmail sign-in, you'll see an "unverified app" warning (Google verification is in progress). Click Advanced β Go to labelr (unsafe) to continue. This is safe β labelr runs entirely on your machine and the source code is fully open.
Check service health and queue stats anytime:
labelr statusTo label old emails:
labelr sync --last 7dSupports 30m, 12h, 7d, etc.
labelr setup # First-time setup wizard
labelr start # Start the background service
labelr stop # Stop the service
labelr status # Queue stats and service health
labelr logs # Live log output
labelr sync --last <period> # Label past emails
labelr uninstall # Remove everything
Setup starts the service for you. You only need start after a manual stop.
| Provider | Cost | Privacy | Speed |
|---|---|---|---|
| Ollama | Free | Local | Depends on hardware |
| Groq | Free tier | Cloud | Very fast |
| Cerebras | Free tier | Cloud | Very fast |
| DeepSeek | Very cheap | Cloud | Fast |
| OpenAI | Pay per use | Cloud | Fast |
| Custom | Varies | Varies | Varies |
Custom supports any OpenAI-compatible API. Each email costs ~100-300 input tokens and ~10 output tokens.
Action Required, Informational, Newsletter, Finance, Scheduling, Personal, Automated.
All customizable during setup. Write clear descriptions so the AI knows how to classify.
All data stays on your machine in ~/.labelr/. External calls go only to Gmail and your AI provider. With Ollama, everything is fully local.
macOS (launchd), Linux (systemd), Windows (Task Scheduler). Auto-starts on boot.
Windows:
labelr start,labelr stop, andlabelr uninstallrequire an Administrator terminal (right-click your terminal β Run as Administrator).
git clone https://github.com/Pankaj3112/labelr.git
cd labelr
make build
./bin/labelr setupRequires Go 1.25+.
MIT
