| name | gog |
| description | Google Workspace CLI for Gmail, Calendar, Drive, Contacts, Sheets, and Docs via the gog CLI. Use when asked to send emails, check calendar, search Drive, read/update spreadsheets, or interact with Google Workspace. |
| alwaysInclude | false |
| requiredBins | ["gog"] |
| platforms | ["darwin","linux"] |
Google Workspace (gog)
Use gog for Gmail, Calendar, Drive, Contacts, Sheets, and Docs. Requires OAuth setup.
Install
brew install steipete/tap/gogcli
Setup (Once)
gog auth credentials /path/to/client_secret.json
gog auth add you@gmail.com --services gmail,calendar,drive,contacts,docs,sheets
gog auth list
Gmail
gog gmail search 'newer_than:7d' --max 10
gog gmail messages search "in:inbox from:sender@example.com" --max 20
gog gmail send --to a@b.com --subject "Hi" --body "Hello"
gog gmail send --to a@b.com --subject "Hi" --body-file ./message.txt
gog gmail send --to a@b.com --subject "Hi" --body-file - <<'EOF'
Hello,
Paragraph here.
Best regards
EOF
gog gmail send --to a@b.com --subject "Hi" --body-html "<p>Hello</p>"
gog gmail drafts create --to a@b.com --subject "Hi" --body-file ./message.txt
gog gmail send --to a@b.com --subject "Re: Hi" --body "Reply" --reply-to-message-id <msgId>
Calendar
gog calendar events <calendarId> --from <iso> --to <iso>
gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso>
gog calendar create <calendarId> --summary "Title" --from <iso> --to <iso> --event-color 7
gog calendar update <calendarId> <eventId> --summary "New Title"
gog calendar colors
Drive
gog drive search "query" --max 10
Contacts
gog contacts list --max 20
Sheets
gog sheets get <sheetId> "Tab!A1:D10" --json
gog sheets update <sheetId> "Tab!A1:B2" --values-json '[["A","B"],["1","2"]]' --input USER_ENTERED
gog sheets append <sheetId> "Tab!A:C" --values-json '[["x","y","z"]]' --insert INSERT_ROWS
gog sheets clear <sheetId> "Tab!A2:Z"
gog sheets metadata <sheetId> --json
Docs
gog docs export <docId> --format txt --out /tmp/doc.txt
gog docs cat <docId>
Notes
- Set
GOG_ACCOUNT=you@gmail.com to avoid repeating --account
- Use
--json plus --no-input for scripting
--body does not unescape \n; use --body-file or heredoc for multi-line
- Confirm before sending mail or creating events
gog gmail search returns threads; gog gmail messages search returns individual messages