Google Workspace. One binary.
-- Google - in your - terminal -
-- gog unifies Gmail, Calendar, Drive, Contacts, Tasks, Sheets, Docs, Slides, and People - under one CLI — with JSON output and sane defaults. -
- -
- Tip: set a default in gog auth manage or export GOG_ACCOUNT=you@gmail.com once, stop repeating --account.
-
-$ brew install gogcli
-$ gog auth credentials ~/Downloads/client_secret.json
-$ gog auth add you@gmail.com
-
-$ export GOG_ACCOUNT=you@gmail.com
-$ gog gmail labels list
-$ gog calendar calendars --max 5 --json | jq '.calendars[].summary'
-$ gog drive ls --query "mimeType='application/pdf'" --max 3
-
- Install
-Homebrew, or build from source.
-Homebrew
-brew install gogcli
- From source
-git clone https://github.com/steipete/gogcli.git
-cd gogcli
-make
-./bin/gog --help
- Quickstart
-- You’ll need a Google Cloud “Desktop app” OAuth client JSON once. Then you can keep adding accounts. -
-Store credentials
-Save your downloaded client JSON into gog’s config.
-gog auth credentials ~/Downloads/client_secret_....json
- Authorize an account
-Browser flow by default. Use --manual for headless.
gog auth add you@gmail.com
- Run commands
-Use --json for scripting.
export GOG_ACCOUNT=you@gmail.com
-gog gmail search 'newer_than:7d' --max 10 --json | jq
- Re-auth a service (e.g. Sheets)
-
- If you add scopes later and Google doesn’t return a refresh token, re-run with
- --force-consent.
-
gog auth add you@gmail.com --services sheets --force-consent
- Features
-High leverage commands, consistent UX, and clean output.
-Gmail
-Search threads, send mail, manage labels, drafts, filters, settings, and watch (Pub/Sub push).
-Calendar
-List/create/update events, respond to invites, detect conflicts, and check free/busy.
-Drive
-List/search/upload/download, export Docs formats, permissions, folders, URLs.
-Sheets / Docs / Slides
-Read/write Sheets; export Docs/Slides/Sheets to PDF/DOCX/PPTX/XLSX/CSV via Drive.
-Contacts / People
-Personal contacts, “other contacts”, Workspace directory, and your profile.
-Tasks
-Tasklists + tasks: add/update/done/undo/delete/clear with paging and JSON output.
-Examples
-A few commands you’ll actually use.
-Find unread mail
-gog gmail search 'is:unread newer_than:7d' --max 20
- Pipe JSON to jq for scripts.
-gog gmail search 'newer_than:7d' --max 50 --json | jq '.threads[] | .subject'
- Export a Sheet as PDF
-gog sheets export <spreadsheetId> --format pdf --out ./sheet.pdf
- Docs and Slides are similar.
-gog docs export <docId> --format docx --out ./doc.docx
-gog slides export <presentationId> --format pptx --out ./deck.pptx
-