himalaya

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

Updated Jun 5, 2026
One-click install
npx skills add https://github.com/xu1713/openhorse --skill himalaya-xu1713
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/xu1713/openhorse/tree/main/openhorse/openhorse/skills/email/himalaya
Command: npx skills add https://github.com/xu1713/openhorse --skill himalaya-xu1713

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Reading, searching, and sending email typically requires a GUI client or web interface, which blocks automation and terminal-based workflows. This Skill lets you perform full email operations—listing, reading, replying, forwarding, moving, and deleting messages—directly from the command line via the Himalaya CLI. ## Core Features & Use Cases - Full mailbox operations: List folders and envelopes, search by sender or subject, read messages, download attachments, and manage flags across IMAP accounts. - Non-interactive composing: Send, reply, and forward emails by piping MML/MIME templates through stdin, with support for HTML parts, attachments, and inline images. - Multi-account and provider support: Configure Gmail, iCloud, or generic IMAP/SMTP accounts with secure password handling via pass, keyring, or OAuth2. - Use Case: An agent needs to reply to a customer email automatically. It reads the original message with himalaya message read 42, builds a reply template, and pipes it to himalaya template send—no editor or GUI required. ## Quick Start Ask the assistant to list the latest emails in your inbox using himalaya, making sure the himalaya CLI is installed and an account is configured in ~/.config/himalaya/config.toml first.

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' with From, To, and Subject headers. This non-interactive approach avoids opening an editor and works reliably in scripts and automation.

How do I configure himalaya for Gmail IMAP and SMTP?

Create a config.toml account with imap.gmail.com:993 and smtp.gmail.com:587, using an app password if 2FA is enabled. You must also set folder.aliases mapping sent to [Gmail]/Sent Mail, drafts to [Gmail]/Drafts, and trash to [Gmail]/Trash.

Why does himalaya fail to save sent messages on Gmail?

Gmail's Sent folder is named [Gmail]/Sent Mail, not Sent, so saving fails after SMTP delivery succeeds. Add folder.aliases entries using the plural dotted-key syntax under your account; the older singular folder.alias form is silently ignored in v1.2.0.

Does himalaya support multiple email accounts?

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

How do I add attachments to emails sent with himalaya?

Use MML syntax in the message body with a part tag specifying the filename, such as <#part filename=/path/to/file.pdf><#/part>. Himalaya compiles MML parts into proper MIME attachments when the message is sent.

Can himalaya store passwords securely instead of plaintext?

Yes, use backend.auth.cmd to call a password tool like pass show email/imap, or backend.auth.keyring to use the system keyring. Raw passwords via backend.auth.raw are supported but recommended only for testing.