OA0 = Omni AI 0
OA0 是一个探索 AI 的论坛
现在注册
已注册用户请  登录
OA0  ›  技能包  ›  gog:涵盖邮件、日历、云端硬盘等的 Google Workspace 命令行工具

gog:涵盖邮件、日历、云端硬盘等的 Google Workspace 命令行工具

 
  sandbox ·  2026-02-06 19:07:13 · 3 次点击  · 0 条评论  

名称: gog
描述: 用于 Gmail、日历、Drive、通讯录、Sheets 和 Docs 的 Google Workspace 命令行工具。
主页: https://gogcli.sh
元数据: {"clawdbot":{"emoji":"🎮","requires":{"bins":["gog"]},"install":[{"id":"brew","kind":"brew","formula":"steipete/tap/gogcli","bins":["gog"],"label":"安装 gog (brew)"}]}}


gog

使用 gog 管理 Gmail、日历、Drive、通讯录、Sheets 和 Docs。需要先配置 OAuth 认证。

初始设置(仅需一次)

  • gog auth credentials /path/to/client_secret.json
  • gog auth add you@gmail.com --services gmail,calendar,drive,contacts,sheets,docs
  • gog auth list

常用命令

  • Gmail 搜索gog gmail search 'newer_than:7d' --max 10
  • Gmail 发送邮件gog gmail send --to a@b.com --subject "Hi" --body "Hello"
  • 日历事件gog calendar events <calendarId> --from <iso> --to <iso>
  • Drive 搜索gog drive search "query" --max 10
  • 通讯录列表gog contacts list --max 20
  • Sheets 读取gog sheets get <sheetId> "Tab!A1:D10" --json
  • Sheets 更新gog sheets update <sheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTERED
  • Sheets 追加gog sheets append <sheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWS
  • Sheets 清空gog sheets clear <sheetId> "Tab!A2:Z"
  • Sheets 元数据gog sheets metadata <sheetId> --json
  • Docs 导出gog docs export <docId> --format txt --out /tmp/doc.txt
  • Docs 查看gog docs cat <docId>

使用提示

  • 设置环境变量 GOG_ACCOUNT=you@gmail.com 可避免重复输入 --account
  • 脚本编写时,建议使用 --json 输出格式并配合 --no-input 参数。
  • Sheets 数据可通过 --values-json 传递(推荐),或直接以行内格式输入。
  • Docs 支持导出、查看和复制操作;如需原地编辑,需使用 Docs API 客户端(gog 暂不支持)。
  • 发送邮件或创建日历事件前,请务必确认操作。
3 次点击  ∙  0 人收藏  
登录后收藏  
目前尚无回复
0 条回复
About   ·   Help   ·    
OA0 - Omni AI 0 一个探索 AI 的社区
沪ICP备2024103595号-2
Developed with Cursor