Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGoogle Personal Assistant
Google个人助手
A comprehensive skill for managing Google Workspace services via the CLI. Designed for Personal Assistant and Chief of Staff workflows with emphasis on efficient searching, filtering, and querying.
gog这是一款通过 CLI管理Google Workspace服务的综合技能,专为个人助理、行政总监类工作流设计,重点优化了搜索、筛选和查询效率。
gogWhen to Use This Skill
何时使用该技能
- Triaging and processing email inbox
- Scheduling meetings and managing calendar events
- Finding availability across multiple calendars
- Searching and organizing Google Drive documents
- Managing task lists and to-dos
- Looking up and managing contacts
- Reading/writing data in Google Sheets
- Exporting Docs, Slides, or Sheets
- Setting focus time or out-of-office status
- 分类处理收件箱邮件
- 安排会议、管理日历事件
- 查询多个日历的可用时间
- 搜索和整理Google Drive文档
- 管理任务清单和待办事项
- 查询和管理联系人
- 读写Google Sheets中的数据
- 导出Docs、Slides或Sheets文件
- 设置专注时间或外出状态
Prerequisites
前置条件
Ensure is installed and authenticated:
gogbash
undefined确保已安装并完成身份验证:
gogbash
undefinedCheck installation
检查安装情况
gog version
gog version
Check authentication status
检查认证状态
gog auth status
gog auth status
Verify account access
验证账户访问权限
gog people me
gog people me
Add a new account if needed
按需添加新账户
gog auth add your@email.com --services=all
undefinedgog auth add your@email.com --services=all
undefinedQuick Start
快速开始
Gmail
Gmail
bash
undefinedbash
undefinedSearch unread emails
搜索未读邮件
gog gmail search "is:unread" --max=20
gog gmail search "is:unread" --max=20
Search from specific sender
搜索指定发件人的邮件
gog gmail search "from:boss@company.com newer_than:7d"
gog gmail search "from:boss@company.com newer_than:7d"
Send an email
发送邮件
gog gmail send --to="recipient@example.com" --subject="Subject" --body="Message body"
gog gmail send --to="recipient@example.com" --subject="Subject" --body="Message body"
Reply to a thread
回复会话
gog gmail send --reply-to-message-id=MESSAGE_ID --body="Reply text"
gog gmail send --reply-to-message-id=MESSAGE_ID --body="Reply text"
Get message details
获取邮件详情
gog gmail get MESSAGE_ID
undefinedgog gmail get MESSAGE_ID
undefinedCalendar
Calendar
bash
undefinedbash
undefinedView today's events
查看今日事件
gog calendar events --today
gog calendar events --today
View this week
查看本周事件
gog calendar events --week
gog calendar events --week
Create an event with Google Meet
创建带Google Meet的事件
gog calendar create primary
--summary="Team Sync"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@example.com,person2@example.com"
--with-meet
--summary="Team Sync"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@example.com,person2@example.com"
--with-meet
gog calendar create primary
--summary="Team Sync"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@example.com,person2@example.com"
--with-meet
--summary="Team Sync"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@example.com,person2@example.com"
--with-meet
Check availability
查询可用时间
gog calendar freebusy "person1@example.com,person2@example.com"
--from="2026-01-15T09:00:00Z" --to="2026-01-15T17:00:00Z"
--from="2026-01-15T09:00:00Z" --to="2026-01-15T17:00:00Z"
gog calendar freebusy "person1@example.com,person2@example.com"
--from="2026-01-15T09:00:00Z" --to="2026-01-15T17:00:00Z"
--from="2026-01-15T09:00:00Z" --to="2026-01-15T17:00:00Z"
Find scheduling conflicts
查找排期冲突
gog calendar conflicts --week
undefinedgog calendar conflicts --week
undefinedDrive
Drive
bash
undefinedbash
undefinedList files in root
列出根目录下的文件
gog drive ls
gog drive ls
Search for documents
搜索文档
gog drive search "quarterly report"
gog drive search "quarterly report"
Download a file
下载文件
gog drive download FILE_ID
gog drive download FILE_ID
Upload a file
上传文件
gog drive upload /path/to/file.pdf --parent=FOLDER_ID
gog drive upload /path/to/file.pdf --parent=FOLDER_ID
Get shareable URL
获取可分享链接
gog drive url FILE_ID
undefinedgog drive url FILE_ID
undefinedTasks
Tasks
bash
undefinedbash
undefinedList task lists
列出任务清单
gog tasks lists list
gog tasks lists list
View tasks in default list
查看默认清单中的任务
gog tasks list @default
gog tasks list @default
Add a task
添加任务
gog tasks add @default --title="Review report" --due="2026-01-15"
gog tasks add @default --title="Review report" --due="2026-01-15"
Mark task complete
标记任务完成
gog tasks done @default TASK_ID
undefinedgog tasks done @default TASK_ID
undefinedSheets
Sheets
bash
undefinedbash
undefinedRead a range
读取指定范围的数据
gog sheets get SPREADSHEET_ID "Sheet1!A1:D10"
gog sheets get SPREADSHEET_ID "Sheet1!A1:D10"
Update values
更新数据
gog sheets update SPREADSHEET_ID "Sheet1!A1" "Value1" "Value2"
gog sheets update SPREADSHEET_ID "Sheet1!A1" "Value1" "Value2"
Append a row
追加一行数据
gog sheets append SPREADSHEET_ID "Sheet1!A:D" "Col1" "Col2" "Col3" "Col4"
undefinedgog sheets append SPREADSHEET_ID "Sheet1!A:D" "Col1" "Col2" "Col3" "Col4"
undefinedGmail Search Syntax
Gmail搜索语法
Gmail search is powerful. Here are the essential operators:
Gmail搜索功能非常强大,以下是核心运算符:
Sender & Recipient
发件人和收件人
| Operator | Example | Description |
|---|---|---|
| | Emails from sender |
| | Emails sent to recipient |
| | CC'd recipient |
| | BCC'd recipient |
| Operator | Example | 说明 |
|---|---|---|
| | 指定发件人的邮件 |
| | 发送给指定收件人的邮件 |
| | 抄送指定收件人的邮件 |
| | 密送指定收件人的邮件 |
Status & Labels
状态和标签
| Operator | Example | Description |
|---|---|---|
| | Unread messages |
| | Read messages |
| | Starred messages |
| | Marked important |
| | Snoozed messages |
| | Has specific label |
| | In inbox |
| | In sent folder |
| | In drafts |
| | In trash |
| | In spam |
| | All mail including spam/trash |
| Operator | Example | 说明 |
|---|---|---|
| | 未读消息 |
| | 已读消息 |
| | 星标消息 |
| | 标记为重要的消息 |
| | 已延后的消息 |
| | 带有指定标签的消息 |
| | 收件箱内的消息 |
| | 已发送文件夹内的消息 |
| | 草稿箱内的消息 |
| | 垃圾箱内的消息 |
| | 垃圾邮件箱内的消息 |
| | 所有邮件,含垃圾邮件和垃圾箱内容 |
Content & Subject
内容和主题
| Operator | Example | Description |
|---|---|---|
| | Subject contains word |
| | Exact phrase match |
| | Has any attachment |
| | Attachment filename/type |
| | Specific filename |
| Operator | Example | 说明 |
|---|---|---|
| | 主题包含指定关键词 |
| | 精确匹配短语 |
| | 包含任意附件 |
| | 附件文件名/类型匹配 |
| | 匹配特定文件名 |
Date & Time
日期和时间
| Operator | Example | Description |
|---|---|---|
| | Within last N days |
| | Older than N years |
| | After specific date |
| | Before specific date |
Units for newer_than/older_than: (day), (month), (year)
dmy| Operator | Example | 说明 |
|---|---|---|
| | 近N天内的邮件 |
| | 早于N年的邮件 |
| | 指定日期之后的邮件 |
| | 指定日期之前的邮件 |
newer_than/older_than的单位: (天), (月), (年)
dmySize
大小
| Operator | Example | Description |
|---|---|---|
| | Larger than size |
| | Smaller than size |
Units: (KB), (MB)
KM| Operator | Example | 说明 |
|---|---|---|
| | 大于指定大小 |
| | 小于指定大小 |
单位: (KB), (MB)
KMCategories
分类
| Operator | Example | Description |
|---|---|---|
| | Primary inbox |
| | Social category |
| | Promotions |
| | Updates |
| | Forums |
| Operator | Example | 说明 |
|---|---|---|
| | 主收件箱 |
| | 社交分类 |
| | 推广内容 |
| | 更新通知 |
| | 论坛消息 |
Boolean Operators
布尔运算符
| Operator | Example | Description |
|---|---|---|
| | Both conditions |
| | Either condition |
| | Exclude condition |
| | Grouping |
| | OR shorthand |
| Operator | Example | 说明 |
|---|---|---|
| | 同时满足两个条件 |
| | 满足任意一个条件 |
| | 排除指定条件 |
| | 条件分组 |
| | OR的简写形式 |
Example Queries
查询示例
bash
undefinedbash
undefinedUnread from VIPs this week
本周内来自重要人物的未读邮件
gog gmail search "is:unread from:(boss@company.com OR ceo@company.com) newer_than:7d"
gog gmail search "is:unread from:(boss@company.com OR ceo@company.com) newer_than:7d"
Large attachments
带大附件的邮件
gog gmail search "has:attachment larger:10M"
gog gmail search "has:attachment larger:10M"
Urgent subjects excluding promotions
排除推广内容的紧急主题未读邮件
gog gmail search "subject:(urgent OR asap OR EOD) -category:promotions is:unread"
gog gmail search "subject:(urgent OR asap OR EOD) -category:promotions is:unread"
Contracts from legal team
法务团队发送的带PDF附件的合同邮件
gog gmail search "from:legal@company.com subject:contract has:attachment filename:pdf"
gog gmail search "from:legal@company.com subject:contract has:attachment filename:pdf"
All messages in a thread (use thread ID from search results)
某个会话的所有消息(使用搜索结果中的thread ID)
gog gmail thread get THREAD_ID
See [references/gmail-search-syntax.md](references/gmail-search-syntax.md) for complete operator reference.gog gmail thread get THREAD_ID
完整运算符参考请查看 [references/gmail-search-syntax.md](references/gmail-search-syntax.md)。Drive Search Syntax
Drive搜索语法
Drive search uses a query language for precise file finding:
Drive搜索使用查询语言实现精准文件查找:
Basic Operators
基础运算符
| Operator | Example | Description |
|---|---|---|
| | Filename contains |
| | Content search |
| | File type |
| Operator | Example | 说明 |
|---|---|---|
| | 文件名包含指定内容 |
| | 内容包含指定文本 |
| | 指定文件类型 |
Date Filters
日期筛选
| Operator | Example | Description |
|---|---|---|
| | Modified after |
| | Modified before |
| | Created after |
| | Viewed after |
| Operator | Example | 说明 |
|---|---|---|
| | 指定时间后修改 |
| | 指定时间前修改 |
| | 指定时间后创建 |
| | 指定时间后查看过 |
Ownership & Sharing
所有权和共享
| Operator | Example | Description |
|---|---|---|
| | Owned by user |
| | User can edit |
| | User can view |
| | Shared with you |
| Operator | Example | 说明 |
|---|---|---|
| | 归属指定用户所有 |
| | 指定用户可编辑 |
| | 指定用户可查看 |
| | 共享给你的文件 |
Properties
属性
| Operator | Example | Description |
|---|---|---|
| | Starred files |
| | Not in trash |
| | In specific folder |
| Operator | Example | 说明 |
|---|---|---|
| | 星标文件 |
| | 不在垃圾箱内 |
| | 在指定文件夹内 |
Common MIME Types
常用MIME类型
| Type | MIME Type |
|---|---|
| Google Doc | |
| Google Sheet | |
| Google Slides | |
| Google Form | |
| Folder | |
| |
| Word | |
| Excel | |
| 类型 | MIME Type |
|---|---|
| Google Doc | |
| Google Sheet | |
| Google Slides | |
| Google Form | |
| 文件夹 | |
| |
| Word | |
| Excel | |
Boolean Operators
布尔运算符
- - Both conditions must match
and - - Either condition matches
or - - Negate condition
not
- - 同时满足两个条件
and - - 满足任意一个条件
or - - 否定条件
not
Example Queries
查询示例
bash
undefinedbash
undefinedRecent docs mentioning Q4
2026年以来提及Q4的近期文档
gog drive search "fullText contains 'Q4' and modifiedTime > '2026-01-01'"
gog drive search "fullText contains 'Q4' and modifiedTime > '2026-01-01'"
All spreadsheets shared with me
共享给我的所有电子表格
gog drive search "sharedWithMe and mimeType = 'application/vnd.google-apps.spreadsheet'"
gog drive search "sharedWithMe and mimeType = 'application/vnd.google-apps.spreadsheet'"
PDFs I own
我所有的PDF文件
gog drive search "'me' in owners and mimeType = 'application/pdf'"
gog drive search "'me' in owners and mimeType = 'application/pdf'"
Files modified this week
本周修改的文件
gog drive search "modifiedTime > '2026-01-03'"
gog drive search "modifiedTime > '2026-01-03'"
Documents in specific folder
指定文件夹内的文档
gog drive ls --parent=FOLDER_ID
gog drive ls --parent=FOLDER_ID
Starred presentations
星标演示文稿
gog drive search "starred and mimeType = 'application/vnd.google-apps.presentation'"
See [references/drive-search-syntax.md](references/drive-search-syntax.md) for complete query reference.gog drive search "starred and mimeType = 'application/vnd.google-apps.presentation'"
完整查询参考请查看 [references/drive-search-syntax.md](references/drive-search-syntax.md)。PA/CoS Workflows
PA/CoS 工作流
Morning Inbox Triage
晨间收件箱分类
bash
undefinedbash
undefined1. Check unread counts by label
1. 按标签查看未读计数
gog gmail labels list --json | jq '.[] | select(.messagesUnread > 0) | {name, unread: .messagesUnread}'
gog gmail labels list --json | jq '.[] | select(.messagesUnread > 0) | {name, unread: .messagesUnread}'
2. Review unread from priority senders
2. 查看优先级发件人的未读邮件
gog gmail search "is:unread from:(boss@company.com OR vip@client.com)" --max=20
gog gmail search "is:unread from:(boss@company.com OR vip@client.com)" --max=20
3. Check for urgent subjects
3. 查看紧急主题的邮件
gog gmail search "is:unread subject:(urgent OR asap OR EOD OR "action required")" --max=10
gog gmail search "is:unread subject:(urgent OR asap OR EOD OR "action required")" --max=10
4. Review threads needing response (excludes noise)
4. 查看需要回复的会话(排除噪音内容)
gog gmail search "is:unread in:inbox -category:updates -category:promotions -category:social" --max=30
gog gmail search "is:unread in:inbox -category:updates -category:promotions -category:social" --max=30
5. Check for emails with attachments requiring action
5. 查看带附件需要处理的未读邮件
gog gmail search "is:unread has:attachment newer_than:2d" --max=15
undefinedgog gmail search "is:unread has:attachment newer_than:2d" --max=15
undefinedSchedule a Meeting
安排会议
bash
undefinedbash
undefined1. Find availability for attendees
1. 查询参会人可用时间
gog calendar freebusy "person1@company.com,person2@company.com"
--from="2026-01-15T09:00:00-08:00"
--to="2026-01-15T17:00:00-08:00"
--from="2026-01-15T09:00:00-08:00"
--to="2026-01-15T17:00:00-08:00"
gog calendar freebusy "person1@company.com,person2@company.com"
--from="2026-01-15T09:00:00-08:00"
--to="2026-01-15T17:00:00-08:00"
--from="2026-01-15T09:00:00-08:00"
--to="2026-01-15T17:00:00-08:00"
2. Check your own conflicts
2. 检查自己的排期冲突
gog calendar conflicts --days=7
gog calendar conflicts --days=7
3. Create the meeting
3. 创建会议
gog calendar create primary
--summary="Project Kickoff"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@company.com,person2@company.com"
--description="Agenda:\n1. Project overview\n2. Timeline review\n3. Action items"
--location="Conference Room A"
--with-meet
--reminder="popup:15m"
--summary="Project Kickoff"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@company.com,person2@company.com"
--description="Agenda:\n1. Project overview\n2. Timeline review\n3. Action items"
--location="Conference Room A"
--with-meet
--reminder="popup:15m"
gog calendar create primary
--summary="Project Kickoff"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@company.com,person2@company.com"
--description="Agenda:\n1. Project overview\n2. Timeline review\n3. Action items"
--location="Conference Room A"
--with-meet
--reminder="popup:15m"
--summary="Project Kickoff"
--from="2026-01-15T14:00:00-08:00"
--to="2026-01-15T15:00:00-08:00"
--attendees="person1@company.com,person2@company.com"
--description="Agenda:\n1. Project overview\n2. Timeline review\n3. Action items"
--location="Conference Room A"
--with-meet
--reminder="popup:15m"
4. Send follow-up email with details
4. 发送会议详情通知邮件
gog gmail send
--to="person1@company.com,person2@company.com"
--subject="Meeting Scheduled: Project Kickoff - Jan 15 at 2pm"
--body="Hi team,
--to="person1@company.com,person2@company.com"
--subject="Meeting Scheduled: Project Kickoff - Jan 15 at 2pm"
--body="Hi team,
I've scheduled our project kickoff meeting for Wednesday, January 15th at 2:00 PM.
Location: Conference Room A (Google Meet link in calendar invite)
Agenda:
- Project overview
- Timeline review
- Action items
Please let me know if you have any conflicts.
Best regards"
undefinedgog gmail send
--to="person1@company.com,person2@company.com"
--subject="Meeting Scheduled: Project Kickoff - Jan 15 at 2pm"
--body="Hi team,
--to="person1@company.com,person2@company.com"
--subject="Meeting Scheduled: Project Kickoff - Jan 15 at 2pm"
--body="Hi team,
I've scheduled our project kickoff meeting for Wednesday, January 15th at 2:00 PM.
Location: Conference Room A (Google Meet link in calendar invite)
Agenda:
- Project overview
- Timeline review
- Action items
Please let me know if you have any conflicts.
Best regards"
undefinedWeekly Calendar Prep
每周日历准备
bash
undefinedbash
undefined1. View the week ahead
1. 查看下周安排
gog calendar events --week
gog calendar events --week
2. Check all calendars for the week
2. 查看所有日历的本周安排
gog calendar events --week --all
gog calendar events --week --all
3. Find and resolve conflicts
3. 查找并解决排期冲突
gog calendar conflicts --week
gog calendar conflicts --week
4. Check team availability (for group)
4. 查看团队可用时间(针对群组)
gog calendar team engineering@company.com --week
gog calendar team engineering@company.com --week
5. Block focus time
5. 预留专注时间
gog calendar focus-time
--from="2026-01-16T09:00:00-08:00"
--to="2026-01-16T12:00:00-08:00"
--from="2026-01-16T09:00:00-08:00"
--to="2026-01-16T12:00:00-08:00"
gog calendar focus-time
--from="2026-01-16T09:00:00-08:00"
--to="2026-01-16T12:00:00-08:00"
--from="2026-01-16T09:00:00-08:00"
--to="2026-01-16T12:00:00-08:00"
6. Set out of office (if needed)
6. 设置外出状态(按需)
gog calendar out-of-office
--from="2026-01-20"
--to="2026-01-21"
--summary="Out of office - personal day"
--from="2026-01-20"
--to="2026-01-21"
--summary="Out of office - personal day"
gog calendar out-of-office
--from="2026-01-20"
--to="2026-01-21"
--summary="Out of office - personal day"
--from="2026-01-20"
--to="2026-01-21"
--summary="Out of office - personal day"
7. Set working location
7. 设置工作地点
gog calendar working-location
--from="2026-01-17"
--to="2026-01-17"
--type="home"
--from="2026-01-17"
--to="2026-01-17"
--type="home"
undefinedgog calendar working-location
--from="2026-01-17"
--to="2026-01-17"
--type="home"
--from="2026-01-17"
--to="2026-01-17"
--type="home"
undefinedDocument Search & Organization
文档搜索与整理
bash
undefinedbash
undefinedFind all docs from a project
查找项目相关的所有文档
gog drive search "fullText contains 'Project Alpha'"
gog drive search "fullText contains 'Project Alpha'"
List recent docs you created
列出你创建的近期文档
gog drive search "'me' in owners and modifiedTime > '2026-01-01'" --max=50
gog drive search "'me' in owners and modifiedTime > '2026-01-01'" --max=50
Find docs shared by specific person
查找指定人员共享的文档
gog drive search "'colleague@company.com' in writers"
gog drive search "'colleague@company.com' in writers"
Find presentation decks
查找演示文稿
gog drive search "mimeType = 'application/vnd.google-apps.presentation' and modifiedTime > '2025-10-01'"
gog drive search "mimeType = 'application/vnd.google-apps.presentation' and modifiedTime > '2025-10-01'"
Download a doc as PDF
导出文档为PDF
gog docs export DOC_ID --format=pdf --output="./report.pdf"
gog docs export DOC_ID --format=pdf --output="./report.pdf"
Read doc contents (plain text for quick review)
读取文档内容(纯文本快速预览)
gog docs cat DOC_ID
gog docs cat DOC_ID
Export spreadsheet as Excel
导出电子表格为Excel
gog sheets export SPREADSHEET_ID --format=xlsx --output="./data.xlsx"
gog sheets export SPREADSHEET_ID --format=xlsx --output="./data.xlsx"
Get shareable link
获取可分享链接
gog drive url FILE_ID
gog drive share FILE_ID --role=reader --type=anyone
undefinedgog drive url FILE_ID
gog drive share FILE_ID --role=reader --type=anyone
undefinedDaily Task Management
日常任务管理
bash
undefinedbash
undefined1. List all task lists
1. 列出所有任务清单
gog tasks lists list
gog tasks lists list
2. View all tasks in default list
2. 查看默认清单的所有任务
gog tasks list @default
gog tasks list @default
3. View tasks due today
3. 查看今日到期的任务
gog tasks list @default --due-max="$(date -u +%Y-%m-%dT23:59:59Z)"
gog tasks list @default --due-max="$(date -u +%Y-%m-%dT23:59:59Z)"
4. Add a new task with due date
4. 添加带到期日的新任务
gog tasks add @default
--title="Review Q4 financials"
--due="2026-01-15"
--notes="Check revenue projections and expense reports"
--title="Review Q4 financials"
--due="2026-01-15"
--notes="Check revenue projections and expense reports"
gog tasks add @default
--title="Review Q4 financials"
--due="2026-01-15"
--notes="Check revenue projections and expense reports"
--title="Review Q4 financials"
--due="2026-01-15"
--notes="Check revenue projections and expense reports"
5. Complete a task
5. 标记任务完成
gog tasks done @default TASK_ID
gog tasks done @default TASK_ID
6. Reopen a completed task
6. 重新打开已完成的任务
gog tasks undo @default TASK_ID
gog tasks undo @default TASK_ID
7. Delete a task
7. 删除任务
gog tasks delete @default TASK_ID
gog tasks delete @default TASK_ID
8. Clear all completed tasks
8. 清空所有已完成任务
gog tasks clear @default
undefinedgog tasks clear @default
undefinedContact Lookup
联系人查询
bash
undefinedbash
undefinedSearch for a contact
搜索联系人
gog contacts search "John Smith"
gog contacts search "John Smith"
List all contacts
列出所有联系人
gog contacts list --max=100
gog contacts list --max=100
Get contact details
获取联系人详情
gog contacts get RESOURCE_NAME
gog contacts get RESOURCE_NAME
Create a new contact
创建新联系人
gog contacts create
--given="Jane"
--family="Doe"
--email="jane.doe@example.com"
--phone="+1-555-123-4567"
--given="Jane"
--family="Doe"
--email="jane.doe@example.com"
--phone="+1-555-123-4567"
gog contacts create
--given="Jane"
--family="Doe"
--email="jane.doe@example.com"
--phone="+1-555-123-4567"
--given="Jane"
--family="Doe"
--email="jane.doe@example.com"
--phone="+1-555-123-4567"
Search directory (Workspace)
搜索企业目录(Workspace专属)
gog contacts directory search "engineering"
See [references/common-workflows.md](references/common-workflows.md) for more workflow recipes.gog contacts directory search "engineering"
更多工作流方案请查看 [references/common-workflows.md](references/common-workflows.md)。Command Reference
命令参考
Gmail Commands
Gmail命令
| Command | Description | Key Flags |
|---|---|---|
| Search threads | |
| Get message content | |
| Send email | |
| Get full thread | - |
| Modify thread labels | |
| List all labels | - |
| Get label details | - |
| Bulk modify labels | |
| Download attachment | - |
| Get Gmail web URL | - |
| Bulk delete | - |
| List drafts | - |
| Create draft | Same flags as send |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 搜索会话 | |
| 获取邮件内容 | |
| 发送邮件 | |
| 获取完整会话 | - |
| 修改会话标签 | |
| 列出所有标签 | - |
| 获取标签详情 | - |
| 批量修改标签 | |
| 下载附件 | - |
| 获取Gmail网页端链接 | - |
| 批量删除 | - |
| 列出草稿 | - |
| 创建草稿 | 同发送邮件参数 |
Calendar Commands
Calendar命令
| Command | Description | Key Flags |
|---|---|---|
| List calendars | - |
| List events | |
| Get event details | - |
| Create event | |
| Update event | Same as create |
| Delete event | - |
| Check availability | |
| Find conflicts | |
| Search events | - |
| RSVP | |
| Create focus block | |
| Set OOO | |
| Set work location | |
| View team calendars | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 列出日历 | - |
| 列出事件 | |
| 获取事件详情 | - |
| 创建事件 | |
| 更新事件 | 同创建参数 |
| 删除事件 | - |
| 查询可用时间 | |
| 查找冲突 | |
| 搜索事件 | - |
| 提交RSVP | |
| 创建专注时段 | |
| 设置外出状态 | |
| 设置工作地点 | |
| 查看团队日历 | - |
Drive Commands
Drive命令
| Command | Description | Key Flags |
|---|---|---|
| List files | |
| Full-text search | |
| Get file metadata | - |
| Download file | |
| Upload file | |
| Create folder | |
| Delete (trash) | - |
| Move file | |
| Rename file | - |
| Share file | |
| Remove permission | - |
| List permissions | - |
| Get web URL | - |
| Copy file | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 列出文件 | |
| 全文搜索 | |
| 获取文件元数据 | - |
| 下载文件 | |
| 上传文件 | |
| 创建文件夹 | |
| 删除(移入垃圾箱) | - |
| 移动文件 | |
| 重命名文件 | - |
| 共享文件 | |
| 移除权限 | - |
| 列出权限 | - |
| 获取网页端链接 | - |
| 复制文件 | - |
Sheets Commands
Sheets命令
| Command | Description | Key Flags |
|---|---|---|
| Read values | - |
| Update values | |
| Append row | |
| Clear values | - |
| Get spreadsheet info | - |
| Create spreadsheet | - |
| Copy spreadsheet | - |
| Export | |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 读取数据 | - |
| 更新数据 | |
| 追加行 | |
| 清空数据 | - |
| 获取电子表格信息 | - |
| 创建电子表格 | - |
| 复制电子表格 | - |
| 导出 | |
Docs Commands
Docs命令
| Command | Description | Key Flags |
|---|---|---|
| Print as plain text | - |
| Export document | |
| Get metadata | - |
| Create document | - |
| Copy document | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 输出纯文本内容 | - |
| 导出文档 | |
| 获取元数据 | - |
| 创建文档 | - |
| 复制文档 | - |
Slides Commands
Slides命令
| Command | Description | Key Flags |
|---|---|---|
| Export presentation | |
| Get metadata | - |
| Create presentation | - |
| Copy presentation | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 导出演示文稿 | |
| 获取元数据 | - |
| 创建演示文稿 | - |
| 复制演示文稿 | - |
Tasks Commands
Tasks命令
| Command | Description | Key Flags |
|---|---|---|
| List task lists | - |
| List tasks | |
| Add task | |
| Update task | Same as add |
| Mark complete | - |
| Mark incomplete | - |
| Delete task | - |
| Clear completed | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 列出任务清单 | - |
| 列出任务 | |
| 添加任务 | |
| 更新任务 | 同添加参数 |
| 标记完成 | - |
| 标记未完成 | - |
| 删除任务 | - |
| 清空已完成任务 | - |
Contacts Commands
Contacts命令
| Command | Description | Key Flags |
|---|---|---|
| Search contacts | - |
| List all contacts | |
| Get contact | - |
| Create contact | |
| Update contact | Same as create |
| Delete contact | - |
| Search directory | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 搜索联系人 | - |
| 列出所有联系人 | |
| 获取联系人 | - |
| 创建联系人 | |
| 更新联系人 | 同创建参数 |
| 删除联系人 | - |
| 搜索企业目录 | - |
Groups Commands
Groups命令
| Command | Description | Key Flags |
|---|---|---|
| List your groups | - |
| List group members | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 列出你加入的群组 | - |
| 列出群组成员 | - |
People Commands
People命令
| Command | Description | Key Flags |
|---|---|---|
| Show your profile | - |
| 命令 | 说明 | 核心参数 |
|---|---|---|
| 显示你的个人资料 | - |
Global Flags
全局参数
All commands support these flags:
gog| Flag | Description |
|---|---|
| Output JSON (best for scripting/piping to jq) |
| TSV output, no colors (for scripts/parsing) |
| Use specific account (multi-account support) |
| Skip confirmation prompts |
| Never prompt, fail instead (CI/automation) |
| Detailed logging for debugging |
| Control color output |
所有命令都支持以下参数:
gog| 参数 | 说明 |
|---|---|
| 输出JSON格式(适合脚本/通过jq处理) |
| TSV格式输出,无颜色(适合脚本/解析) |
| 使用指定账户(支持多账户) |
| 跳过确认提示 |
| 禁止交互提示,遇到需要输入的场景直接失败(适合CI/自动化场景) |
| 输出详细日志用于调试 |
| 控制颜色输出 |
Multi-Account Usage
多账户使用
bash
undefinedbash
undefinedUse specific account for a command
对单个命令使用指定账户
gog gmail search "is:unread" --account=work@company.com
gog gmail search "is:unread" --account=work@company.com
List available accounts
列出可用账户
gog auth list
undefinedgog auth list
undefinedJSON Output for Scripting
脚本场景的JSON输出
bash
undefinedbash
undefinedGet unread count for inbox
获取收件箱未读计数
gog gmail labels get INBOX --json | jq '.messagesUnread'
gog gmail labels get INBOX --json | jq '.messagesUnread'
Extract event IDs from today
提取今日事件的ID
gog calendar events --today --json | jq '.[].id'
gog calendar events --today --json | jq '.[].id'
List file IDs from search
列出搜索结果的文件ID
gog drive search "budget" --json | jq '.[].id'
gog drive search "budget" --json | jq '.[].id'
Process email subjects
处理邮件主题
gog gmail search "is:unread" --json | jq '.[].snippet'
undefinedgog gmail search "is:unread" --json | jq '.[].snippet'
undefinedBest Practices
最佳实践
Efficient Searching
高效搜索
- Start narrow, then broaden - Begin with specific queries, add filters if too many results
- Use date filters - reduces noise dramatically
newer_than: - Combine operators - is better than browsing
is:unread from:boss newer_than:7d - Use - Limit results when exploring:
--max--max=10
- 先窄后宽 - 从精准查询开始,如果结果太少再放宽筛选条件
- 使用日期过滤器 - 可以大幅减少无效结果
newer_than: - 组合运算符 - 比手动浏览高效得多
is:unread from:boss newer_than:7d - 使用- 探索查询时限制结果数量:
--max--max=10
Calendar Management
日历管理
- Always check freebusy before scheduling meetings with others
- Use for remote meetings to auto-create video link
--with-meet - Set reminders - for important meetings
--reminder="popup:15m" - Block focus time proactively to protect deep work
- 安排会议前务必先查freebusy确认参会人可用时间
- 远程会议使用自动生成视频链接
--with-meet - 重要会议设置提醒:
--reminder="popup:15m" - 主动预留专注时间保障深度工作
Drive Organization
Drive整理
- Use folder IDs - Store frequently-used folder IDs for quick access
- Search by content - finds docs even if filename is unclear
fullText contains - Filter by MIME type - Narrow to specific doc types
- Export early - Download important docs as PDF for offline access
- 使用文件夹ID - 保存常用文件夹ID以便快速访问
- 按内容搜索 - 即使文件名不明确,也能找到对应文档
fullText contains - 按MIME类型筛选 - 缩小到指定文档类型
- 提前导出 - 将重要文档下载为PDF方便离线访问
Automation Tips
自动化技巧
- Use for scripting - Parse with jq
--json - Use for simple scripts - Tab-separated, no colors
--plain - Use in CI - Prevents hangs on prompts
--no-input - Store IDs - Calendar, folder, and task list IDs for reuse
- 脚本场景使用输出,配合jq解析
--json - 简单脚本使用输出,无颜色的制表符分隔格式更容易解析
--plain - CI场景使用避免脚本挂起
--no-input - 保存常用ID - 日历、文件夹、任务清单ID可重复使用
Reference Files
参考文档
- Gmail Search Syntax - Complete query operator reference
- Drive Search Syntax - Complete Drive query reference
- Calendar Scheduling - Event creation, time formats, RRULE
- Common Workflows - Extended PA/CoS workflow recipes
- Gmail搜索语法 - 完整查询运算符参考
- Drive搜索语法 - 完整Drive查询参考
- 日历排期 - 事件创建、时间格式、RRULE说明
- 常用工作流 - 更多PA/CoS工作流方案