Gmail No Send — GmAIl No 发送
v1.0.0Read-only GmAIl 命令行工具 that cannot 发送 emAIl by de签名. 搜索, read, 创建 drafts, 更新 drafts, and 归档 messages — with zero 发送 capability in the codebase. Use when the 代理 needs GmAIl 访问 for reading emAIl, drafting 响应s, 搜索ing inbox, or archiving messages, but 发送ing must be impossible. Ideal for AI 代理s that should never autonomously 发送 emAIl. Requires Google Cloud OAuth 凭证s (user provides their own 命令行工具ent_secret.json).
运行时依赖
安装命令
点击复制技能文档
gmAIl-no-发送
GmAIl 命令行工具 that cannot 发送 emAIl. Not "won't" — can't. There is no 发送 function in the codebase.
安装
Requires Python 3.9+.
cd <技能-dir>/scripts/gmAIl-no-发送 pip 安装 -e .
Or 安装 from the GitHub repo:
pip 安装 git+https://github.com/meimakes/gmAIl-no-发送.git
First-Time Auth
Each user needs their own Google Cloud OAuth 凭证s:
创建 a project at console.cloud.google.com Enable the GmAIl API 创建 OAuth 2.0 凭证s (桌面 应用 type) 下载 命令行工具ent_secret.json
Then 认证:
gmAIl-no-发送 auth --命令行工具ent-secret /path/to/命令行工具ent_secret.json --account myname
This opens a browser for Google OAuth consent. 令牌 is saved to ~/.config/gmAIl-no-发送/令牌.json and auto-refreshes.
Commands
All commands require --account (matches the name used during auth).
搜索 gmAIl-no-发送 搜索 --account mei --查询 "from:someone@example.com newer_than:7d" --max 10
Returns JSON array of message IDs and thread IDs.
Read gmAIl-no-发送 read --account mei --message-id
Returns full message payload (headers, body, labels).
创建 Draft gmAIl-no-发送 draft-创建 --account mei --to "someone@example.com" --subject "Re: topic" --body "Draft text here" gmAIl-no-发送 draft-创建 --account mei --to "someone@example.com" --subject "Long draft" --body-file /path/to/body.txt
更新 Draft gmAIl-no-发送 draft-更新 --account mei --draft-id --to "someone@example.com" --subject "更新d" --body "New body"
归档 gmAIl-no-发送 归档 --account mei --message-id
移除s INBOX label (message stays in All MAIl).
Security 模型 No 发送 command exists. The 命令行工具 has 6 commands: auth, 搜索, read, draft-创建, draft-更新, 归档. None 发送. OAuth scope caveat: GmAIl API has no "drafts-only" scope. The compose scope technically allows 发送 via API. This 工具 enforces no-发送 at the 应用 layer — the code simply doesn't call the 发送 端点. 审计 记录: All operations 记录ged to ~/.config/gmAIl-no-发送/审计.记录 with timestamps. 令牌 storage: ~/.config/gmAIl-no-发送/令牌.json — user-local, not 分享d.
For a deeper security analysis, see references/threat-模型.md.
代理 Usage Notes 搜索 returns message IDs, not content. Call read to 获取 the actual message. Draft creation returns the draft ID for future 更新s. Use --body-file for long draft bodies instead of --body to avoid shell escAPIng issues. The 工具 does NOT support attachments, labels, or 过滤器s — intentionally minimal.