Himalaya Email

CLI to manage emails via IMAP/SMTP. List, read, write, reply, forward, search, and organize emails from the terminal.

Himalaya is a feature-rich CLI email client written in Rust by the Pimalaya project. It supports IMAP, Maildir, and Notmuch backends for reading, and SMTP/Sendmail for sending — making it one of the most versatile terminal email tools available. It's not trying to replace Thunderbird or Apple Mail; it's the CLI bridge for scriptable, pipeline-friendly email management. The feature set is impressive: multi-account configuration (interactive wizard or TOML config), message composition via $EDITOR, folder/envelope/message management, PGP encryption (via GPG, native, or shell commands), OAuth 2.0 support (critical for Gmail/Outlook), and JSON output for automation. It works with every major email provider: Gmail, Outlook, iCloud Mail, Proton Mail (via Proton Bridge), and any standard IMAP/SMTP server. Himalaya shines for automation workflows. The `--output json` flag makes it trivial to parse email data in scripts. Combined with OpenClaw, you get an AI that can check your inbox, summarize unread messages, search for specific threads, and draft replies — all through clean CLI commands. The Rust foundation means it's fast and reliable, with careful memory management and no runtime dependencies. Installation is available via Homebrew, Cargo, Nix, Scoop (Windows), and pre-built binaries. The project is actively maintained with a companion TUI (himalaya-repl) and editor plugins for Vim and Emacs. Setup complexity varies by provider: Gmail requires an App Password or OAuth 2.0 configuration, Outlook needs OAuth, and simpler IMAP providers work with just username/password. The interactive wizard (`himalaya configure`) handles most of the setup, but OAuth flows require some manual steps. Best suited for: developers who want email in their terminal, OpenClaw users wanting AI-managed email, anyone automating email workflows, privacy-conscious users who want PGP-encrypted email from the CLI.

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 = 465

Common 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 himalaya

Homepage: https://github.com/pimalaya/himalaya

Source: bundled