himalaya

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

Updated Apr 13, 2026
One-click install
npx skills add https://github.com/xiaoshan1234/ai-skill --skill himalaya-xiaoshan1234
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/xiaoshan1234/ai-skill/tree/main/origin/himalaya
Command: npx skills add https://github.com/xiaoshan1234/ai-skill --skill himalaya-xiaoshan1234

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 agent operate a full mailbox through the Himalaya CLI using IMAP, SMTP, Notmuch, or Sendmail backends. ## Core Features & Use Cases - Mailbox Operations: List folders and envelopes, search messages, read or export raw MIME, move, copy, delete, and manage flags across multiple accounts. - Non-Interactive Composition: Send, reply, and forward by piping MML templates via stdin, with support for HTML parts, attachments, and inline images. - Configuration Guidance: Covers IMAP/SMTP setup, Gmail and iCloud presets, OAuth2, secure password storage via pass or keyring, and the v1.2.0 folder.aliases syntax that prevents duplicate-send failures. - Use Case: Ask the agent to check your inbox for unread messages from a client, draft a reply with an attached 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 himalaya envelope list after installing the himalaya CLI and configuring an account.

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. This non-interactive approach avoids opening $EDITOR and works reliably from scripts and 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.sent to "[Gmail]/Sent Mail" or saving sent messages fails after delivery.

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 himalaya v1.2.0 silently ignores. Save-to-Sent 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 syntax for rich composition, supporting attachments via <#part filename=...> tags, multipart alternative HTML bodies, and inline images with content IDs. Received attachments are saved with himalaya attachment download.

Does himalaya support multiple email accounts?▼

Yes, define multiple [accounts.NAME] sections in the config file 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?▼

Use backend.auth.cmd to call a password tool like pass show email/imap, or backend.auth.keyring for the system keyring. The raw password option exists but is only recommended for testing.