himalaya
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseHimalaya Email Workflows
Himalaya 邮件工作流
CLI email client for IMAP/Maildir/Notmuch backends.
一款支持IMAP/Maildir/Notmuch后端的CLI邮件客户端。
Command Structure
命令结构
All commands follow:
himalaya <resource> <action>| Resource | Actions |
|---|---|
| |
| |
| |
| |
| |
| |
所有命令遵循格式:
himalaya <资源> <操作>| 资源 | 操作 |
|---|---|
| |
| |
| |
| |
| |
| |
Quick Reference
快速参考
Inbox Triage
收件箱分类处理
Important: Flags must come BEFORE the query filter (if any).
fish
undefined重要提示: 标记参数必须在查询过滤器(如果有)之前。
fish
undefinedList unread/new messages (use --output json for cleaner parsing)
列出未读/新邮件(使用--output json以便更清晰地解析)
himalaya envelope list --output json 'not flag Seen'
himalaya envelope list --output json 'not flag Seen'
List all envelopes (default: INBOX)
列出所有信封(默认:收件箱)
himalaya envelope list --output json
himalaya envelope list --output json
List with specific folder and page
指定文件夹和页码列出
himalaya envelope list -f Archive -p 2
himalaya envelope list -f Archive -p 2
Read message by ID
通过ID读取邮件
himalaya message read 123
himalaya message read 123
Mark as seen
标记为已读
himalaya flag add 123 seen
himalaya flag add 123 seen
Move to folder (TARGET first, then ID)
移动邮件到文件夹(目标文件夹在前,ID在后)
himalaya message move Archive 123
undefinedhimalaya message move Archive 123
undefinedSearching (Query DSL)
搜索(查询DSL)
Himalaya uses its own query DSL, NOT IMAP SEARCH syntax:
fish
undefinedHimalaya使用自有查询DSL,而非IMAP搜索语法:
fish
undefinedFilter by date
按日期过滤
himalaya envelope list after 2025-01-01
himalaya envelope list before 2025-01-15
himalaya envelope list date 2025-01-10
himalaya envelope list after 2025-01-01
himalaya envelope list before 2025-01-15
himalaya envelope list date 2025-01-10
Filter by sender/recipient
按发件人/收件人过滤
himalaya envelope list from boss@company.com
himalaya envelope list to team@company.com
himalaya envelope list from boss@company.com
himalaya envelope list to team@company.com
Filter by content
按内容过滤
himalaya envelope list subject urgent
himalaya envelope list body "project update"
himalaya envelope list subject urgent
himalaya envelope list body "project update"
Filter by flag (use 'not flag Seen' for unread)
按标记过滤(使用'not flag Seen'筛选未读邮件)
himalaya envelope list 'not flag Seen'
himalaya envelope list flag flagged
himalaya envelope list 'not flag Seen'
himalaya envelope list flag flagged
Combine with operators
使用操作符组合条件
himalaya envelope list from boss@company.com and subject urgent
himalaya envelope list "from alice or from bob"
himalaya envelope list not flag seen
himalaya envelope list from boss@company.com and subject urgent
himalaya envelope list "from alice or from bob"
himalaya envelope list not flag seen
Sort results
对结果排序
himalaya envelope list order by date desc
himalaya envelope list subject report order by from asc
undefinedhimalaya envelope list order by date desc
himalaya envelope list subject report order by from asc
undefinedComposing
撰写邮件
fish
undefinedfish
undefinedNew message (opens $EDITOR)
新建邮件(打开$EDITOR编辑器)
himalaya message write
himalaya message write
Reply / Reply-all
回复/全部回复
himalaya message reply 123
himalaya message reply 123 --all
himalaya message reply 123
himalaya message reply 123 --all
Forward
转发邮件
himalaya message forward 456
undefinedhimalaya message forward 456
undefinedAttachments (MML Syntax)
附件(MML语法)
Attachments use MML in the message body, not command-line flags:
To: recipient@example.com
Subject: Files attached
Here is the document.
<#part filename=/path/to/file.pdf><#/part>
Inline image:
<#part disposition=inline filename=/path/to/image.png><#/part>附件需在邮件正文中使用MML语法,而非命令行参数:
To: recipient@example.com
Subject: Files attached
Here is the document.
<#part filename=/path/to/file.pdf><#/part>
Inline image:
<#part disposition=inline filename=/path/to/image.png><#/part>Organizing
邮件整理
fish
undefinedfish
undefinedList folders
列出文件夹
himalaya folder list
himalaya folder list
Move message(s) - TARGET folder comes first, then IDs
移动邮件 - 目标文件夹在前,ID在后
himalaya message move Archive 123 456
himalaya message move Archive 123 456
Copy message(s) - TARGET folder comes first, then IDs
复制邮件 - 目标文件夹在前,ID在后
himalaya message copy Backup 123
himalaya message copy Backup 123
Delete (marks as deleted)
删除邮件(标记为已删除)
himalaya message delete 123
himalaya message delete 123
Expunge (permanent delete)
彻底删除(永久删除)
himalaya folder expunge INBOX
undefinedhimalaya folder expunge INBOX
undefinedScripting
脚本编写
fish
undefinedfish
undefinedJSON output for parsing
输出JSON格式以便解析
himalaya envelope list --output json
himalaya envelope list --output json | jq '.[].id'
himalaya envelope list --output json
himalaya envelope list --output json | jq '.[].id'
Specific account
指定账户
himalaya envelope list -a work
himalaya envelope list -a work
Combine for automation
组合命令实现自动化
himalaya envelope list --output json 'not flag Seen' | jq -r '.[].id' | while read id
himalaya message read $id
end
undefinedhimalaya envelope list --output json 'not flag Seen' | jq -r '.[].id' | while read id
himalaya message read $id
end
undefinedCommon Flags
常用参数
| Flag | Description |
|---|---|
| Use specific account |
| Target folder (default: INBOX) |
| |
| Page number (starts at 1) |
| Results per page |
Note: Always use when parsing output programmatically. Plain output includes WARN log messages that interfere with parsing. Flags must come BEFORE any query filter.
--output json| 参数 | 描述 |
|---|---|
| 使用指定账户 |
| 目标文件夹(默认:收件箱) |
| |
| 页码(从1开始) |
| 每页结果数量 |
注意: 以编程方式解析输出时,请始终使用。纯文本输出包含会干扰解析的WARN日志信息。参数必须在任何查询过滤器之前。
--output jsonTemplates (Non-Interactive)
模板(非交互式)
Generate messages without opening :
$EDITORfish
undefined无需打开即可生成邮件:
$EDITORfish
undefinedGenerate template (stdout)
生成模板(输出到标准输出)
himalaya template write
himalaya template reply 123
himalaya template forward 456
himalaya template write
himalaya template reply 123
himalaya template forward 456
Pipe and send
通过管道发送邮件
echo "To: x@y.com\nSubject: Hi\n\nHello" | himalaya template send
undefinedecho "To: x@y.com\nSubject: Hi\n\nHello" | himalaya template send
undefinedCommon Mistakes
常见错误
| Wrong | Right | Why |
|---|---|---|
| | Need resource prefix |
| | Need resource prefix |
| MML | No |
| | Himalaya DSL, not IMAP |
| | No |
| | Flags must come before query |
| | Target folder comes first |
| 错误用法 | 正确用法 | 原因 |
|---|---|---|
| | 需要添加资源前缀 |
| | 需要添加资源前缀 |
| 在正文中使用MML | 不存在 |
| | 使用Himalaya DSL,而非IMAP语法 |
| | 没有 |
| | 参数必须在查询之前 |
| | 目标文件夹需放在前面 |