LM

leeguooooo/mail-use

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

47 stars 8 forks 品質 84 トレンド 27MIT

AIエージェントのメール — CLI または MCP から Gmail / QQ / 163 / IMAP を読み、検索、送信、トリアージする ※家族向け.

概要

Gmail、QQ、163、Outlook、および任意のIMAP/SMTPボックス上の1つのCLI - すべてのコマンドは、JSONを話す、すべての破壊的な1は、--confirmを通過するまで乾燥実行されます。 *-useファミリーの一部 — それぞれがエージェントハンドを1つの現実に与える小さなツール。 - すべての応答は成功を運びます: boolean、および失敗は固定セット(auth failed、resource not found、imap error、...)からのerror codeを運びます。 docs/CLI JSON CONTRACT.md. - キャッシュは、 cache、cache age seconds、cache stale からレポートを読み、 "nothing is syncing" を意味するのに十分なスナップショットは、ライブフェッチのお気に入りで拒否されます。 空の受信トレイは無声で「到着しない」です。 - 削除 / マーク / 移動 / ドライランプレビューを返送する - 1アカウントとフォルダごとにグループ化し、サンプルの対象で - --confirm まで何も変更しません。 --all-folders は Sent/Drafts/Junk/Trash を要求しない限りスキップします.

概要(AI 翻訳)

※メールは、AIエージェントが実際に操作できるものとして動作します。** Gmail、QQ、 163、Outlook および IMAP/SMTP ボックス — すべてのコマンドは、JSON をすべての破壊的に話します --confirm を渡すまでは、ドライランです。

[*-useの部分 - それぞれのエージェントを与える小さなツール 1つの本物に手を加える。

##IMAPスニペットではない理由

  • 安定したJSON契約、スクレイピングされたテキストではありません。 あらゆる応答は運びます [success: boolean, 固定セットから[error_code]を強制終了 ([auth_failed]), [folder_not_found], [[imap_error], …). ドキュメント [docs/CLI_JSON_CONTRACT.md].
  • 間違っているかもしれないとき、それはあなたに伝えます。 キャッシュバックレポート from_cache, [cache_age_secondsとcache_stale]、および "nothing を意味するのに十分なスナップショット 同期」はライブフェッチのお気に入りで拒否されます。 空の受信トレイは無声です 「到着しない」 -** delete / [mark] / [move] / [[send]) ドライランプレビュー — 1 つのアカウントとフォルダーごとにグループ化し、サンプルの件名と変更 [--confirmまでは何もありません。 [--all-folders]]は、Sent/Drafts/Junk/Trashを尋ねない限りスキップします。
  • トークンの予算のためのBuilt。 --format compactは10に各電子メールをプロジェクト

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。

README

以下は原文 README の抜粋です。原文を見る。

mail-use

Email, as something an AI agent can actually operate. One CLI over Gmail, QQ, 163, Outlook and any IMAP/SMTP box — every command speaks JSON, every destructive one is dry-run until you pass --confirm.

mail-use code --json          # the newest verification code, one live pass
mail-use email recent --format compact --json
mail-use email delete --from [email protected] --confirm --json

Part of the *-use family — small tools that each give an agent hands on one real thing.

Why this and not an IMAP snippet

  • A stable JSON contract, not scraped text. Every response carries success: boolean, and failures carry error_code from a fixed set (auth_failed, folder_not_found, imap_error, …). Documented in docs/CLI_JSON_CONTRACT.md.
  • It tells you when it might be wrong. Cached reads report from_cache, cache_age_seconds and cache_stale, and a snapshot old enough to mean “nothing is syncing” is refused in favour of a live fetch. An empty inbox is never a silent “nothing arrived”.
  • Destructive by consent only. delete / mark / move / send return a dry-run preview — grouped per account and folder, with sample subjects — and change nothing until --confirm. --all-folders skips Sent/Drafts/Junk/Trash unless asked.
  • Built for token budgets. --format compact projects each email to the ten fields worth scanning (~30% smaller than the full shape), --with-preview folds a body snippet into the list call, and batch show reuses one IMAP connection.
  • Fast enough to call in a loop. A persistent daemon pools IMAP connections and syncs to local SQLite in the background: five sequential email list calls go from 25s to 0.83s. See the table below.
  • MCP too. mail-use mcp config --json prints a paste-ready entry; the server exposes 16 tools with the same dry-run defaults.

Renamed from Mailbox to mail-use. The command is now mail-use; mailbox still works as an alias, and your config in ~/.config/mailbox is untouched.

Supported providers

163 / 126 · QQ · Gmail · Outlook / Hotmail · any custom IMAP+SMTP server.

Search behaves differently per provider and the CLI says so: Gmail searches bodies server-side via X-GM-RAW, while QQ/163/Outlook have broken IMAP TEXT search, so --query falls back to matching subject + sender only. Use --from / --subject there for predictable results.

Install

One line, no npm, no Node

curl -fsSL https://raw.githubusercontent.com/leeguooooo/mail-use/main/install.sh | sh
mail-use --help

Downloads the prebuilt binary for your platform (macOS arm64/x64, Linux x64/arm64) from the latest GitHub Release, verifies its checksum, and installs to ~/.local/bin. Pin a version with MAIL_USE_VERSION=v2.11.2, or

GitHub で README 全文を見る

インストール

npx skills update mail-use` for you to run).
MCP 初心者?mcpskill.org のガイドから始めましょう →