بنقرة واحدة
gog-cli
Google Workspace CLI for Gmail, Calendar, Drive, Docs, Sheets, Tasks, and more
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Google Workspace CLI for Gmail, Calendar, Drive, Docs, Sheets, Tasks, and more
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Render Mermaid diagrams as SVG and PNG using the Beautiful Mermaid library. Use when the user asks to render a Mermaid diagram.
Generate, edit, and remix images using the Reve AI API. Use when creating images from text prompts, editing existing images with instructions, or combining/remixing multiple reference images. Requires REVE_API_KEY or REVE_AI_API_KEY environment variable.
Search and retrieve markdown documents from local knowledge bases using qmd. Supports BM25 keyword search, vector semantic search, and hybrid search with LLM re-ranking. Use for querying indexed notes, documentation, meeting transcripts, and any markdown-based knowledge.
Fastmail email, masked emails, calendar, contacts, and vacation management
Search the web with AI-powered answers and citations via Perplexity API. Use for research queries needing current info with sources. Env: PERPLEXITY_API_KEY.
| name | gog-cli |
| description | Google Workspace CLI for Gmail, Calendar, Drive, Docs, Sheets, Tasks, and more |
Fast, script-friendly CLI for Google Workspace services: Gmail, Calendar, Drive, Docs, Sheets, Slides, Chat, Classroom, Contacts, Tasks, People, Groups, and Keep.
# Install
brew install steipete/tap/gogcli
# Authenticate (requires OAuth credentials from Google Cloud Console)
gog auth credentials <path/to/client_secret.json>
gog auth add user@gmail.com --services all
--json for parsing command output - human-readable output is for display only--force only when explicitly requested by usergog auth status when working across multiple accounts| Service | List | Get | Create | Search |
|---|---|---|---|---|
| Gmail | gog gmail search "..." | gog gmail thread get <id> | gog gmail send ... | Same as list |
| Calendar | gog calendar events <cal> | gog calendar event <cal> <id> | gog calendar create <cal> | --query flag |
| Drive | gog drive ls | gog drive get <id> | gog drive upload <file> | gog drive search "..." |
| Tasks | gog tasks list <listId> | gog tasks get <list> <id> | gog tasks add <list> | N/A |
| Contacts | gog contacts list | gog contacts get <id> | gog contacts create | gog contacts search "..." |
# Search unread emails
gog gmail search "is:unread" --json
# Read specific thread
gog gmail thread get <threadId> --json
# Send email with attachment
gog gmail send --to user@example.com --subject "Subject" --body "Message" --attach file.pdf
# Reply to thread
gog gmail send --to user@example.com --subject "Re: Subject" --body "Reply" --reply-to-message-id <msgId>
# Apply label
gog gmail thread modify <threadId> --add "Label Name"
# List today's events
gog calendar events primary --from "$(date +%Y-%m-%d)T00:00:00" --to "$(date +%Y-%m-%d)T23:59:59" --json
# Create event with attendees
gog calendar create primary --summary "Meeting" --from "2024-12-20T14:00:00" --to "2024-12-20T15:00:00" --attendees "user@example.com"
# Check availability
gog calendar freebusy "user1@example.com,user2@example.com" --from <start> --to <end> --json
# Accept invitation
gog calendar respond primary <eventId> --status accepted
# Search files
gog drive search "quarterly report" --json
# Download file
gog drive download <fileId> --out ~/Downloads/
# Upload to folder
gog drive upload file.pdf --parent <folderId>
# Share file
gog drive share <fileId> --email user@example.com --role writer
# Read range
gog sheets read <spreadsheetId> "Sheet1!A1:D10" --json
# Write data (JSON array of arrays)
gog sheets write <spreadsheetId> "Sheet1!A1" --values '[["Name","Value"],["Alice",100]]'
# Append rows
gog sheets append <spreadsheetId> "Sheet1!A:B" --values '[["New","Row"]]'
| Flag | Format | Use Case |
|---|---|---|
| (none) | Human-readable | Display to user |
--json | JSON | Parsing, scripting |
--plain | TSV | Shell piping |
# Specify account per command
gog --account work@example.com gmail search "is:unread"
# Set default via environment
export GOG_ACCOUNT=work@example.com
# Use aliases
gog auth alias set work work@example.com
gog --account work gmail search "is:unread"
| Error | Solution |
|---|---|
| Token expired | gog auth add user@gmail.com --force-consent |
| Wrong scopes | Re-add with required services: --services gmail,calendar,drive |
| Rate limited | Wait and retry; use --max to limit batch sizes |
Destructive operations requiring confirmation:
gog drive delete - moves to trashgog calendar delete - removes eventgog gmail filters delete - removes filter rulePrefer these safe patterns:
gog gmail search "..." --json then modifygog gmail thread modify <id> --add Archive --remove INBOXgog drive download <id> then gog drive delete <id>