A modern terminal-based email client that combines the efficiency of CLI tools with the polish of contemporary TUI applications. Built with Go and Bubble Tea, designed for developers and power users who live in terminal environments.
Mel delivers the resource efficiency and keyboard-driven speed that power users crave, while maintaining the familiar interaction patterns of modern development tools like neovim and lazygit.
- Left Sidebar: Dynamic mail folder tree with real-time unread counts and sync status
- Mail Folders: Automatically scans
~/Mail
directory for actual email folders - Thread List: Gmail-style conversation view with subject, participants, and timestamps
- Thread View: Continuous conversation flow with smart collapsing
- Modal Interface: Neovim-inspired modal operations (Normal/Insert/Visual/Search)
- Telescope Integration: Two-pane search with results list and live preview
- Content Search (
<leader>fg
): Full-text search across all emails - Sender Search (
<leader>fs
): Find emails from specific people/addresses - Global Email Search (
<leader>fe
): Fuzzy search across subjects, senders, dates
- Gmail-Style Threading: Single conversation flow with smart collapsing
- Thread Actions: Archive, delete, star, mark read/unread
- Smart Navigation:
j/k
between emails,n/p
between threads
- Email Sync:
mbsync
/offlineimap
for IMAP synchronization - Search & Indexing:
notmuch
for search and threading support - Sending:
msmtp
/sendmail
for SMTP operations
Mel requires Go and these external tools to be installed and configured:
- Go β₯ 1.22 (to build; verify with
go version
) - mbsync or offlineimap for email synchronization
- notmuch for search and threading
- msmtp or sendmail for sending emails
# Clone the repository
git clone https://github.com/romaintb/mel.git
cd mel
# Build the application
make build
# Run mel
./cmd/mel/mel
Mel automatically detects your email setup and works with standard configurations:
- Maildir:
~/Mail
(configurable) - Config:
~/.config/mel/config.yaml
(auto-generated with defaults)
Mel automatically scans your mail directory for folders and displays them in the sidebar:
- Configure mbsync to sync emails to
~/Mail
(or your preferred directory) - Run mbsync to download your email folders
- Mel will automatically detect and display all folders with unread counts
- Special folders (INBOX, Sent, Drafts, Trash, etc.) are automatically recognized and sorted first
- Maildir storage folders (
cur
,new
,tmp
) are automatically filtered out and not displayed - Press
r
in the sidebar to refresh the folder list - Smart scrolling automatically handles long folder lists within the available screen height
- Text truncation ensures long folder names never wrap to multiple lines
- Optimized sidebar width (40 characters) provides more space for folder names
Example mbsync configuration:
# ~/.mbsyncrc
IMAPAccount gmail
Host imap.gmail.com
User your-email@gmail.com
PassCmd "pass show email/gmail"
SSLType IMAPS
IMAPStore gmail-remote
Account gmail
MaildirStore gmail-local
Path ~/Mail/Gmail/
Inbox ~/Mail/Gmail/INBOX
Channel gmail
Master :gmail-remote:
Slave :gmail-local:
Create Slave
Sync All
Mel supports two icon display modes:
- ASCII Mode (default): Uses single-character ASCII art icons for compatibility with all terminals
- Emoji Mode: Uses colorful emoji icons for better visual appeal
Toggle between modes with <leader>i
or configure the default in your config file:`
ui:
icon_mode: "ascii" # or "emoji"
h/l
- Navigate between sidebar and contentj/k
- Navigate folders and actions in sidebar (with smart scrolling)n/p
- Next/previous unread threado
- Expand/collapse threada
- Archive threadd
- Delete threads
- Star/unstar threadr
- Mark as read / Refresh folders in sidebaru
- Mark as unreade
- Toggle sidebari
- Enter insert modev
- Enter visual mode/
- Enter search modeenter
- Select folder or action in sidebar
<leader>fg
- Content search<leader>fs
- Sender search<leader>fe
- Global searchesc
- Exit search mode
<space>
- Show available commands<space>e
- Toggle sidebar<space>i
- Toggle icon mode (emoji/ascii)
Mel follows a delegation model where external tools handle the heavy lifting:
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β Mel β β External β β Email β
β (TUI/UX) βββββΊβ Tools βββββΊβ Servers β
βββββββββββββββββββ βββββββββββββββββββ βββββββββββββββββββ
β β
β ββββββββββ΄βββββββββ
β β β
β mbsync notmuch
β (IMAP sync) (search/index)
β
ββββββββββββββββ
β
msmtp
(SMTP send)
- Email Manager: Coordinates external tool operations
- Search Service: Implements Telescope-style search with relevance scoring
- UI Components: Modal interface with neovim-inspired interactions
- Configuration: Auto-detection with sensible defaults
- Memory Usage: < 100MB runtime footprint
- Startup Time: < 500ms cold start
- Response Time: < 100ms for all UI interactions
- Search Speed: Instant results for indexed content
make build # Build the application
make test # Run tests
make clean # Clean build artifacts
internal/
βββ app/ # Main application logic
βββ config/ # Configuration management
βββ email/ # Email data models and external tool integration
βββ icons/ # Icon service with emoji/ASCII mode support
βββ search/ # Search service with relevance scoring
βββ ui/ # TUI components and modal interface
- mbsync: Email synchronization via IMAP
- notmuch: Search, indexing, and threading
- msmtp: SMTP sending operations
Security note: Avoid storing SMTP/IMAP passwords in plain text. Prefer OAuth2 or OS keychain helpers (e.g., pass
, GNOME Keyring, macOS Keychain) and restrict file permissions on config files.
- Familiar Efficiency: Keyboard shortcuts that feel natural to neovim/lazygit users
- Hybrid Interaction: Mouse support for discoverability, keyboard shortcuts for speed
- Conversation-First: Gmail-style threading as the default email paradigm
- Resource Conscious: Sub-100MB memory footprint, instant startup, snappy interactions
- Basic TUI framework with Bubble Tea
- External tool integration structure
- Modal interface implementation
- Email data models
- Search service architecture
- Basic keybindings
- Complete search implementation
- Thread conversation view
- Compose interface with context
- Mouse support integration
- Visual polish and status indicators
- Smart threading improvements
- Performance optimizations
- Extended external tool support
Contributions are welcome! Please read our contributing guidelines and ensure your code follows our standards:
- All Go code must pass
gofmt
,go vet
, andstaticcheck
- Follow Go best practices and idioms
- Maintain the PRD-driven architecture
- Add tests for new functionality
This project is licensed under the MIT License - see the LICENSE file for details.
- Inspired by the efficiency of
aerc
and the polish of modern TUI tools - Built with Bubble Tea for excellent TUI support
- Designed for the neovim/lazygit user experience