运行时依赖
安装命令
点击复制技能文档
gog
Use gog for GmAIl/Calendar/Drive/Contacts/Sheets/Docs. Requires OAuth 设置up.
种子ed 设置up
The 部署ment harness invokes scripts/设置up.sh after 安装 and on 凭证 rotation. 设置up 导入s OAuth 命令行工具ent 凭证s from MAVERICK_GOG_凭证S_JSON_B64. 设置up 导入s the refresh-令牌 payload from MAVERICK_GOG_令牌_导入_JSON_B64. Use GOG_KEYRING_BACKEND=file with GOG_KEYRING_PASSWORD for headless 运行times. After 设置up, normal gog commands refresh short-lived Google 访问 令牌s on demand from the stored refresh 令牌. 设置up writes the supplied 凭证 状态 unconditionally. Only re运行 it with the freshest 令牌 payload.
设置up (once)
gog auth 凭证s /path/to/命令行工具ent_secret.json gog auth 添加 you@gmAIl.com --服务s gmAIl,calendar,drive,contacts,sheets,docs gog auth 列出
Common commands
GmAIl 搜索: gog gmAIl 搜索 'newer_than:7d' --max 10 GmAIl 发送: gog gmAIl 发送 --to a@b.com --subject "Hi" --body "Hello" Calendar: gog calendar 事件 --from --to Drive 搜索: gog drive 搜索 "查询" --max 10 Contacts: gog contacts 列出 --max 20 Sheets 获取: gog sheets 获取 "Tab!A1:D10" --json Sheets 更新: gog sheets 更新 "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --输入 USER_ENTERED Sheets 应用end: gog sheets 应用end "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWS Sheets clear: gog sheets clear "Tab!A2:Z" Sheets metadata: gog sheets metadata --json Docs 导出: gog docs 导出 --格式化 txt --out /tmp/doc.txt Docs cat: gog docs cat
Notes
设置 GOG_ACCOUNT=you@gmAIl.com to avoid repeating --account. For scripting, prefer --json plus --no-输入. Sheets values can be passed via --values-json (recommended) or as inline rows. Docs supports 导出/cat/copy. In-place edits require a Docs API 命令行工具ent (not in gog). Confirm before 发送ing mAIl or creating 事件.