himalaya

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

1|Updated Jun 24, 2026
One-click install
npx skills add https://github.com/maopujie10-sys/Bailongma --skill himalaya-maopujie10-sys
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: himalaya
Source: https://github.com/maopujie10-sys/Bailongma/tree/main/skills/hermes-skills/email/himalaya
Command: npx skills add https://github.com/maopujie10-sys/Bailongma --skill himalaya-maopujie10-sys

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires himalaya, and includes references (resource) components.

What problem does it solve? Reading, searching, composing, and organizing email normally requires a GUI client or web interface, which blocks automation. This Skill lets an agent operate a full mailbox through terminal commands using the Himalaya CLI over IMAP and SMTP. ## Core Features & Use Cases - Mailbox Operations: List folders and envelopes, search messages, read emails, and download attachments with JSON output for programmatic parsing. - Non-Interactive Composition: Send, reply, and forward emails by piping MML templates or headers through stdin, avoiding interactive editor sessions. - Message Management: Move, copy, delete, and flag messages across folders and multiple configured accounts. - Use Case: An agent monitors an inbox, searches for messages from a specific sender, reads the latest one, and pipes a templated reply through himalaya template send without any human interaction. ## 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 From, To, and Subject headers into `himalaya template send` via stdin for non-interactive sending. Alternatively use `himalaya message write -H` with header flags, since running it without piped input opens an interactive editor.

How do I configure himalaya for Gmail IMAP and SMTP?

Create `~/.config/himalaya/config.toml` with an account section defining the IMAP backend (imap.gmail.com:993, TLS) and SMTP send backend (smtp.gmail.com:587, STARTTLS). Add folder.aliases entries mapping sent, drafts, and trash to Gmail's folder names like `[Gmail]/Sent Mail`.

Does himalaya support multiple email accounts?

Yes, himalaya supports multiple accounts defined in the config file. List them with `himalaya account list` and select one per command using the `--account` flag, for example `himalaya --account work envelope list`.

Why does himalaya send duplicate emails after a failed send?

In himalaya v1.2.0, the old `[accounts.NAME.folder.alias]` singular syntax is silently ignored, so saving to the Sent folder fails after SMTP delivery succeeds and the command exits non-zero. Retrying re-runs the SMTP send, duplicating the email; use the plural `folder.aliases.X` dotted keys instead.

Can himalaya output email data as JSON for scripts?

Yes, most himalaya commands accept `--output json` for structured output, such as `himalaya envelope list --output json`. This makes envelope listings and message data easy to parse programmatically in scripts and agent workflows.