himalaya

Manage IMAP and SMTP email accounts from the terminal using the Himalaya CLI.

1|Updated Jul 22, 2026
One-click install
npx skills add https://github.com/IceHeartGitH/Hermes-Agent-Android-Termux --skill himalaya-iceheartgith
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/IceHeartGitH/Hermes-Agent-Android-Termux/tree/main/custom-skills/email/himalaya
Command: npx skills add https://github.com/IceHeartGitH/Hermes-Agent-Android-Termux --skill himalaya-iceheartgith

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Reading, searching, composing, and organizing email normally requires a GUI client or web interface, which breaks terminal-based and agent-driven workflows. This Skill lets an AI agent operate a full mailbox through the Himalaya command-line client using IMAP and SMTP backends. ## Core Features & Use Cases - Mailbox Operations: List folders and envelopes, search messages, read or export raw MIME content, move, copy, delete, and manage flags. - Non-Interactive Composition: Send, reply, and forward emails by piping MML/MIME templates via stdin, with support for HTML parts, attachments, and inline images. - Multi-Account Configuration: Configure IMAP/SMTP, Notmuch, or OAuth2 backends for providers like Gmail and iCloud, with secure password handling via pass or keyring. - Use Case: Ask the agent to check your inbox for unread messages from a client, draft a reply quoting the original thread, and send it — all without leaving the terminal. ## Quick Start Ask the agent to list the ten most recent emails in your inbox using himalaya envelope list after configuring your account in ~/.config/himalaya/config.toml.

Frequently Asked Questions about himalaya

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I send an email from the command line with himalaya?▼

Pipe a message with headers and body into himalaya template send using a heredoc, for example cat << 'EOF' | himalaya template send with From, To, and Subject headers. This non-interactive approach avoids opening $EDITOR and is the recommended method for scripts and agents.

How to configure himalaya for Gmail IMAP and SMTP?▼

Create ~/.config/himalaya/config.toml with imap.gmail.com:993 and smtp.gmail.com:587 backends, using an App Password if 2FA is enabled. You must also set folder.aliases.sent to "[Gmail]/Sent Mail" or saving sent messages fails after delivery.

Why does himalaya send duplicate emails on retry?▼

Duplicates happen when folder aliases use the old singular [accounts.NAME.folder.alias] syntax, which v1.2.0 silently ignores. Save-to-Sent then fails after SMTP succeeds, and retrying the non-zero exit re-runs the send. Use the plural folder.aliases.X keys instead.

Does himalaya support multiple email accounts?▼

Yes, define multiple [accounts.NAME] sections in config.toml and mark one as default = true. Switch between them at runtime with the --account flag, for example himalaya --account work envelope list.

Can himalaya add attachments to outgoing emails?▼

Yes, use MML syntax in the message body with <#part filename=/path/to/file.pdf><#/part> tags, optionally setting a display name. Himalaya compiles MML parts into proper MIME structure when sending via himalaya template send.

How do I store himalaya email passwords securely?▼

Use backend.auth.cmd to call a password manager such as pass show email/imap, or backend.auth.keyring for the system keyring. Avoid backend.auth.raw, which stores the plaintext password in the config file and is only suitable for testing.