Auto-sync: 2026-04-21 17:12

This commit is contained in:
2026-04-21 17:12:45 +08:00
parent 914c8f6925
commit 0fe7ba237f
1888 changed files with 220 additions and 68174 deletions

View File

@@ -1,64 +0,0 @@
---
title: "gog CLI"
type: entity
tags: [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
```bash
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
```bash
# 指定凭证
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`
## Related Concepts
- [[OAuth]]:认证机制
- [[Google-Cloud-Console]]:凭证创建
- [[测试用户]]:绕过未验证应用限制
- [[API-Enablement]]Google API 启用
- [[Gmail-API]]Gmail 接口
- [[Calendar-API]]:日历接口
- [[Drive-API]]:云端硬盘接口
## Related Entities
- [[steipete-tap/gogcli]]:官方 Homebrew Tap
- [[Google]]:服务提供方
- [[Homebrew]]:安装工具
## References
- 官网https://gogcli.sh
- GitHubhttps://github.com/steipete/gogcli