gog — user's Google workspace via CLI
Rules
- Never delete (mail, events, contacts, tasks, files). If a change looks destructive, stop and ask.
- Never
gmail sendunless explicitly asked. - Account is always
chendrix1123@gmail.com— already default viaGOG_ACCOUNTin.zshrc; don't pass--account. - Resolve IDs with a search/list first; never guess IDs.
- User timezone: America/New_York — use explicit offsets in times (
-04:00/-05:00).
Gmail
gog gmail search 'is:unread newer_than:7d' --max 10 # full Gmail query syntax works
gog gmail get <messageId> --sanitize-content --json
Calendar
gog calendar events --today # also --tomorrow --week --from D --to D
gog calendar create --summary "T" --from "2026-09-09T10:00:00-04:00" --to "2026-09-09T10:30:00-04:00" \
[--description] [--location] [--attendees "a@x.com,b@y.com"]
gog calendar update <eventId> --summary "..." --from "..." --to "..."
Contacts
gog contacts search "name|email|phone"
gog contacts get people/cXXXX
# create/update: check `gog contacts --help` for exact flags before writing
Tasks
gog tasks lists # get tasklistId
gog tasks add <tasklistId> --title "..." [--notes] [--due 2026-09-10]
gog tasks update <tasklistId> <taskId> --title/--due/--notes
gog tasks done <tasklistId> <taskId> # complete (not delete); undo exists
Troubleshooting
- Keyring error → env not loaded; see install.
- Auth/consent error → token expired or client broken; see install.
- Suspected credential leak, lost device, or user wants access shut off → follow kill-switch (revoke first, clean up second).
--jsonon any command for machine-readable output.