AgentSkillsCN

himalaya

通过IMAP/SMTP管理电子邮件。使用`himalaya`,在终端中实现邮件列表、阅读、撰写、回复、转发、搜索与归档等功能。支持多账户管理,并可借助MML(MIME元语言)进行邮件内容编辑。

SKILL.md
--- frontmatter
name: himalaya
description: "CLI to manage emails via IMAP/SMTP. Use `himalaya` to list, read, write, reply, forward, search, and organize emails from the terminal. Supports multiple accounts and message composition with MML (MIME Meta Language)."
homepage: https://github.com/pimalaya/himalaya
metadata:
  { "requires": { "bins": ["himalaya"] } }

Himalaya Email CLI

Himalaya is a CLI email client that lets you manage emails from the terminal using IMAP, SMTP, Notmuch, or Sendmail backends.

Prerequisites

  1. Himalaya CLI installed (himalaya --version to verify)
  2. A configuration file at ~/.config/himalaya/config.toml
  3. IMAP/SMTP credentials configured (password stored securely)

Configuration Setup

Run the interactive wizard to set up an account:

bash
himalaya account configure

Or create ~/.config/himalaya/config.toml manually:

toml
[accounts.personal]
email = "you@example.com"
display-name = "Your Name"
default = true

backend.type = "imap"
backend.host = "imap.example.com"
backend.port = 993
backend.encryption.type = "tls"
backend.login = "you@example.com"
backend.auth.type = "password"
backend.auth.cmd = "pass show email/imap"  # or use keyring

message.send.backend.type = "smtp"
message.send.backend.host = "smtp.example.com"
message.send.backend.port = 587
message.send.backend.encryption.type = "start-tls"
message.send.backend.login = "you@example.com"
message.send.backend.auth.type = "password"
message.send.backend.auth.cmd = "pass show email/smtp"

Common Operations

List Folders

bash
himalaya folder list

List Emails

List emails in INBOX (default):

bash
himalaya envelope list

List emails in a specific folder:

bash
himalaya envelope list --folder "Sent"

Search Emails

bash
himalaya envelope list from john@example.com subject meeting

Read an Email

bash
himalaya message read 42

Reply to an Email

bash
himalaya message reply 42

Reply-all:

bash
himalaya message reply 42 --all

Write a New Email

Interactive compose:

bash
himalaya message write

Send directly:

bash
cat << 'EOF' | himalaya template send
From: you@example.com
To: recipient@example.com
Subject: Test Message

Hello from Himalaya!
EOF

Move/Delete Emails

bash
himalaya message move 42 "Archive"
himalaya message delete 42

Multiple Accounts

bash
himalaya account list
himalaya --account work envelope list