1.8 KiB
1.8 KiB
title, type, tags, date
| title | type | tags | date | ||||
|---|---|---|---|---|---|---|---|
| GOG CLI 安装配置指南 | source |
|
2026-03-15 |
Source File
Summary
- 核心主题:macOS 系统通过命令行管理 Google Workspace(Gmail/Calendar/Drive/Contacts/Docs/Sheets)
- 问题域:打破 GUI 限制,实现 Google 服务的脚本化与自动化
- 方法/机制:Homebrew 安装 → OAuth 授权 → API 服务启用 → 命令行调用
- 结论/价值:gog CLI 将 Google Workspace 全部服务纳入终端,支撑日历/邮件自动化工作流
Key Claims
- gog CLI 是 macOS 专属工具,通过 Homebrew 安装,路径为 /opt/homebrew/bin/gog
- Google API 访问需满足双重条件:OAuth 用户身份认证 + Google Cloud API Enablement 均通过
- 403 accessNotConfigured 错误的根因是 Google Cloud 项目未启用对应 API,而非权限问题
- 添加测试用户是绕过 Google 第三方应用验证限制的标准方法
Key Quotes
"此应用未经 Google 验证——此应用请求访问您 Google 账号中的敏感信息" — OAuth 安全限制说明 "旧 token 不包含新权限" — 启用 API 后必须重新授权的原因
Key Concepts
- Google Workspace CLI:命令行管理 Google 全部服务
- OAuth 双层验证:OAuth 凭证 + API Enablement 双重条件
- gog CLI:macOS Google Workspace 命令行工具
Key Entities
- Google Cloud Console:OAuth 凭证创建与 API 启用管理平台
- gogcli:工具本身,Homebrew 安装的 Google Workspace CLI
Connections
- gog CLI ← 安装于 ← macOS
- gog CLI ← 依赖 ← Google Cloud Console(凭证 + API)
- gog CLI ← 支持 ← Gmail / Google Calendar / Google Drive / Google Contacts / Google Docs / Google Sheets