gogcli: Google Workspace CLI tool
Command-line interface for Gmail, Calendar, Drive, Contacts, and other Google services with JSON output.
Learn more about gogcli
gogcli is a command-line interface that provides programmatic access to Google Workspace services including Gmail, Calendar, Drive, Contacts, Tasks, Sheets, and others. The tool uses OAuth2 authentication with secure credential storage in the OS keyring and supports multiple Google accounts simultaneously. It outputs data in JSON format for scripting and automation, with least-privilege authentication scopes and support for Workspace service accounts with domain-wide delegation. The CLI is designed for automation workflows, system integration, and headless server environments.
JSON-First Output
All commands return structured JSON data optimized for scripting and automation workflows. Calendar responses include additional day-of-week fields for enhanced parsing.
Multiple Account Support
Manages multiple Google accounts with aliases and supports both OAuth refresh tokens and Workspace service accounts. Includes domain mapping for automatic client selection.
Least-Privilege Authentication
Implements granular scope control with readonly and drive-scope options. Supports headless authentication flows for remote servers without browser access.
gog gmail search 'newer_than:7d' --max 10
gog gmail thread get <threadId> --download
gog gmail send --to a@b.com --subject "Hi" --body "Hello"v0.11.0: Apps Script: add `appscript` command group (create/get projects, fetch content, run deployed functio
- –Apps Script: add `appscript` command group (create/get projects, fetch content, run deployed functions).
- –Forms: add `forms` command group (create/get forms, list/get responses).
- –Docs: add `docs comments` for listing and managing Google Doc comments. (#263) —
- –Sheets: add `sheets notes` to read cell notes. (#208) —
- –Gmail: add `gmail send --quote` to include quoted original message in replies. (#169) — -li-hm.
v0.10.0: Docs/Slides: add `docs update` markdown formatting + table insertion, plus markdown-driven slides cr
- –Docs/Slides: add `docs update` markdown formatting + table insertion, plus markdown-driven slides creation and template-based slide creation. (#219) —
- –Slides: add add-slide/list-slides/delete-slide/read-slide/update-notes/replace-slide for image decks, including --before insertion and --notes '' clear behavior. (#214) —
- –Docs: add tab support (`docs list-tabs`, `docs cat --tab`, `docs cat --all-tabs`) and editing commands (`docs write|insert|delete|find-replace`). (#225) —
- –Docs: add `docs create --file` to import Markdown into Google Docs with inline image support and hardened temp-file cleanup. (#244) —
- –Drive: add `drive upload --replace` to update files in-place (preserves `fileId`/shared link). (#232) —
v0.9.0: Auth: multi-org login with per-client OAuth credentials + token isolation. (#96)
- –Auth: multi-org login with per-client OAuth credentials + token isolation. (#96)
- –Calendar: show event timezone and local times; add --weekday output. (#92) —
- –Gmail: show thread message count in search output. (#99) —
- –Gmail: message-level search with optional body decoding. (#88) —
- –Auth: fix Gmail search example in auth success template. (#89) —
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
Grbl
Real-time motion control firmware for Arduino-based CNCs.
Pino
Low-overhead streaming JSON logger for Node.js.
MailHog
Captures development SMTP traffic with web and API interfaces.
tldr-pages
Community-maintained concise help pages for CLI tools with practical examples.
jsPDF
Generate PDF documents in-browser with JavaScript APIs.