Himalaya: 高效的 CLI 电子邮件管理 - Openclaw Skills
安装与下载
1. ClawHub CLI
从源直接安装技能的最快方式。
npx clawhub@latest install himalaya
2. 手动安装
将技能文件夹复制到以下位置之一
全局模式~/.openclaw/skills/
工作区
<project>/skills/
优先级:工作区 > 本地 > 内置
3. 提示词安装
将此提示词复制到 OpenClaw 即可自动安装。
请帮我使用 Clawhub 安装 himalaya。如果尚未安装 Clawhub,请先安装(npm i -g clawhub)。
什么是 Himalaya Email CLI?
Himalaya 是一款现代 CLI 工具,专为偏好在不离开终端环境的情况下管理数字通信的开发者和高级用户设计。通过支持 IMAP 和 SMTP 等标准协议,它为多个电子邮件账户提供了一个统一且响应迅速的界面,使用户能够极其高效地列出、阅读和撰写邮件。该工具是 Openclaw Skills 中构建自动化工作流的核心组件,为传统 GUI 邮件客户端提供了一个可脚本化的替代方案。
除了基础的邮件处理,Himalaya 还引入了高级功能,如用于撰写复杂邮件的 MML(MIME 元语言),以及包括 Notmuch 和 Sendmail 在内的灵活后端支持。其核心理念是速度、安全性和互操作性,使其成为任何希望将邮件功能集成到基于终端的开发设置中的人员的必备工具。
Himalaya Email CLI 应用场景
- 通过单一统一的终端界面管理多个专业和个人电子邮件账户。
- 通过 shell 脚本和 cron 任务自动执行邮件回复、通知或报告。
- 无需加载沉重的 Web 界面,即可对大型收件箱进行快速、基于命令行的搜索和过滤。
- 利用 Openclaw Skills 的结构化 JSON 输出,将邮件功能集成到自定义开发工具中。
- 用户使用交互式向导或通过手动创建 TOML 配置文件来初始化配置。
- Himalaya 使用 IMAP 检索信封并使用 SMTP 发送邮件,与远程邮件服务器建立安全连接。
- CLI 获取邮件元数据,允许用户在本地列出和过滤“信封”,直到请求时才下载完整的邮件正文。
- 在阅读或编写时,该工具与系统编辑器或标准输入交互,以处理邮件内容和 MML 标签。
- 标记、移动或删除邮件等更改会实时同步回服务器。
Himalaya Email CLI 配置指南
要开始使用此技能,请确保您已安装二进制文件并准备好账户凭据。
# 使用 Homebrew 安装 Himalaya
brew install himalaya
# 验证安装
himalaya --version
# 运行交互式配置向导
himalaya account configure
或者,您可以在 ~/.config/himalaya/config.toml 手动创建配置文件,以定义您的 IMAP 和 SMTP 设置。
Himalaya Email CLI 数据架构与分类体系
Himalaya 使用结构化配置和标准电子邮件协议组织数据。下表描述了该技能处理的主要数据元素:
| 元素 | 类型 | 描述 |
|---|---|---|
| config.toml | TOML | 定义账户、后端和认证命令的主配置文件。 |
| 信封 (Envelope) | 元数据 | 包含用于邮件列表的 ID、主题、发件人和日期。 |
| MML | 格式 | 用于编写附件和富文本的 MIME 元语言。 |
| JSON | 输出 | 适用于所有列表和读取操作的结构化数据格式。 |
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: {"clawdbot":{"emoji":"??","requires":{"bins":["himalaya"]},"install":[{"id":"brew","kind":"brew","formula":"himalaya","bins":["himalaya"],"label":"Install Himalaya (brew)"}]}}
Himalaya Email CLI
Himalaya is a CLI email client that lets you manage emails from the terminal using IMAP, SMTP, Notmuch, or Sendmail backends.
References
references/configuration.md(config file setup + IMAP/SMTP authentication)references/message-composition.md(MML syntax for composing emails)
Prerequisites
- Himalaya CLI installed (
himalaya --versionto verify) - A configuration file at
~/.config/himalaya/config.toml - IMAP/SMTP credentials configured (password stored securely)
Configuration Setup
Run the interactive wizard to set up an account:
himalaya account configure
Or create ~/.config/himalaya/config.toml manually:
[accounts.personal]
email = "[email protected]"
display-name = "Your Name"
default = true
backend.type = "imap"
backend.host = "imap.example.com"
backend.port = 993
backend.encryption.type = "tls"
backend.login = "[email protected]"
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 = "[email protected]"
message.send.backend.auth.type = "password"
message.send.backend.auth.cmd = "pass show email/smtp"
Common Operations
List Folders
himalaya folder list
List Emails
List emails in INBOX (default):
himalaya envelope list
List emails in a specific folder:
himalaya envelope list --folder "Sent"
List with pagination:
himalaya envelope list --page 1 --page-size 20
Search Emails
himalaya envelope list from [email protected] subject meeting
Read an Email
Read email by ID (shows plain text):
himalaya message read 42
Export raw MIME:
himalaya message export 42 --full
Reply to an Email
Interactive reply (opens $EDITOR):
himalaya message reply 42
Reply-all:
himalaya message reply 42 --all
Forward an Email
himalaya message forward 42
Write a New Email
Interactive compose (opens $EDITOR):
himalaya message write
Send directly using template:
cat << 'EOF' | himalaya template send
From: [email protected]
To: [email protected]
Subject: Test Message
Hello from Himalaya!
EOF
Or with headers flag:
himalaya message write -H "To:[email protected]" -H "Subject:Test" "Message body here"
Move/Copy Emails
Move to folder:
himalaya message move 42 "Archive"
Copy to folder:
himalaya message copy 42 "Important"
Delete an Email
himalaya message delete 42
Manage Flags
Add flag:
himalaya flag add 42 --flag seen
Remove flag:
himalaya flag remove 42 --flag seen
Multiple Accounts
List accounts:
himalaya account list
Use a specific account:
himalaya --account work envelope list
Attachments
Save attachments from a message:
himalaya attachment download 42
Save to specific directory:
himalaya attachment download 42 --dir ~/Downloads
Output Formats
Most commands support --output for structured output:
himalaya envelope list --output json
himalaya envelope list --output plain
Debugging
Enable debug logging:
RUST_LOG=debug himalaya envelope list
Full trace with backtrace:
RUST_LOG=trace RUST_BACKTRACE=1 himalaya envelope list
Tips
- Use
himalaya --helporhimalaya <command> --helpfor detailed usage. - Message IDs are relative to the current folder; re-list after folder changes.
- For composing rich emails with attachments, use MML syntax (see
references/message-composition.md). - Store passwords securely using
pass, system keyring, or a command that outputs the password.
-
08.09
王者荣耀世界是手游吗 王者荣耀世界是否基于虚幻引擎5开发
-
08.09
Clawdbot 文档专家:轻松导航 Openclaw 技能
-
08.09
GameRepublicNewHorizons成立新国际顾问委员会-助力2026年大会筹备
-
08.09
QQ空间电脑版登录入口-qq空间网页版在线登录
-
08.09
索尼PS5游戏PC移植份额下降-发行时机影响显著
-
08.09
御龙战仙传奇技能是什么
-
-
- 如何打开搜狗翻译语音识别
- 08.09
-
- 鸣潮莫宁怎么全方位培养
- 08.09
-
- 本来生活如何注销账号
- 08.09
-
- 渝畅行app乘车优惠获取方法
- 08.09
-
-
下载
- |
-
-
下载
- 《行尸走肉第一章》免安装中文汉化硬盘版下载
- 单机|436 MB
- 一款以动作冒险为主题的游戏
-
-
下载
- 《街头霸王X铁拳》免安装中文汉化硬盘版下载
- 单机|111MB
- 一款非常好玩的格斗游戏
-
-
下载
- |
-
-
下载
- 《暗黑破坏神3》免安装繁体中文正式版下载
- 单机|7630 MB
- 一款以角色扮演为主题的游戏
-
-
下载
- 《马克思佩恩3》免安装硬盘版下载
- 单机|27033 MB
- 一款以第三人称射击为主题的游戏