A fast, keyboard-driven terminal email client with calendar integration.
- Multi-account support - Gmail, Yahoo, and custom IMAP providers
- Fast startup - Local caching with background sync server
- Keyboard-driven interface - Vim-inspired navigation, command palette
- Email operations - Compose, reply, delete, search, folder/label navigation
- Calendar integration - macOS EventKit with natural language event creation
- AI summarization - Email summaries via Claude, Codex, Gemini, Ollama, or BYOK
- Today view - Combined view of emails and calendar events
- Bulk actions - Multi-select in search results for batch operations
- Self-update - Built-in update mechanism
- macOS - Full features including calendar integration
- Linux - All features except calendar (no EventKit)
brew install guiyumin/tap/mailygit clone https://github.com/guiyumin/maily.git
cd maily
make build
./build/mailymaily update- Add your email account:
maily login gmail # For Gmail
maily login yahoo # For Yahoo
maily login qq # For qq mail- Start the TUI:
mailyThe background server starts automatically when you open maily.
See docs/keybindings.md for the full list of key bindings.
# Email
maily # Start TUI
maily login gmail # Add Gmail account
maily login yahoo # Add Yahoo account
maily login qq # Add qq mail account
maily logout # Remove account
maily accounts # List accounts
maily sync # Manual full sync
# Search (-a required if multiple accounts)
maily search -a me@gmail.com -q "from:temu" # Interactive TUI search
maily search -q "is:unread" --count # Count matching emails
maily search -q "from:amazon" --format=json --limit=50
maily search -q "has:attachment" --format=table
# Calendar (macOS)
maily calendar # Calendar TUI
maily c # Short alias
maily c list # List available calendars
maily c add "..." # Create event with natural language
# Today View
maily today # Combined email + calendar view
maily t # Short alias
# Server
maily server status # Check server status
maily server stop # Stop the server
maily server start # Start server manually
# Configuration
maily config # Interactive config TUI
# Maintenance
maily update # Update to latest version
maily version # Show version infoConfiguration is stored in ~/.config/maily/:
accounts.yml- Email accounts and credentialsconfig.yml- Application settingsmaily.db- Email cache (SQLite)server.pid- Background server PID
# ~/.config/maily/config.yml
max_emails: 50 # Emails to load per page
default_label: INBOX # Default folder
theme: default # UI theme
# AI accounts (OpenAI-compatible API)
ai_accounts:
- name: openai
base_url: https://api.openai.com/v1
api_key: sk-...
model: gpt-4o-mini- Enable 2-Factor Authentication on your Google account
- Generate an App Password: Google Account > Security > App Passwords
- Use the 16-character App Password when running
maily login gmail
- Enable 2-Factor Authentication on your Yahoo account
- Generate an App Password: Account Security > Generate app password
- Use the App Password when running
maily login yahoo
See docs/features/yahoo-mail.md for detailed instructions.
Maily supports AI-powered features through multiple providers:
- CLI tools: Claude, Codex, Gemini, Ollama (auto-detected)
- BYOK (Bring Your Own Key): Any OpenAI-compatible API (configure in
config.yml)
Features:
- Email summarization (
skey in read view) - Natural language calendar event creation (
nkey in calendar) - Event extraction from emails
- Built with Go and Bubbletea (Elm-architecture TUI framework)
- Uses go-imap/v2 for IMAP and SMTP
- Local cache for fast startup, background server for sync (30-min interval)
- No optimistic UI - server operations wait for confirmation
- macOS calendar via EventKit (CGO)