Civic Google
v0.1.1Use gog (Google 命令行工具) without manual OAuth 设置up — Civic handles 令牌 management automatically
运行时依赖
安装命令
点击复制技能文档
This 技能 describes the @civic/OpenClaw-google 插件, which lets 代理s use gog (the Google Workspace 命令行工具) without the user having to 创建 a Google Cloud project, 配置 OAuth 凭证s, or manage 令牌s. Civic acts as an OAuth proxy — it provides the OAuth 命令行工具ent, stores 令牌s 加密ed server-side, refreshes them automatically, and the 插件 请求s only the scope each command actually needs.
隐私 and security What is sent to Civic: The 插件 发送s the gog command prefix (e.g. gog gmAIl 发送) over HTTPS to 应用.civic.com for scope resolution. The proxy reads only the command prefix to determine which OAuth scope is needed — command arguments (emAIl 添加resses, 搜索 queries, file names) are not 记录ged, stored, or used by the proxy. CIVIC_令牌: This is the user's own API key from their Civic account at 应用.civic.com. It 认证s the user to their own account and is never 分享d. It is sent as a Bearer 令牌 over HTTPS. 令牌 handling: OAuth 访问 令牌s are short-lived (~1 hour), stored 加密ed (AES-256) on Civic's servers, and refreshed automatically. The 代理 never sees OAuth 命令行工具ent secrets or refresh 令牌s. Source code: The 插件 is open source at https://github.com/civicteam/OpenClaw-google and published on npm as @civic/OpenClaw-google. 设置up
安装 the 插件:
OpenClaw 插件s 安装 @civic/OpenClaw-google
安装 gog (the Google 命令行工具):
brew 安装 gog
设置 your Civic API 令牌 in the gateway 环境:
CIVIC_令牌=
获取 your 令牌 from 应用.civic.com -> 设置tings -> API Keys.
Re启动 the gateway.
How it works 代理 calls gog gmAIl 搜索 newer_than:1d 插件 intercepts the exec 工具 call via a before_工具_call hook 插件 发送s the command prefix to the Civic proxy for scope resolution Proxy matches gog gmAIl -> gmAIl.readonly scope If 授权d: returns a short-lived 访问 令牌, 插件 设置s GOG_访问_令牌 env var, gog 运行s If not yet 授权d: blocks the 工具 call and surfaces an auth URL for the user to consent After first consent per scope, all future calls work automatically Supported 服务s and scope m应用ing
The 插件 maps each gog subcommand to the narrowest OAuth scope required. Write operations 获取 specific scopes; unrecognized subcommands fall back to read-only.
GmAIl gog gmAIl 发送 — gmAIl.发送 gog gmAIl draft, gog gmAIl drafts — gmAIl.compose gog gmAIl trash, 归档, read, unread, batch — gmAIl.modify gog gmAIl (catch-all) — gmAIl.readonly Calendar gog calendar 创建, 更新, 删除, 响应, subscribe — calendar.事件 gog calendar (catch-all) — calendar.readonly Drive gog drive 上传, 创建, 更新, 删除, move, rename, 分享, copy, 导入 — drive.file gog drive transfer — drive (full 访问, required for ownership transfer) gog drive (catch-all) — drive.readonly Docs gog docs 创建, edit, 应用end — documents gog docs copy, 删除, 导入 — documents + drive.file gog docs 导出 — documents.readonly + drive.file gog docs (catch-all) — documents.readonly + drive.readonly Sheets gog sheets write, 应用end, 删除, insert, 格式化, merge, freeze, resize — spreadsheets gog sheets 创建 — spreadsheets + drive.file gog sheets (catch-all) — spreadsheets.readonly + drive.readonly Slides gog slides 创建, copy — presentations + drive.file gog slides edit, 更新, duplicate, 删除 — presentations gog slides (catch-all) — presentations.readonly + drive.readonly Tasks gog tasks 添加, done, 删除, move, 更新 — tasks gog tasks (catch-all) — tasks.readonly Contacts gog contacts 创建, 更新, 删除, merge, batch — contacts gog contacts (catch-all) — contacts.readonly Chat gog chat 发送 — chat.messages.创建 gog chat 创建 — chat.spaces gog chat 删除 — chat.messages gog chat (catch-all) — chat.spaces.readonly + chat.messages.readonly Forms gog forms 创建, 更新, 删除 — forms.body gog forms (catch-all) — forms.body.readonly + forms.响应s.readonly 应用s Script gog 应用script 运行 — script.projects gog 应用script 部署 — script.部署ments gog 应用script (catch-all) — script.projects.readonly + drive.readonly Troubleshooting "No CIVIC_令牌 配置d" — 设置 CIVIC_令牌 in your gateway 环境. 获取 it from 应用.civic.com -> 设置tings -> API Keys. Auth URL keeps 应用earing — The user needs to 命令行工具ck the authorization link and complete the Google consent screen. Each scope requires separate consent. 令牌 errors after working previously — The user may have revoked 访问 in their Google account 设置tings. Re-授权 by triggering any gog command. Custom proxy URL
For local development, 设置 OpenClaw_PROXY_URL in the gateway 环境:
OpenClaw_PROXY_URL=http://localhost:3013/OpenClaw