himalaya

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

Updated Sep 9, 2026
One-click install
npx skills add https://github.com/luckybbjason1/trading --skill himalaya-luckybbjason1
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/luckybbjason1/trading/tree/main/.hermes/skills/email/himalaya
Command: npx skills add https://github.com/luckybbjason1/trading --skill himalaya-luckybbjason1

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 and agent-driven workflows. This Skill lets an AI agent operate a full mailbox through the Himalaya command-line client using standard IMAP and SMTP protocols. ## Core Features & Use Cases - Mailbox Operations: List folders and envelopes, search messages, read email content, and export raw MIME for inspection. - Composing and Sending: Write new emails, reply, and forward non-interactively by piping MML templates to himalaya template send, with support for HTML parts and file attachments. - Organization and Multi-Account Support: Move, copy, delete, and flag messages, download attachments, and switch between multiple configured accounts. - Use Case: Ask the agent to check your Gmail inbox for unread messages from a client, draft a reply with an attached PDF report, and archive the original thread — all without leaving the terminal. ## Quick Start Ask the agent to list the ten most recent emails in your inbox using the himalaya CLI.

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 to `himalaya template send` using a heredoc, for example `cat << 'EOF' | himalaya template send` with From, To, Subject, and body lines. This non-interactive approach avoids opening an editor and works reliably from scripts or agents.

How do I configure himalaya for Gmail IMAP and SMTP?

Create `~/.config/himalaya/config.toml` 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`, otherwise saving sent messages fails after delivery.

Does himalaya support multiple email accounts?

Yes, define multiple `[accounts.NAME]` sections in the config file and mark one as default. Switch accounts per command with the `--account` flag, such as `himalaya --account work envelope list`.

Why does himalaya message send fail after the email was delivered?

This happens when folder aliases use the old singular `[accounts.NAME.folder.alias]` syntax, which v1.2.0 silently ignores. The save-to-Sent step then fails after SMTP succeeds, and retrying sends duplicate emails. Use the plural `folder.aliases.X` dotted keys instead.

Can himalaya handle email attachments and HTML messages?

Yes, himalaya uses MML (MIME Meta Language) for rich composition, supporting attachments via `<#part filename=...>` tags, multipart HTML alternatives, and inline images. Download received attachments with `himalaya attachment download <id>`.