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.
Related Reading
Guides and comparisons from the Greptile content library
Best Security-Focused AI Code Review Tools [2026 Guide]
The six best security-focused AI code review tools, compared on SAST, SCA, DAST, and full-repo context, so you can pick the one that fits your codebase and your cycle times.
Flaky Tests: What Is a Flaky Test and How Do You Manage Them?
What flaky tests are, what causes them, how to detect them, and 12 ways to fix them. Plus why end-to-end tests are more prone to flakiness, and how seeing what actually happened during a run helps you tell a test problem from a code problem.
Best AI Coding Tools for Solo Developers (2026 Review)
The best AI coding tools for solo developers in 2026, compared by where they fit in the software development lifecycle: writing code, prototyping, reviewing, testing, and background automation. Plus which tools fit which languages.
Best SAST Tools for Engineering Teams [2026 Review]
We compare five of the best SAST tools (Semgrep, Checkmarx One, Snyk, Aikido, and GitHub CodeQL) on core functionality, languages, pricing, and fit, plus why static scanning needs runtime testing and full-codebase review alongside it.