himalaya
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHimalaya Email CLI
Himalaya Email CLI
Himalaya is a CLI email client that lets you manage emails from the terminal using IMAP, SMTP, Notmuch, or Sendmail backends.
Himalaya是一款CLI邮件客户端,可让你通过IMAP、SMTP、Notmuch或Sendmail后端在终端中管理邮件。
References
参考资料
- (config file setup + IMAP/SMTP authentication)
references/configuration.md - (MML syntax for composing emails)
references/message-composition.md
- (配置文件设置 + IMAP/SMTP身份验证)
references/configuration.md - (用于撰写邮件的MML语法)
references/message-composition.md
Prerequisites
前置条件
- Himalaya CLI installed (to verify)
himalaya --version - A configuration file at
~/.config/himalaya/config.toml - IMAP/SMTP credentials configured (password stored securely)
- 已安装Himalaya CLI(可通过验证)
himalaya --version - 配置文件位于
~/.config/himalaya/config.toml - 已配置IMAP/SMTP凭据(密码需安全存储)
Configuration Setup
配置设置
Run the interactive wizard to set up an account:
bash
himalaya account configureOr create manually:
~/.config/himalaya/config.tomltoml
[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"运行交互式向导来设置账户:
bash
himalaya account configure或手动创建:
~/.config/himalaya/config.tomltoml
[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"Common Operations
常用操作
List Folders
列出文件夹
bash
himalaya folder listbash
himalaya folder listList Emails
列出邮件
List emails in INBOX (default):
bash
himalaya envelope listList emails in a specific folder:
bash
himalaya envelope list --folder "Sent"List with pagination:
bash
himalaya envelope list --page 1 --page-size 20列出收件箱中的邮件(默认):
bash
himalaya envelope list列出指定文件夹中的邮件:
bash
himalaya envelope list --folder "Sent"分页列出邮件:
bash
himalaya envelope list --page 1 --page-size 20Search Emails
搜索邮件
bash
himalaya envelope list from john@example.com subject meetingbash
himalaya envelope list from john@example.com subject meetingRead an Email
阅读邮件
Read email by ID (shows plain text):
bash
himalaya message read 42Export raw MIME:
bash
himalaya message export 42 --full通过ID阅读邮件(显示纯文本):
bash
himalaya message read 42导出原始MIME格式:
bash
himalaya message export 42 --fullReply to an Email
回复邮件
Interactive reply (opens $EDITOR):
bash
himalaya message reply 42Reply-all:
bash
himalaya message reply 42 --all交互式回复(打开$EDITOR编辑器):
bash
himalaya message reply 42回复所有人:
bash
himalaya message reply 42 --allForward an Email
转发邮件
bash
himalaya message forward 42bash
himalaya message forward 42Write a New Email
撰写新邮件
Interactive compose (opens $EDITOR):
bash
himalaya message writeSend directly using template:
bash
cat << 'EOF' | himalaya template send
From: you@example.com
To: recipient@example.com
Subject: Test Message
Hello from Himalaya!
EOFOr with headers flag:
bash
himalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message body here"交互式撰写(打开$EDITOR编辑器):
bash
himalaya message write使用模板直接发送:
bash
cat << 'EOF' | himalaya template send
From: you@example.com
To: recipient@example.com
Subject: Test Message
Hello from Himalaya!
EOF或使用头信息参数:
bash
himalaya message write -H "To:recipient@example.com" -H "Subject:Test" "Message body here"Move/Copy Emails
移动/复制邮件
Move to folder:
bash
himalaya message move 42 "Archive"Copy to folder:
bash
himalaya message copy 42 "Important"移动到指定文件夹:
bash
himalaya message move 42 "Archive"复制到指定文件夹:
bash
himalaya message copy 42 "Important"Delete an Email
删除邮件
bash
himalaya message delete 42bash
himalaya message delete 42Manage Flags
管理标记
Add flag:
bash
himalaya flag add 42 --flag seenRemove flag:
bash
himalaya flag remove 42 --flag seen添加标记:
bash
himalaya flag add 42 --flag seen移除标记:
bash
himalaya flag remove 42 --flag seenMultiple Accounts
多账户管理
List accounts:
bash
himalaya account listUse a specific account:
bash
himalaya --account work envelope list列出所有账户:
bash
himalaya account list使用指定账户:
bash
himalaya --account work envelope listAttachments
附件处理
Save attachments from a message:
bash
himalaya attachment download 42Save to specific directory:
bash
himalaya attachment download 42 --dir ~/Downloads保存邮件中的附件:
bash
himalaya attachment download 42保存到指定目录:
bash
himalaya attachment download 42 --dir ~/DownloadsOutput Formats
输出格式
Most commands support for structured output:
--outputbash
himalaya envelope list --output json
himalaya envelope list --output plain大多数命令支持参数以生成结构化输出:
--outputbash
himalaya envelope list --output json
himalaya envelope list --output plainDebugging
调试
Enable debug logging:
bash
RUST_LOG=debug himalaya envelope listFull trace with backtrace:
bash
RUST_LOG=trace RUST_BACKTRACE=1 himalaya envelope list启用调试日志:
bash
RUST_LOG=debug himalaya envelope list带回溯的完整跟踪:
bash
RUST_LOG=trace RUST_BACKTRACE=1 himalaya envelope listTips
小贴士
- Use or
himalaya --helpfor detailed usage.himalaya <command> --help - 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 , system keyring, or a command that outputs the password.
pass
- 使用或
himalaya --help查看详细用法。himalaya <command> --help - 邮件ID是相对于当前文件夹的;切换文件夹后需重新列出邮件。
- 如需撰写带附件的富文本邮件,请使用MML语法(详见)。
references/message-composition.md - 使用、系统密钥环或可输出密码的命令来安全存储密码。
pass