返回顶部
g

gmail-no-send只读Gmail命令行

Read-only Gmail CLI that cannot send email by design. Search, read, create drafts, update drafts, and archive messages — with zero send capability in the codebase. Use when the agent needs Gmail access for reading email, drafting responses, searching inbox, or archiving messages, but sending must be impossible. Ideal for AI agents that should never autonomously send email. Requires Google Cloud OAuth credentials (user provides their own client_secret.json).

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
110
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

gmail-no-send

gmail-no-send

一个无法发送邮件的Gmail命令行工具。不是不会——而是不能。代码库中根本没有发送功能。

安装

需要Python 3.9及以上版本。

bash
cd <技能目录>/scripts/gmail-no-send
pip install -e .

或从GitHub仓库安装:
bash
pip install git+https://github.com/meimakes/gmail-no-send.git

首次认证

每个用户需要自己的Google Cloud OAuth凭据:

  1. 1. 在 console.cloud.google.com 创建项目
  2. 启用Gmail API
  3. 创建OAuth 2.0凭据(桌面应用类型)
  4. 下载 client_secret.json

然后进行认证:
bash
gmail-no-send auth --client-secret /path/to/client_secret.json --account myname

此操作会打开浏览器进行Google OAuth授权。令牌保存至 ~/.config/gmail-no-send/token.json 并自动刷新。

命令

所有命令都需要 --account <名称> 参数(与认证时使用的名称一致)。

搜索

bash gmail-no-send search --account mei --query from:someone@example.com newer_than:7d --max 10

返回消息ID和线程ID的JSON数组。

读取

bash gmail-no-send read --account mei --message-id

返回完整消息载荷(标头、正文、标签)。

创建草稿

bash gmail-no-send draft-create --account mei --to someone@example.com --subject Re: topic --body 此处为草稿文本 gmail-no-send draft-create --account mei --to someone@example.com --subject 长草稿 --body-file /path/to/body.txt

更新草稿

bash gmail-no-send draft-update --account mei --draft-id --to someone@example.com --subject 已更新 --body 新正文

归档

bash gmail-no-send archive --account mei --message-id

移除收件箱标签(邮件仍保留在所有邮件中)。

安全模型

  • - 不存在发送命令。 该CLI有6个命令:auth、search、read、draft-create、draft-update、archive。均无发送功能。
  • OAuth作用域注意事项: Gmail API没有仅草稿作用域。compose作用域理论上允许通过API发送。本工具在应用层强制实现无发送——代码根本不调用发送端点。
  • 审计日志: 所有操作均记录至 ~/.config/gmail-no-send/audit.log,包含时间戳。
  • 令牌存储: ~/.config/gmail-no-send/token.json — 用户本地存储,不共享。

如需更深入的安全分析,请参阅 references/threat-model.md

代理使用说明

  • - 搜索返回消息ID,而非内容。调用 read 获取实际消息。
  • 创建草稿会返回草稿ID,用于后续更新。
  • 长草稿正文请使用 --body-file 而非 --body,以避免shell转义问题。
  • 本工具不支持附件、标签或过滤器——有意保持最小化功能。

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 gmail-no-send-1776051302 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 gmail-no-send-1776051302 技能

通过命令行安装

skillhub install gmail-no-send-1776051302

下载

⬇ 下载 gmail-no-send v1.0.0(免费)

文件大小: 7.27 KB | 发布时间: 2026-4-14 09:41

v1.0.0 最新 2026-4-14 09:41
- Initial public release of gmail-no-send: a read-only Gmail CLI with no capability to send emails.
- Supports searching, reading messages, creating/updating drafts, and archiving; sending is fundamentally impossible by design.
- Requires user-provided Google Cloud OAuth credentials; tokens and all operations are securely logged and stored locally.
- Purpose-built for agents that need Gmail access without risk of sending messages.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部