himalaya

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

Updated Jul 10, 2026
One-click install
npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill himalaya-avatar-arts
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/AvaTar-ArTs/.Agent-skills/tree/main/skills/email/himalaya
Command: npx skills add https://github.com/AvaTar-ArTs/.Agent-skills --skill himalaya-avatar-arts

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 breaks terminal-based and agent-driven workflows. This Skill provides complete instructions for operating the Himalaya CLI so email can be handled entirely from the command line. ## Core Features & Use Cases - Full mailbox operations: List folders and envelopes, search messages, read or export raw MIME, move, copy, delete, and manage flags across IMAP accounts. - Non-interactive composing: Send, reply, and forward by piping MML templates via stdin, including HTML alternatives, attachments, and inline images. - Multi-account configuration: Set up IMAP/SMTP, Notmuch, or OAuth2 backends with secure password handling via pass, keyring, or commands, plus correct folder alias mapping for providers like Gmail. - Use Case: An AI agent needs to reply to a support email: it reads the message with himalaya message read 42, builds a reply with the proper In-Reply-To header, and pipes it to himalaya template send without any interactive editor. ## Quick Start Ask the agent to list the latest emails in your inbox using Himalaya and then send a plain-text reply to one of them by piping a composed message to himalaya template send.

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 complete message with headers and body to himalaya template send using a heredoc or cat. This non-interactive approach avoids opening $EDITOR and works reliably in scripts and agent workflows.

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 send duplicate emails on Gmail?

Duplicates happen when folder aliases use the old singular folder.alias syntax, which v1.2.0 silently ignores. Save-to-Sent then fails after SMTP delivery succeeds, and any retry re-runs the send. Use the plural folder.aliases.X dotted keys instead.

Can Himalaya handle email attachments and HTML messages?

Yes. Download attachments with himalaya attachment download, and compose rich messages using MML syntax with multipart, part, filename, and inline disposition tags that compile to proper MIME when sent.

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 should Himalaya store email passwords securely?

Avoid backend.auth.raw in production. Use backend.auth.cmd to fetch the password from a tool like pass, or backend.auth.keyring to use the system keyring after running himalaya account configure to store the secret.