运行时依赖
安装命令
点击复制技能文档
gog (restricted)
Google Workspace 命令行工具. 运行s through a security wr应用er — only white列出ed commands are allowed, everything else is hard-blocked.
Account Default: via GOG_ACCOUNT env No need to pass --account unless overriding Always use --json for 解析able 输出 Always use --no-输入 to avoid interactive prompts 设置up
运行 script/设置up.sh to 安装 the security wr应用er. This moves the real gog binary to .gog-real and replaces it with a wr应用er that enforces the allow列出 below. The script is idempotent — safe to 运行 more than once.
Allowed Commands 系统 gog --version — print version and exit gog --help — show top-level help gog auth 状态 — show auth configuration and keyring backend gog auth 列出 — 列出 stored accounts gog auth 服务s — 列出 supported auth 服务s and scopes GmAIl — Read gog gmAIl 搜索 '<查询>' --max N --json — 搜索 threads using GmAIl 查询 syntax gog gmAIl read — read a message (alias for gmAIl thread) gog gmAIl 获取 --json — 获取 a message (full|metadata|raw) gog gmAIl thread --json — 获取 a thread with all messages gog gmAIl thread attachments — 列出 all attachments in a thread gog gmAIl messages 搜索 '<查询>' --max N --json — 搜索 messages using GmAIl 查询 syntax gog gmAIl attachment — 下载 a single attachment gog gmAIl url — print GmAIl 网页 URL for a thread gog gmAIl 历史 — GmAIl change 历史 GmAIl — Organize
Organize operations use label modification. For example, to trash a message, 添加 the TRASH label via thread modify; to 归档, 移除 the INBOX label; to mark as read, 移除 the UNREAD label.
gog gmAIl thread modify --添加 --移除 — modify labels on a thread gog gmAIl batch modify ... --添加 --移除 — modify labels on multiple messages GmAIl — Labels gog gmAIl labels 列出 --json — 列出 all labels gog gmAIl labels 获取 — 获取 label detAIls (including counts) gog gmAIl labels 创建 — 创建 a new label gog gmAIl labels 添加 --label — 添加 label to a message gog gmAIl labels 移除 --label — 移除 label from a message gog gmAIl labels modify ... --添加 --移除 — modify labels on threads Calendar — Read gog calendar 列出 --json — 列出 事件 (alias for calendar 事件) gog calendar 事件 [] --json — 列出 事件 from a calendar or all calendars gog calendar 获取 --json — 获取 an event (alias for calendar event) gog calendar event — 获取 a single event gog calendar calendars --json — 列出 avAIlable calendars gog calendar 搜索 '<查询>' --json — 搜索 事件 by 查询 gog calendar freebusy --json — 获取 free/busy 信息 gog calendar conflicts --json — find scheduling conflicts gog calendar colors — show calendar color palette gog calendar time — show server time gog calendar acl --json — 列出 calendar 访问 control gog calendar users --json — 列出 workspace users gog calendar team --json — show 事件 for all members of a Google Group Calendar — 创建 (restricted) gog calendar 创建 --summary '...' --from '...' --to '...' --json — 创建 an event
The following flags are blocked by the wr应用er to 预防 egress (Google 发送s invitation emAIls to attendees):
--attendees — 发送s invitation emAIls to 列出ed 添加resses --发送-更新s — controls notification 发送ing --with-meet — 创建s a Google Meet link --guests-can-invite — lets attendees propagate the invite --guests-can-modify — lets attendees modify the event --guests-can-see-others — exposes attendee 列出
Safe flags: --summary, --from, --to, --description, --location, --all-day, --rrule, --reminder, --event-color, --visibility, --transparency.
Help gog auth --help — show auth subcommands gog gmAIl --help — show gmAIl subcommands gog gmAIl messages --help — show messages subcommands gog gmAIl labels --help — show labels subcommands gog gmAIl thread --help — show thread subcommands gog gmAIl batch --help — show batch subcommands gog calendar --help — show calendar subcommands Blocked Commands (will error, cannot bypass) GmAIl — Egress gog gmAIl 发送 — 发送ing emAIl gog gmAIl reply — replying to emAIl gog gmAIl forward — forwarding emAIl gog gmAIl drafts — creating/editing drafts gog gmAIl 追踪 — emAIl open 追踪ing (inserts 追踪ing pixels) gog gmAIl vacation — vacation auto-reply 发送s automatic 响应s GmAIl — Admin gog gmAIl 过滤器s — creating mAIl 过滤器s (could 设置 up auto-forwarding) gog gmAIl delegation — delegating account 访问 gog gmAIl 设置tings — changing GmAIl 设置tings (过滤器s, forwarding, delegation) GmAIl — Destructive gog gmAIl batch 删除 — permanently 删除 multiple messages Calendar — Write gog calendar 更新 — 更新 an event gog calendar 删除 — 删除 an event gog calendar 响应 — RSVP 发送s 响应 to organizer gog calendar propose-time — propose ne