Boogie
jmapcli · 終端機中的JMAP
01.
v1.4.0 · macOS
原生JMAP命令列用戶端。

命令列中的JMAP。

jmapcli 直接從終端機以JMAP與Stalwart(以及任何JMAP伺服器)通訊——傳送、閱讀、搜尋、同步、移動與管理郵件。原生Swift,憑證存於macOS Keychain,無遙測。

$ brew tap jasonhollis/boogie && brew install jmapcli $ jmapcli login # 儲存於macOS Keychain $ jmapcli send --to you@example.com --subject "Hi" --body "From the CLI"
02.
— Section 2
Install
Homebrew

一行指令。已簽署。

2.1
Homebrew tap
brew tap jasonhollis/boogie && brew install jmapcli — 單一已簽署的二進位檔,無需編譯任何依賴。升級透過 brew upgrade
— macOS
Apple silicon
2.2
Keychain驗證
憑證會依JMAP身分從macOS登入Keychain中讀取。dotfiles中沒有任何內容,env vars中也沒有。
— security
find-generic
2.3
無遙測
此工具不會向任何地方回傳資料。它唯一接觸的網路就是你的JMAP伺服器。
— zero
SDKs
03.
— Section 3
Credentials
macOS Keychain

您的密碼從不寫入磁碟。

jmapcli 不在磁碟上保存任何機密。您的密碼(或 bearer token)儲存於 macOS 登入鑰匙圈;帳號設定檔 — ~/.config/jmapcli/config.json,權限 0600 — 只包含伺服器網址、使用者名稱及預設旗標。第一次在終端機使用鑰匙圈?整個流程只需三個內建的 security 指令。

1 · 儲存機密 — 並讀取驗證。 macOS 會提示您輸入值,因此機密永遠不會出現在命令列、螢幕顯示或 shell 歷史記錄中。

# store it — you’re prompted for the secret, nothing echoes $ security add-generic-password -U -s jmap-password -a you@example.com -l "Boogie JMAP password" -w # read it back at any time $ security find-generic-password -s jmap-password -a you@example.com -w # remove it $ security delete-generic-password -s jmap-password -a you@example.com
-s
service — jmapcli 查找的名稱:密碼使用 jmap-password,bearer token(例如 Fastmail)使用 jmap-token;只需設定您實際使用的那一個。
-a
account — 您的電子郵件地址(即您提供給 jmapcli 的使用者名稱)。
-l
label — 在「鑰匙圈存取」App 中顯示的名稱;-U 可直接更新現有項目。
-w
不帶值 — 提示輸入機密。這正是讓機密不出現在 ~/.zsh_history 及程序列表中的關鍵。

2 · 將 jmapcli 指向您的伺服器。 只需註冊一次帳號;機密會直接從您剛才儲存的鑰匙圈項目中取得,永遠不會出現在命令列上。

$ jmapcli login --url https://mail.example.com --username you@example.com \ --password "$(security find-generic-password -s jmap-password -a you@example.com -w)" # token auth: swap --password for --token (and store under jmap-token above) $ jmapcli list # from here on, every command reads the Keychain for you
3.1
不留痕跡於歷史記錄、日誌 — 或 AI 的上下文
機密一旦存入鑰匙圈,日常指令(listsenddraftsync)就不再攜帶密碼,因此不會被記錄於 ~/.zsh_history、程序列表或 CI 日誌中。這正是讓 jmapcli 可安全搭配終端機 AI 工具使用的原因 — AI 代理程式獲得的是 JMAP 用戶端,而非您的機密。
— zsh
CI · agents
3.2
輪換密碼或登出
更改了密碼?重新執行 security add-generic-password … -w 這行指令 — -U 會直接覆寫原有項目。若要移除帳號,jmapcli logout 可一步刪除設定項目與鑰匙圈機密(--all 可清除所有帳號)。
— rotate
logout
3.3
每台 Mac 各自獨立 — 刻意設計
登入鑰匙圈不會透過 iCloud 同步 — 這是刻意設定的界限,確保您的密碼永遠不會離開您輸入它的那台 Mac。每台 Mac 只需執行一次 security 步驟;config.json 則可存放於同步的家目錄中,因為它不含任何機密。
— per
machine
04.
— Section 4
Commands
One verb each

一切皆為子命令。

login
將JMAP伺服器的憑證儲存至Keychain
discover
從伺服器探索JMAP工作階段
accounts
列出已設定的帳號與所有可寄送身分
mailboxes
列出所有信箱
list
列出信箱中的郵件
search
依文字、主旨、寄件者、收件者或內文搜尋郵件(伺服器端)
read
顯示完整郵件內容(Markdown呈現)
send
透過 JMAP Submission 寄送郵件,可指定任一可寄送身分(--from)
reply
依 ID 回覆郵件,串接原始討論串並引用原文
forward
依 ID 轉寄郵件,並重新附上原本的附件
draft
將郵件存入 Drafts 而不寄出
move · trash · delete
移動至信箱、移至垃圾桶,或依ID永久銷毀
sync
執行差異同步並顯示變更內容
contacts
JSContact 聯絡人:列出、新增、編輯、移除、匯入別名
calendar
列出行事曆與活動、寫入活動、設定行事曆顏色
sieve
列出、取得、驗證及推送伺服器端的 Sieve 篩選規則
alias
管理收件者別名
mcp
作為Model Context Protocol伺服器執行,供AI工具使用
logout
移除已儲存的憑證
05.
— Section 5
Changelog
Every release

最新功能。

v1.4.0
Full-text search (text, subject, from, to, body); threaded reply and forward; draft — stage in Drafts without sending; multi-account: accounts and identities, and send/reply/forward as any sendable identity via --from; contacts import-aliases; faster multi-recipient sends. — 2026-06-24
v1.3.1
Calendar event write (add, edit, remove); offline-first hardening. — 2026-06-20
v1.3.0
JSContact contacts — read and write, with a lossless round-trip. — 2026-06-15
v1.2.0
Sieve filters — list, get, validate, and push server-side mail rules. — 2026-06-12
v1.1.0
Calendar — list calendars and events, set colours. — 2026-06-11
v1.0.0
Initial release — send, read, search, sync, and triage mail from the terminal, credentials in the macOS Keychain. — 2026-06-06
— Boogie 的一部分

想要完整應用程式?

jmapcli 免費
原生郵件+行事曆應用程式已上架App Store
KTP Digital Pty Ltd · ABN 85 648 755 980