himalaya

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

Updated Aug 19, 2026
One-click install
npx skills add https://github.com/swcstudiospace/aimeecodes --skill himalaya-swcstudiospace
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/swcstudiospace/aimeecodes/tree/main/.aimee/skills/himalaya
Command: npx skills add https://github.com/swcstudiospace/aimeecodes --skill himalaya-swcstudiospace

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Reading, searching, composing, and organizing email typically requires a GUI client or web interface, which blocks terminal-based agents and scripts from operating a mailbox. This Skill lets an agent perform full email workflows through the Himalaya command-line client. ## Core Features & Use Cases - Mailbox Operations: List folders and envelopes, search messages, read or export raw MIME, move, copy, delete, and manage flags across IMAP accounts. - Non-Interactive Composition: Send, reply, and forward 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, including correct folder alias mapping to avoid duplicate-send failures. - Use Case: An agent monitors an inbox, searches for messages from a specific sender, downloads attachments, and sends a templated reply — all without leaving the terminal. ## Quick Start Ask the agent to list the latest emails in your inbox using the himalaya CLI and show the results as JSON.

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 or cat. This non-interactive approach avoids opening $EDITOR and works reliably from scripts and agents.

How to 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 send duplicate emails on retry?▼

With the deprecated singular folder.alias syntax, save-to-Sent fails after SMTP delivery succeeds, so the send command exits non-zero. Any caller that retries re-runs SMTP and duplicates the email; use the plural folder.aliases.X syntax instead.

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 in himalaya?▼

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

Can himalaya store passwords securely instead of plaintext?▼

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