Himalaya Email
CLI to manage emails via IMAP/SMTP. List, read, write, reply, forward, search, and organize emails from the terminal.
Tags: email, imap, smtp, productivity
Category: Productivity
Use Cases
- Morning email briefing: list unread emails via OpenClaw heartbeat
- Search specific threads during conversations without opening a browser
- Draft and send emails from the terminal or via AI assistant
- Automated email monitoring: watch for important senders or subjects
- PGP-encrypted email communication from the command line
- Export email data as JSON for analysis or archiving
Tips
- Use `himalaya configure` wizard for initial setup — it walks through account configuration
- Always use `--output json` for automation and OpenClaw integration
- For Gmail, create an App Password at myaccount.google.com/apppasswords for simplest setup
- Use the keyring feature to store passwords securely in your system keychain
- Combine with OpenClaw cron for periodic inbox summaries: `himalaya envelope list --folder INBOX --max 10 --output json`
- Set `$EDITOR` to your preferred editor before composing emails
- Use folder aliases in config to shorten common folder names
- Search with IMAP queries: `himalaya envelope list --query 'FROM sender@example.com UNSEEN'`
Known Issues & Gotchas
- Gmail requires OAuth 2.0 or App Password — regular password won't work with Google's security
- OAuth 2.0 setup requires creating Google Cloud credentials — not trivial for first-timers
- Some features (PGP, Notmuch, OAuth) are cargo features that may not be in the default binary
- Message composition uses $EDITOR — set it before using himalaya for writing emails
- The project warns it's still maturing — some edge cases may not be handled gracefully
- IMAP IDLE (push notifications) is not supported yet — you need to poll for new messages
- Proton Mail requires Proton Bridge running locally as an IMAP/SMTP proxy
- OpenClaw integration may require the skill to be explicitly invoked — it doesn't auto-detect email intent
Alternatives
- Google Workspace CLI (gog)
- mutt/neomutt
- aerc
- mblaze
- notmuch
Community Feedback
Himalaya strikes a good balance between simple configurability and features. It's a relatively new contender, written in Rust.
— Reddit r/commandline
Comparing CLI email clients (Mutt vs Himalaya) — Mutt is well established and powerful. Never heard of Himalaya and according to the git page it shouldn't be used for production.
— Reddit r/commandline
I'm trying to use the built-in Himalaya skill in OpenClaw and can't get my agent to actually call it. Setup involves OAuth2 Gmail configuration.
— Reddit r/openclaw
Just yesterday I set up himalaya to access mail via IMAP and SMTP. So far so good. I am pretty sure Outlook allows IMAP access.
— AnswerOverflow (OpenClaw Discord)
Configuration Examples
Install and configure Gmail
# Install
brew install himalaya
# Interactive setup
himalaya configure
# Or manual TOML config (~/.config/himalaya/config.toml)
[accounts.gmail]
default = true
email = "you@gmail.com"
backend.type = "imap"
backend.host = "imap.gmail.com"
backend.port = 993
backend.login = "you@gmail.com"
backend.passwd.cmd = "echo 'your-app-password'"
message.send.backend.type = "smtp"
message.send.backend.host = "smtp.gmail.com"
message.send.backend.port = 465Common email operations
# List recent emails
himalaya envelope list --folder INBOX --max 10
# Read a specific email
himalaya message read <id>
# Search
himalaya envelope list --query 'FROM boss@company.com UNSEEN'
# Send (opens $EDITOR)
himalaya message write
# JSON output for scripting
himalaya envelope list --output json | jq '.[].subject'Installation
brew install himalayaHomepage: https://github.com/pimalaya/himalaya
Source: bundled