Files
nexus/wiki/entities/gog-CLI.md
2026-04-21 16:03:27 +08:00

1.7 KiB
Raw Blame History

title, type, tags
title type tags
gog CLI entity
cli
google-workspace
oauth
automation

Aliases

  • gogcli
  • gog CLI

Definition

gog CLI 是由 steipete 开发并维护的 macOS 命令行工具,通过 Google OAuth API 实现对 Google WorkspaceGmail、Google Calendar、Google Drive、Google Contacts、Google Docs、Google Sheets的命令行管理。

Installation

brew install steipete/tap/gogcli
# 验证安装
which gog
# 输出: /opt/homebrew/bin/gog

Core Services Supported

服务 主要命令
Gmail gog gmail search, gog gmail send
Calendar gog calendar events, gog calendar create
Drive gog drive search
Contacts gog contacts list
Docs gog docs export, gog docs cat
Sheets gog sheets get, gog sheets update

Authentication

# 指定凭证
gog auth credentials /path/to/credentials.json
# 添加账号
gog auth add ishenwei@gmail.com --services gmail,calendar,drive,contacts,docs,sheets
# 查看授权
gog auth list
# 撤销授权
gog auth revoke

Configuration

  • 凭证路径:/Users/weishen/Library/Application Support/gogcli/credentials.json
  • 默认账号:export GOG_ACCOUNT=ishenwei@gmail.com

References