名称: himalaya
描述: "通过 IMAP/SMTP 管理邮件的命令行工具。使用 himalaya 可以在终端中列出、阅读、撰写、回复、转发、搜索和管理邮件。支持多账户,并使用 MML(MIME 元语言)撰写邮件。"
主页: https://github.com/pimalaya/himalaya
元数据: {"clawdbot":{"emoji":"📧","requires":{"bins":["himalaya"]},"install":[{"id":"brew","kind":"brew","formula":"himalaya","bins":["himalaya"],"label":"安装 Himalaya (brew)"}]}}
Himalaya 是一款命令行邮件客户端,让你可以通过终端,使用 IMAP、SMTP、Notmuch 或 Sendmail 后端来管理邮件。
references/configuration.md(配置文件设置 + IMAP/SMTP 认证)references/message-composition.md(用于撰写邮件的 MML 语法)himalaya --version 验证)~/.config/himalaya/config.toml运行交互式向导来设置账户:
himalaya account configure
或者手动创建 ~/.config/himalaya/config.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" # 或使用系统密钥环
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"
himalaya folder list
列出收件箱(默认)中的邮件:
himalaya envelope list
列出特定文件夹中的邮件:
himalaya envelope list --folder "Sent"
分页列出:
himalaya envelope list --page 1 --page-size 20
himalaya envelope list from john@example.com subject meeting
按 ID 阅读邮件(显示纯文本):
himalaya message read 42
导出原始 MIME 格式:
himalaya message export 42 --full
交互式回复(打开 $EDITOR):
himalaya message reply 42
回复所有人:
himalaya message reply 42 --all
himalaya message forward 42
交互式撰写(打开 $EDITOR):
himalaya message write
使用模板直接发送:
cat << 'EOF' | himalaya template send
From: you@example.com
To: recipient@example.com
Subject: Test Message
Hello from Himalaya!
EOF
或使用标头标志:
himalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message body here"
移动到文件夹:
himalaya message move 42 "Archive"
复制到文件夹:
himalaya message copy 42 "Important"
himalaya message delete 42
添加标记:
himalaya flag add 42 --flag seen
移除标记:
himalaya flag remove 42 --flag seen
列出账户:
himalaya account list
使用特定账户:
himalaya --account work envelope list
保存邮件中的附件:
himalaya attachment download 42
保存到指定目录:
himalaya attachment download 42 --dir ~/Downloads
大多数命令支持 --output 选项以输出结构化格式:
himalaya envelope list --output json
himalaya envelope list --output plain
启用调试日志:
RUST_LOG=debug himalaya envelope list
完整追踪(包含回溯):
RUST_LOG=trace RUST_BACKTRACE=1 himalaya envelope list
himalaya --help 或 himalaya <command> --help 查看详细用法。references/message-composition.md)。pass、系统密钥环或能输出密码的命令来安全存储密码。