Skip to content

Pankaj3112/labelr

Repository files navigation

labelr

Automatically organize your Gmail inbox using AI. labelr runs in the background, reads new emails, and applies the right label.

labelr demo

Install

macOS / Linux:

curl -sSL https://raw.githubusercontent.com/Pankaj3112/labelr/main/install.sh | sh

Windows (PowerShell):

irm https://raw.githubusercontent.com/Pankaj3112/labelr/main/install.ps1 | iex

Or grab a binary from the releases page.

Quick Start

labelr setup

The 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 status

To label old emails:

labelr sync --last 7d

Supports 30m, 12h, 7d, etc.

Commands

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.

AI Providers

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.

Default Labels

Action Required, Informational, Newsletter, Finance, Scheduling, Personal, Automated.

All customizable during setup. Write clear descriptions so the AI knows how to classify.

Privacy

All data stays on your machine in ~/.labelr/. External calls go only to Gmail and your AI provider. With Ollama, everything is fully local.

Platform Support

macOS (launchd), Linux (systemd), Windows (Task Scheduler). Auto-starts on boot.

Windows: labelr start, labelr stop, and labelr uninstall require an Administrator terminal (right-click your terminal β†’ Run as Administrator).

Building from Source

git clone https://github.com/Pankaj3112/labelr.git
cd labelr
make build
./bin/labelr setup

Requires Go 1.25+.

License

MIT

About

A local-first CLI tool that automatically classifies and labels Gmail emails using AI

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages