openclaw/gogcliPublic

Google Workspace in your terminal.

AI summary: A unified, task-first CLI for automating Google Workspace operations.

Stars
8.6K
+13 today
Forks
731
Watchers
25
Open issues
14
Open PRs
28
Contributors
~156
Commits
2K
Branches
40

GoMITCreated Dec 12, 2025Last push 4d agoLatest release v0.48.0+21 stars this week+79 this month

Quick answers

What is gogcli?
A unified, task-first CLI for automating Google Workspace operations.
What does gogcli do?
gog consolidates the sprawling Google Workspace APIs into a single CLI binary designed for both human operators and automated scripts. It provides task-first commands that abstract away the complexity of raw REST resources, enabling practical workflows like auditing Drive sharing, sending Gmail, resolving calendar names, editing Docs, and managing Workspace users. It enforces strict operational contracts to make automation reliable, offering stable JSON output for CI environments, comprehensive exit codes, and robust read-only flags to prevent accidental modifications. It essentially turns Google Workspace into a scriptable command-line toolkit.
Who is gogcli for?
DevOps engineers, IT admins, and developers needing a scriptable, predictable interface to manage and automate Google Workspace. Ideal for teams requiring efficient go.
How do I get started with gogcli?
gog --account [email protected] --readonly calendar events --today
How popular is gogcli on GitHub?
openclaw/gogcli has 8,595 stars and 731 forks on GitHub, and gained 21 stars in the last 7 days.
What license does gogcli use?
openclaw/gogcli is released under the MIT license.

Star history

since Jul 29, 2026
02.5K5K7.5KJul 2026Sep 2026Oct 2026Nov 2026
8.6K stars as of Nov 19, 2026. Measured daily since Jul 29, 2026; GitHub no longer exposes earlier star timestamps.

Update history

5 recorded
  • Nov 12, 2026New release v0.48.0 (previously v0.47.1).
  • Nov 1, 2026New release v0.47.1 (previously v0.45.0).
  • Oct 20, 2026New release v0.45.0 (previously v0.43.0).
  • Oct 9, 2026New release v0.43.0 (previously v0.42.0).
  • Oct 4, 2026Previously tracked as steipete/gogcli; its 1 daily snapshot and 3 trending appearances were merged into this profile. Stars: 8,226 on 2026-07-29 under the old name, 8,467 on 2026-10-03 (+241).

Contribution activity

commits per day, last 52 weeks
NovDecJanFebMarAprMayJunJulAugSepOctNovMonWedFri2025-11-16: 0 commits2025-11-17: 0 commits2025-11-18: 0 commits2025-11-19: 0 commits2025-11-20: 0 commits2025-11-21: 0 commits2025-11-22: 0 commits2025-11-23: 0 commits2025-11-24: 0 commits2025-11-25: 0 commits2025-11-26: 0 commits2025-11-27: 0 commits2025-11-28: 0 commits2025-11-29: 0 commits2025-11-30: 0 commits2025-12-01: 0 commits2025-12-02: 0 commits2025-12-03: 0 commits2025-12-04: 0 commits2025-12-05: 0 commits2025-12-06: 0 commits2025-12-07: 0 commits2025-12-08: 0 commits2025-12-09: 0 commits2025-12-10: 0 commits2025-12-11: 0 commits2025-12-12: 40 commits2025-12-13: 0 commits2025-12-14: 0 commits2025-12-15: 0 commits2025-12-16: 2 commits2025-12-17: 11 commits2025-12-18: 3 commits2025-12-19: 0 commits2025-12-20: 3 commits2025-12-21: 1 commit2025-12-22: 0 commits2025-12-23: 0 commits2025-12-24: 24 commits2025-12-25: 0 commits2025-12-26: 47 commits2025-12-27: 0 commits2025-12-28: 13 commits2025-12-29: 0 commits2025-12-30: 0 commits2025-12-31: 19 commits2026-01-01: 1 commit2026-01-02: 30 commits2026-01-03: 14 commits2026-01-04: 2 commits2026-01-05: 14 commits2026-01-06: 0 commits2026-01-07: 11 commits2026-01-08: 45 commits2026-01-09: 40 commits2026-01-10: 9 commits2026-01-11: 9 commits2026-01-12: 3 commits2026-01-13: 15 commits2026-01-14: 3 commits2026-01-15: 5 commits2026-01-16: 18 commits2026-01-17: 38 commits2026-01-18: 2 commits2026-01-19: 13 commits2026-01-20: 4 commits2026-01-21: 12 commits2026-01-22: 4 commits2026-01-23: 0 commits2026-01-24: 2 commits2026-01-25: 0 commits2026-01-26: 2 commits2026-01-27: 0 commits2026-01-28: 0 commits2026-01-29: 0 commits2026-01-30: 6 commits2026-01-31: 8 commits2026-02-01: 17 commits2026-02-02: 1 commit2026-02-03: 0 commits2026-02-04: 2 commits2026-02-05: 0 commits2026-02-06: 3 commits2026-02-07: 1 commit2026-02-08: 1 commit2026-02-09: 1 commit2026-02-10: 0 commits2026-02-11: 0 commits2026-02-12: 2 commits2026-02-13: 11 commits2026-02-14: 36 commits2026-02-15: 17 commits2026-02-16: 15 commits2026-02-17: 1 commit2026-02-18: 2 commits2026-02-19: 1 commit2026-02-20: 0 commits2026-02-21: 1 commit2026-02-22: 0 commits2026-02-23: 3 commits2026-02-24: 0 commits2026-02-25: 0 commits2026-02-26: 5 commits2026-02-27: 0 commits2026-02-28: 0 commits2026-03-01: 3 commits2026-03-02: 7 commits2026-03-03: 13 commits2026-03-04: 0 commits2026-03-05: 1 commit2026-03-06: 0 commits2026-03-07: 46 commits2026-03-08: 65 commits2026-03-09: 37 commits2026-03-10: 0 commits2026-03-11: 1 commit2026-03-12: 0 commits2026-03-13: 1 commit2026-03-14: 1 commit2026-03-15: 0 commits2026-03-16: 0 commits2026-03-17: 0 commits2026-03-18: 0 commits2026-03-19: 0 commits2026-03-20: 0 commits2026-03-21: 0 commits2026-03-22: 0 commits2026-03-23: 0 commits2026-03-24: 0 commits2026-03-25: 0 commits2026-03-26: 0 commits2026-03-27: 0 commits2026-03-28: 0 commits2026-03-29: 0 commits2026-03-30: 0 commits2026-03-31: 0 commits2026-04-01: 0 commits2026-04-02: 0 commits2026-04-03: 0 commits2026-04-04: 0 commits2026-04-05: 0 commits2026-04-06: 0 commits2026-04-07: 0 commits2026-04-08: 0 commits2026-04-09: 0 commits2026-04-10: 0 commits2026-04-11: 0 commits2026-04-12: 0 commits2026-04-13: 0 commits2026-04-14: 0 commits2026-04-15: 0 commits2026-04-16: 0 commits2026-04-17: 0 commits2026-04-18: 0 commits2026-04-19: 0 commits2026-04-20: 52 commits2026-04-21: 4 commits2026-04-22: 1 commit2026-04-23: 1 commit2026-04-24: 0 commits2026-04-25: 0 commits2026-04-26: 2 commits2026-04-27: 42 commits2026-04-28: 32 commits2026-04-29: 1 commit2026-04-30: 0 commits2026-05-01: 0 commits2026-05-02: 0 commits2026-05-03: 1 commit2026-05-04: 17 commits2026-05-05: 18 commits2026-05-06: 2 commits2026-05-07: 1 commit2026-05-08: 0 commits2026-05-09: 13 commits2026-05-10: 13 commits2026-05-11: 8 commits2026-05-12: 2 commits2026-05-13: 0 commits2026-05-14: 10 commits2026-05-15: 13 commits2026-05-16: 0 commits2026-05-17: 13 commits2026-05-18: 0 commits2026-05-19: 0 commits2026-05-20: 12 commits2026-05-21: 2 commits2026-05-22: 20 commits2026-05-23: 4 commits2026-05-24: 0 commits2026-05-25: 0 commits2026-05-26: 0 commits2026-05-27: 0 commits2026-05-28: 3 commits2026-05-29: 0 commits2026-05-30: 14 commits2026-05-31: 35 commits2026-06-01: 89 commits2026-06-02: 0 commits2026-06-03: 3 commits2026-06-04: 0 commits2026-06-05: 0 commits2026-06-06: 3 commits2026-06-07: 10 commits2026-06-08: 8 commits2026-06-09: 10 commits2026-06-10: 13 commits2026-06-11: 17 commits2026-06-12: 219 commits2026-06-13: 90 commits2026-06-14: 16 commits2026-06-15: 11 commits2026-06-16: 0 commits2026-06-17: 3 commits2026-06-18: 8 commits2026-06-19: 35 commits2026-06-20: 4 commits2026-06-21: 4 commits2026-06-22: 7 commits2026-06-23: 6 commits2026-06-24: 3 commits2026-06-25: 0 commits2026-06-26: 6 commits2026-06-27: 0 commits2026-06-28: 0 commits2026-06-29: 0 commits2026-06-30: 2 commits2026-07-01: 3 commits2026-07-02: 0 commits2026-07-03: 5 commits2026-07-04: 0 commits2026-07-05: 0 commits2026-07-06: 9 commits2026-07-07: 0 commits2026-07-08: 0 commits2026-07-09: 4 commits2026-07-10: 3 commits2026-07-11: 10 commits2026-07-12: 0 commits2026-07-13: 1 commit2026-07-14: 0 commits2026-07-15: 1 commit2026-07-16: 4 commits2026-07-17: 0 commits2026-07-18: 0 commits2026-07-19: 1 commit2026-07-20: 0 commits2026-07-21: 4 commits2026-07-22: 0 commits2026-07-23: 0 commits2026-07-24: 0 commits2026-07-25: 0 commits2026-07-26: 1 commit2026-07-27: 8 commits2026-07-28: 0 commits2026-07-29: 0 commits2026-07-30: 0 commits2026-07-31: 0 commits2026-08-01: 0 commits2026-08-02: 12 commits2026-08-03: 0 commits2026-08-04: 0 commits2026-08-05: 2 commits2026-08-06: 1 commit2026-08-07: 0 commits2026-08-08: 8 commits2026-08-09: 9 commits2026-08-10: 3 commits2026-08-11: 1 commit2026-08-12: 1 commit2026-08-13: 4 commits2026-08-14: 3 commits2026-08-15: 2 commits2026-08-16: 1 commit2026-08-17: 0 commits2026-08-18: 0 commits2026-08-19: 0 commits2026-08-20: 0 commits2026-08-21: 4 commits2026-08-22: 0 commits2026-08-23: 2 commits2026-08-24: 1 commit2026-08-25: 22 commits2026-08-26: 2 commits2026-08-27: 1 commit2026-08-28: 1 commit2026-08-29: 0 commits2026-08-30: 0 commits2026-08-31: 4 commits2026-09-01: 1 commit2026-09-02: 15 commits2026-09-03: 7 commits2026-09-04: 1 commit2026-09-05: 5 commits2026-09-06: 0 commits2026-09-07: 3 commits2026-09-08: 0 commits2026-09-09: 0 commits2026-09-10: 0 commits2026-09-11: 13 commits2026-09-12: 7 commits2026-09-13: 4 commits2026-09-14: 1 commit2026-09-15: 0 commits2026-09-16: 0 commits2026-09-17: 0 commits2026-09-18: 0 commits2026-09-19: 0 commits2026-09-20: 0 commits2026-09-21: 6 commits2026-09-22: 8 commits2026-09-23: 1 commit2026-09-24: 13 commits2026-09-25: 2 commits2026-09-26: 0 commits2026-09-27: 0 commits2026-09-28: 0 commits2026-09-29: 2 commits2026-09-30: 3 commits2026-10-01: 1 commit2026-10-02: 0 commits2026-10-03: 0 commits2026-10-04: 0 commits2026-10-05: 0 commits2026-10-06: 4 commits2026-10-07: 2 commits2026-10-08: 0 commits2026-10-09: 4 commits2026-10-10: 2 commits2026-10-11: 3 commits2026-10-12: 0 commits2026-10-13: 0 commits2026-10-14: 0 commits2026-10-15: 7 commits2026-10-16: 2 commits2026-10-17: 0 commits2026-10-18: 2 commits2026-10-19: 2 commits2026-10-20: 7 commits2026-10-21: 0 commits2026-10-22: 4 commits2026-10-23: 6 commits2026-10-24: 0 commits2026-10-25: 0 commits2026-10-26: 7 commits2026-10-27: 2 commits2026-10-28: 1 commit2026-10-29: 0 commits2026-10-30: 0 commits2026-10-31: 0 commits2026-11-01: 0 commits2026-11-02: 0 commits2026-11-03: 1 commit2026-11-04: 5 commits2026-11-05: 10 commits2026-11-06: 1 commit2026-11-07: 0 commits2026-11-08: 0 commits2026-11-09: 0 commits2026-11-10: 0 commits2026-11-11: 1 commit2026-11-12: 0 commits2026-11-13: 0 commits2026-11-14: 0 commits
1,975 commits in the last yearLessMore

Signals and awards

derived from tracked data
  • Very active

    1,975 commits in 52 weeks

  • Community-driven

    ~156 contributors

  • Permissive license

    MIT

  • Continuous integration

    Automated checks passing

  • Repeat trending

    3 trending appearances

What gogcli does

gog consolidates the sprawling Google Workspace APIs into a single CLI binary designed for both human operators and automated scripts. It provides task-first commands that abstract away the complexity of raw REST resources, enabling practical workflows like auditing Drive sharing, sending Gmail, resolving calendar names, editing Docs, and managing Workspace users. It enforces strict operational contracts to make automation reliable, offering stable JSON output for CI environments, comprehensive exit codes, and robust read-only flags to prevent accidental modifications. It essentially turns Google Workspace into a scriptable command-line toolkit.

DevOps engineers, IT admins, and developers needing a scriptable, predictable interface to manage and automate Google Workspace. Ideal for teams requiring efficient go.

  • Unified Workspace access: Manages Gmail, Calendar, Drive, Docs, Admin, and over a dozen other Google services from a single binary.
  • Task-oriented abstraction: Replaces raw API calls with practical workflows like finding unread mail or auditing folder permissions.
  • Automation-ready output: Supports `--json` and `--plain` stdout for script parsing, while strictly routing warnings and prompts to stderr.
  • Safety guardrails: Includes `--readonly`, `--gmail-no-send`, and `--no-input` flags for secure, non-interactive CI execution.
  • Flexible authentication: Supports account aliases, OAuth clients, direct access tokens, OS keyrings, and Workspace service accounts.

Where teams use it

CI/CD reporting

Runs non-interactively in a CI pipeline to parse test results and append them directly to a Google Sheet.

Security auditing

Executes read-only queries to dump Drive folder sharing permissions to a JSON file for scheduled compliance reviews.

Agent tool integration

Provides autonomous coding agents with a predictable, CLI-based tool to safely interact with a user's calendar or email.

Workspace administration

Use bulk commands to manage Workspace users, update group memberships, and back up account data via the terminal.

Getting started: gog --account [email protected] --readonly calendar events --today

README

main branch

gog 🧭 — Google Workspace from the terminal

gogcli banner

CI Release Go License Homebrew

gog is one command-line client for Gmail, Calendar, Drive, Docs, Sheets, and the wider Google Workspace surface. It is built for people, scripts, CI, and agents that need explicit account routing, machine-readable output, and safety controls.

gog --readonly gmail search 'is:unread newer_than:7d' --max 10 --json
gog --readonly calendar events --today --json
gog --readonly drive audit sharing --parent <folderId> --json

For least-privilege Gmail authorization, use gog auth add [email protected] --services gmail --gmail-scope send for sending only, or --gmail-scope read-send to also read messages without mailbox-modification or settings-management permissions.

Install

Homebrew is the shortest path on macOS and Linux. Prebuilt macOS binaries require macOS 15 or later:

brew install openclaw/tap/gogcli
gog --version

With Go:

go install github.com/openclaw/gogcli/cmd/gog@latest
gog --version

Install scripts using the former github.com/steipete/gogcli module path should switch to github.com/openclaw/gogcli as shown above.

Docker images, Windows archives, raw macOS/Linux binaries, and source builds are covered in the install guide.

Quick start

Create a Desktop OAuth client in a Google Cloud project, download its JSON file, and authorize only the services you need:

gog auth credentials set ~/Downloads/client_secret_*.json
gog auth add [email protected] --services gmail,calendar,drive
export [email protected]
gog auth doctor --check
gog gmail search 'newer_than:7d' --max 10

gog auth [email protected] is shorthand for gog auth add [email protected], with the same flags.

For Gmail queries beginning with -, place all flags before --; see Search and Read.

The five-minute quickstart covers API enablement, the OAuth consent screen, weekly-token-expiry avoidance, headless authorization, and account defaults.

Work with Google services

Commands follow the resource you are working with. These are the common entry points; the examples and generated command index cover the full surface.

Work Start with
Mail and calendars gog gmail search, gog calendar events
Files and sharing gog drive ls, gog drive audit sharing
Docs, Sheets, Slides, and Forms gog docs, gog sheets, gog slides, gog forms
Contacts and tasks gog contacts, gog tasks
Meetings and chat gog meet, gog chat, gog zoom
Analytics and publishing gog analytics, gog searchconsole, gog adsense, gog youtube
Workspace administration gog admin, gog groups, gog keep
Discovery API fallback gog api describe, gog api call

Generic API commands support service-hosted Discovery documents such as Meet v2 when the default central Directory returns 404. Explicit GOG_DISCOVERY_BASE_URL overrides retain their existing behavior.

GOG_GOOGLE_API_BASE_URL=http(s)://host[:port] sends Google API requests for https://googleapis.com and https://*.googleapis.com to a test server, emulator, proxy, or relay that adds credentials outside gog. Path and query are kept and the original host is sent as X-Forwarded-Host. While it is set, gog attaches no credentials to Google API requests (no OAuth, ADC, service-account, --access-token, or API-key credentials), does not need stored tokens, and refuses cross-origin redirects, so the relay handles any upstream redirects. --account still selects the account label. Use https for endpoints that are not on loopback. Discovery documents still use GOG_DISCOVERY_BASE_URL; gRPC clients such as the Pub/Sub pull used by gmail watch pull, Maps/Places API-key calls, and downloads from non-googleapis.com URLs are not redirected, and gog auth commands still talk to Google directly. Invalid values fail with a usage error.

Consumer Google accounts work with user-facing APIs. Admin Directory, Cloud Identity Groups, Chat, Keep, and domain-wide delegation require a managed Google Workspace domain. The Workspace Admin guide explains that setup.

Automate safely

--json emits structured output and --plain emits stable TSV. Prompts, progress, and warnings go to stderr. --no-input, --readonly, exact command allowlists, Gmail no-send policy, dry-run plans, and untrusted-content wrapping let the caller define a narrower execution boundary.

gog --account [email protected] \
  --enable-commands-exact gmail.search,gmail.get \
  --gmail-no-send --readonly --no-input --wrap-untrusted --json \
  gmail search 'newer_than:7d'

See Automation for output and exit-code contracts, and Safety Profiles for binaries with command policy and locked flag values baked in at build time.

Accounts and authentication

One installation can route among multiple Google accounts, named OAuth client projects, direct access tokens, Application Default Credentials, and Workspace service accounts. Tokens use the platform keyring by default; headless systems can use the encrypted file backend.

gog auth list --check
gog auth alias set work [email protected]
gog --account work gmail search 'is:unread'

See OAuth clients for client selection and service accounts, and Paths and State for GOG_HOME, XDG paths, and keyring storage.

Discover the contract

Running gog with no arguments shows the executable path, a short description, and local auth/config status. Use gog --help for the command overview. When JSON output is selected through the environment, the no-args view emits only the status JSON object.

The running binary generates its command schema, reference pages, and agent skills from the same command tree:

gog schema --json
gog schema gmail search --json
gog help drive inventory

gog mcp exposes a typed stdio MCP server without a generic shell or command bridge. It is read-only by default; writes require explicit command and tool authorization. See the MCP guide.

Supported OAuth services

The generated table below records the user OAuth and Workspace service-account surface. gog auth services reports the same information from the installed binary.

The default user/all-user set excludes ads. Google treats authorizing an app for Google Ads as a sensitive action and can block consent behind a mandatory passkey enrollment. Add it only when you need it: gog auth add [email protected] --services user,ads.

Service User APIs Scopes Notes
gmail yes Gmail API https://www.googleapis.com/auth/gmail.modify
https://www.googleapis.com/auth/gmail.settings.basic
https://www.googleapis.com/auth/gmail.settings.sharing
calendar yes Calendar API https://www.googleapis.com/auth/calendar
chat yes Chat API https://www.googleapis.com/auth/chat.spaces
https://www.googleapis.com/auth/chat.messages
https://www.googleapis.com/auth/chat.memberships
https://www.googleapis.com/auth/chat.users.readstate.readonly
https://www.googleapis.com/auth/chat.messages.reactions.create
https://www.googleapis.com/auth/chat.messages.reactions.readonly
classroom yes Classroom API https://www.googleapis.com/auth/classroom.courses
https://www.googleapis.com/auth/classroom.rosters
https://www.googleapis.com/auth/classroom.coursework.students
https://www.googleapis.com/auth/classroom.coursework.me
https://www.googleapis.com/auth/classroom.courseworkmaterials
https://www.googleapis.com/auth/classroom.announcements
https://www.googleapis.com/auth/classroom.topics
https://www.googleapis.com/auth/classroom.guardianlinks.students
https://www.googleapis.com/auth/classroom.profile.emails
https://www.googleapis.com/auth/classroom.profile.photos
drive yes Drive API https://www.googleapis.com/auth/drive
driveactivity yes Drive Activity API https://www.googleapis.com/auth/drive.activity.readonly Read-only audit/activity scope; authorize with --services driveactivity
drivelabels yes Drive Labels API https://www.googleapis.com/auth/drive.labels.readonly Read-only Drive label schema; authorize with --services drivelabels
docs yes Docs API, Drive API https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/documents
Export/copy/create via Drive
slides yes Slides API, Drive API https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/presentations
Create/edit presentations
contacts yes People API https://www.googleapis.com/auth/contacts
https://www.googleapis.com/auth/contacts.other.readonly
https://www.googleapis.com/auth/directory.readonly
Contacts + other contacts + directory
tasks yes Tasks API https://www.googleapis.com/auth/tasks
sheets yes Sheets API, Drive API https://www.googleapis.com/auth/drive
https://www.googleapis.com/auth/spreadsheets
Export via Drive
people yes People API profile OIDC profile scope
forms yes Forms API https://www.googleapis.com/auth/forms.body
https://www.googleapis.com/auth/forms.responses.readonly
sites yes Drive API https://www.googleapis.com/auth/drive New Google Sites are exposed as Drive files
meet yes Meet REST API https://www.googleapis.com/auth/meetings.space.created
https://www.googleapis.com/auth/meetings.space.readonly
https://www.googleapis.com/auth/meetings.space.settings
appscript yes Apps Script API https://www.googleapis.com/auth/script.projects
https://www.googleapis.com/auth/script.deployments
https://www.googleapis.com/auth/script.processes
analytics yes Analytics Admin API, Analytics Data API https://www.googleapis.com/auth/analytics.readonly GA4 account summaries + reporting
searchconsole yes Search Console API https://www.googleapis.com/auth/webmasters Search Analytics + sitemap management + URL Inspection
adsense no AdSense Management API https://www.googleapis.com/auth/adsense.readonly Consumer OAuth; explicit opt-in with --services adsense; read-only
ads no Google Ads API https://www.googleapis.com/auth/adwords Explicit opt-in with --services ads; Google may require a passkey to authorize Google Ads access
groups no Cloud Identity API https://www.googleapis.com/auth/cloud-identity.groups.readonly Workspace only
keep no Keep API https://www.googleapis.com/auth/keep Workspace only; service account (domain-wide delegation)
admin no Admin SDK Directory API https://www.googleapis.com/auth/admin.directory.user
https://www.googleapis.com/auth/admin.directory.group
https://www.googleapis.com/auth/admin.directory.group.member
Workspace only; service account with domain-wide delegation required
youtube yes YouTube Data API v3 https://www.googleapis.com/auth/youtube.readonly Most read operations also work with API key only (config youtube_api_key or GOG_YOUTUBE_API_KEY)
photos yes Photos Library API https://www.googleapis.com/auth/photoslibrary.readonly.appcreateddata Read-only app-created media only after Google Photos Library API scope changes; --photos-scope=append adds upload and album create
photospicker no Photos Picker API https://www.googleapis.com/auth/photospicker.mediaitems.readonly Consumer OAuth; explicit opt-in with --services photospicker; selected media only

Documentation

gog drive get <fileId> --fields id,trashed --json preserves "trashed": false. The default metadata also includes false starred and hasThumbnail values. Conditionally absent fields (shared, ownedByMe, writersCanShare, and hasAugmentedPermissions) and nested booleans retain the SDK's omission behavior; use gog drive raw when you need the exact API response.

gog is open source and is not affiliated with Google.

Credits

Inspired by Mario Zechner's gmcli, gccli, and gdcli.

Development

The project requires the Go version declared in go.mod.

make build
make test
make ci

See live testing for opt-in Google API smoke tests and releasing for the maintainer workflow.

License

MIT

View on GitHub

Recent activity

commits and pull requests

Recent open issues

view all

Releases and announcements

65 total
  1. v0.48.0v0.48.0Nov 5, 202612.2K downloads

    ## 0.48.0 - 2026-11-05 **Highlights:** New backups stay local until you configure a remote; existing configurations keep working. Store service-account keys in the keyring, search Gmail IDs efficiently, and use environment-backed watch tokens, with Calendar fixes and security dependency updates. The backup changes in #1303 and #1304 preserve existing saved remotes and Git origins. Gmail attachment behavior after delivery (#1300) is contributor-reported; local MIME regression tests pass. Automatic reauthorization (#1278) has synthetic regression coverage but was not tested with a live consent flow. - Backup: keep new backups local until a remote is configured; preserve saved remotes and existing Git origins, and explain local-only operation. (#1287) — thanks @NasAndNora. - Backup: allow a locally initialized backup to acquire its first configured remote without replacing an existing origin. (#1287) — thanks @NasAndNora. - Auth: add optional `auth service-account set --keyring` storage with migration back to files, isolated configuration references, and cleanup on rotation or unset; existing key files remain supported. (#1294) — thanks @tommyjoseph. - Gmail: give every outgoing

  2. v0.47.1v0.47.1Oct 27, 202617.1K downloads

    ## 0.47.1 - 2026-10-26 **Highlights:** Preserve Gmail text direction and narrowed Calendar grants, fix headless Linux authentication, and reject compromised certificates in the tracking worker. - Gmail: give the author's own text its direction in HTML (`dir="auto"` on each line of converted plain text, once around given HTML, and on the signature) so right-to-left text reads correctly and English keeps its direction when a right-to-left reply quotes it; whole HTML documents go in as given. (#1255) — thanks @malob. - Auth: use the encrypted file backend on headless Linux when D-Bus is explicitly disabled, instead of falling through to an uninitialized password store. (#1258) — thanks @pkyIntelligence. - Auth: preserve Calendar read-only scope selections during automatic reauthorization instead of requesting previously granted broader access. (#1259) — thanks @pkyIntelligence. - Security: update the tracking worker's workerd runtime to reject compromised eMudhra certificate chains. (#1264) — thanks @joshavant. - Dependencies: update Google IAM, GAX, enterprise certificate support, Workers types, Wrangler, and oxlint-tsgolint while retaining Go 1.26 and the tracking worker’s 24-

  3. v0.47.0v0.47.0Oct 23, 20267.3K downloads

    ## 0.47.0 - 2026-10-23 **Highlights:** Opt-in HTML Gmail bodies, selected search headers, and calendar settings updates, with OAuth error redaction and certificate trust fixes. - Gmail: add opt-in `--html-from-text` (or `GOG_GMAIL_HTML_FROM_TEXT`) to generate an escaped HTML alternative for plain send, reply, and draft bodies; preserve plain-text defaults and explicit HTML. (#1251) — thanks @mathieu-ships. - Gmail: expose up to 50 selected headers in message-search JSON and MCP with `--headers`, reusing existing reads and preserving sanitization and untrusted-content wrapping. (#1190, #1249) — thanks @obokaman-com. - Calendar: add `update-calendar` to inspect or patch calendar-level names, descriptions, locations, and timezones, with field validation, offline previews, and explicit optional-field clearing. (#1245) — thanks @sorenisanerd. - Auth: omit OAuth provider descriptions, URLs, and response bodies from command errors, per-item results, backup diagnostics, health checks, and watch/verbose logs; retain fixed recovery guidance, authentication exit codes, and both Calendar/Zoom rollback causes. (#1243) — thanks @pkyIntelligence. - Security: upgrade Alpine's default CA packages

  4. v0.46.0v0.46.0Oct 21, 20268.7K downloads

    ## 0.46.0 - 2026-10-20 **Highlights:** Safely re-encrypt auth stores, route Google API calls through credential-free relays, and compose richer Gmail forwards, with Go security fixes. - Auth: add `gog auth rekey <outdir>` to write and verify a separate re-encrypted directory while leaving the live keyring untouched; hold the store lock throughout, publish only complete fsynced output, and retain the old directory during installation. (#1224) — thanks @sorenisanerd. - Google APIs: add `GOG_GOOGLE_API_BASE_URL` to send `*.googleapis.com` requests to a test server, emulator, proxy, or relay that adds credentials outside gog; requests keep path and query, pass the original host as `X-Forwarded-Host`, carry no gog credentials, and refuse cross-origin redirects. (#1225, #1226) — thanks @km-tr. - Gmail: add `--note-html` and `--note-html-file` to forwards and preserve plain-note line breaks in HTML output. (#1215) — thanks @malob. - Auth: accept `gog auth <email>` as shorthand for `gog auth add <email>`; bare `gog auth` and mistyped subcommands keep their existing errors. (#1221) - Gmail: lay out the forwarded-message header block the way Gmail Web does: plain text with the sender's nam

  5. v0.45.0v0.45.0Oct 16, 202613.2K downloads

    ## 0.45.0 - 2026-10-16 **Highlights:** Preserve Gmail search results for negated and OR queries, warn about unmatched JSON selections, and improve reply formatting. - Gmail: derive `labelIds` only from system-label terms that hold for every result; a term under `NOT` or `-`, inside a negated group, or in a query with `OR`, `|` or `{…}` is left to Gmail, so `search`, `--count`, `archive`, `trash`, `mark-read`, `unread` and `autoreply` no longer silently narrow such queries. (#1212) — thanks @wstock. - Output: warn on stderr when a `--select` path matches no objects in a nonempty result, preserving JSON output and exit status. (#1210) — thanks @postoso. - Gmail: render the reply attribution line the way Gmail Web does in both text and HTML: no comma after the date, `Name <email>` (or `<email>`) with the address linked in HTML, and a narrow no-break space before AM/PM (also in forwarded `Date:` lines). (#1213) — thanks @malob. - Auth: clarify that `auth login` opens the browser account manager, and document manual authorization and unattended health checks. (#1214) — thanks @jingtying. - Dependencies: refresh Google API and MCP clients plus tracking-worker tooling within the Go 1.26

Code frequency

additions and deletions
+108.7K-108.7KWeek of 2025-12-07: +10,271 linesWeek of 2025-12-07: -263 linesWeek of 2025-12-14: +3,148 linesWeek of 2025-12-14: -73 linesWeek of 2025-12-21: +22,749 linesWeek of 2025-12-21: -4,666 linesWeek of 2025-12-28: +18,783 linesWeek of 2025-12-28: -10,099 linesWeek of 2026-01-04: +31,458 linesWeek of 2026-01-04: -4,295 linesWeek of 2026-01-11: +18,153 linesWeek of 2026-01-11: -1,976 linesWeek of 2026-01-18: +3,382 linesWeek of 2026-01-18: -560 linesWeek of 2026-01-25: +1,055 linesWeek of 2026-01-25: -381 linesWeek of 2026-02-01: +1,155 linesWeek of 2026-02-01: -205 linesWeek of 2026-02-08: +24,244 linesWeek of 2026-02-08: -3,516 linesWeek of 2026-02-15: +9,334 linesWeek of 2026-02-15: -1,325 linesWeek of 2026-02-22: +22,327 linesWeek of 2026-02-22: -403 linesWeek of 2026-03-01: +10,361 linesWeek of 2026-03-01: -1,559 linesWeek of 2026-03-08: +20,767 linesWeek of 2026-03-08: -10,498 linesWeek of 2026-03-15: +0 linesWeek of 2026-03-15: -0 linesWeek of 2026-03-22: +0 linesWeek of 2026-03-22: -0 linesWeek of 2026-03-29: +0 linesWeek of 2026-03-29: -0 linesWeek of 2026-04-05: +0 linesWeek of 2026-04-05: -0 linesWeek of 2026-04-12: +0 linesWeek of 2026-04-12: -0 linesWeek of 2026-04-19: +9,395 linesWeek of 2026-04-19: -1,792 linesWeek of 2026-04-26: +20,949 linesWeek of 2026-04-26: -3,043 linesWeek of 2026-05-03: +41,493 linesWeek of 2026-05-03: -6,458 linesWeek of 2026-05-10: +20,777 linesWeek of 2026-05-10: -3,783 linesWeek of 2026-05-17: +15,792 linesWeek of 2026-05-17: -853 linesWeek of 2026-05-24: +5,087 linesWeek of 2026-05-24: -712 linesWeek of 2026-05-31: +10,980 linesWeek of 2026-05-31: -1,560 linesWeek of 2026-06-07: +108,674 linesWeek of 2026-06-07: -56,031 linesWeek of 2026-06-14: +20,912 linesWeek of 2026-06-14: -8,816 linesWeek of 2026-06-21: +10,543 linesWeek of 2026-06-21: -382 linesWeek of 2026-06-28: +2,209 linesWeek of 2026-06-28: -78 linesWeek of 2026-07-05: +11,162 linesWeek of 2026-07-05: -1,861 linesWeek of 2026-07-12: +2,647 linesWeek of 2026-07-12: -86 linesWeek of 2026-07-19: +270 linesWeek of 2026-07-19: -16 linesWeek of 2026-07-26: +2,065 linesWeek of 2026-07-26: -508 linesWeek of 2026-08-02: +5,383 linesWeek of 2026-08-02: -5,002 linesWeek of 2026-08-09: +10,128 linesWeek of 2026-08-09: -827 linesWeek of 2026-08-16: +83 linesWeek of 2026-08-16: -11 linesWeek of 2026-08-23: +7,497 linesWeek of 2026-08-23: -856 linesWeek of 2026-08-30: +11,354 linesWeek of 2026-08-30: -1,044 linesWeek of 2026-09-06: +5,475 linesWeek of 2026-09-06: -4,172 linesWeek of 2026-09-13: +1,393 linesWeek of 2026-09-13: -154 linesWeek of 2026-09-20: +10,554 linesWeek of 2026-09-20: -1,406 linesWeek of 2026-09-27: +1,060 linesWeek of 2026-09-27: -508 linesWeek of 2026-10-04: +4,069 linesWeek of 2026-10-04: -744 linesWeek of 2026-10-11: +1,670 linesWeek of 2026-10-11: -459 linesWeek of 2026-10-18: +7,635 linesWeek of 2026-10-18: -1,099 linesWeek of 2026-10-25: +1,238 linesWeek of 2026-10-25: -423 linesWeek of 2026-11-01: +2,516 linesWeek of 2026-11-01: -536 linesWeek of 2026-11-08: +10 linesWeek of 2026-11-08: -5 linesDec 7, 2025Nov 8, 2026
+550.2K lines added, -143K removed over the last year.

Commits per week

last 52 weeks
3670Week of 2025-11-16: 0 commitsWeek of 2025-11-23: 0 commitsWeek of 2025-11-30: 0 commitsWeek of 2025-12-07: 40 commitsWeek of 2025-12-14: 19 commitsWeek of 2025-12-21: 72 commitsWeek of 2025-12-28: 77 commitsWeek of 2026-01-04: 121 commitsWeek of 2026-01-11: 91 commitsWeek of 2026-01-18: 37 commitsWeek of 2026-01-25: 16 commitsWeek of 2026-02-01: 24 commitsWeek of 2026-02-08: 51 commitsWeek of 2026-02-15: 37 commitsWeek of 2026-02-22: 8 commitsWeek of 2026-03-01: 70 commitsWeek of 2026-03-08: 105 commitsWeek of 2026-03-15: 0 commitsWeek of 2026-03-22: 0 commitsWeek of 2026-03-29: 0 commitsWeek of 2026-04-05: 0 commitsWeek of 2026-04-12: 0 commitsWeek of 2026-04-19: 58 commitsWeek of 2026-04-26: 77 commitsWeek of 2026-05-03: 52 commitsWeek of 2026-05-10: 46 commitsWeek of 2026-05-17: 51 commitsWeek of 2026-05-24: 17 commitsWeek of 2026-05-31: 130 commitsWeek of 2026-06-07: 367 commitsWeek of 2026-06-14: 77 commitsWeek of 2026-06-21: 26 commitsWeek of 2026-06-28: 10 commitsWeek of 2026-07-05: 26 commitsWeek of 2026-07-12: 6 commitsWeek of 2026-07-19: 5 commitsWeek of 2026-07-26: 9 commitsWeek of 2026-08-02: 23 commitsWeek of 2026-08-09: 23 commitsWeek of 2026-08-16: 5 commitsWeek of 2026-08-23: 29 commitsWeek of 2026-08-30: 33 commitsWeek of 2026-09-06: 23 commitsWeek of 2026-09-13: 5 commitsWeek of 2026-09-20: 30 commitsWeek of 2026-09-27: 6 commitsWeek of 2026-10-04: 12 commitsWeek of 2026-10-11: 12 commitsWeek of 2026-10-18: 21 commitsWeek of 2026-10-25: 10 commitsWeek of 2026-11-01: 17 commitsWeek of 2026-11-08: 1 commitsNov 16, 2025Nov 8, 2026
2K commits in the last 52 weeks.

When work happens

weekday and hour
SunMonTueWedThuFriSat036912151821Sun 0:00 — 15 commitsSun 1:00 — 16 commitsSun 2:00 — 14 commitsSun 3:00 — 15 commitsSun 4:00 — 16 commitsSun 5:00 — 18 commitsSun 6:00 — 9 commitsSun 7:00 — 5 commitsSun 8:00 — 3 commitsSun 9:00 — 7 commitsSun 10:00 — 4 commitsSun 11:00 — 16 commitsSun 12:00 — 4 commitsSun 13:00 — 4 commitsSun 14:00 — 5 commitsSun 15:00 — 2 commitsSun 16:00 — 12 commitsSun 17:00 — 9 commitsSun 18:00 — 19 commitsSun 19:00 — 15 commitsSun 20:00 — 10 commitsSun 21:00 — 12 commitsSun 22:00 — 11 commitsSun 23:00 — 18 commitsMon 0:00 — 17 commitsMon 1:00 — 15 commitsMon 2:00 — 20 commitsMon 3:00 — 37 commitsMon 4:00 — 15 commitsMon 5:00 — 29 commitsMon 6:00 — 24 commitsMon 7:00 — 15 commitsMon 8:00 — 15 commitsMon 9:00 — 12 commitsMon 10:00 — 16 commitsMon 11:00 — 20 commitsMon 12:00 — 13 commitsMon 13:00 — 24 commitsMon 14:00 — 20 commitsMon 15:00 — 7 commitsMon 16:00 — 8 commitsMon 17:00 — 5 commitsMon 18:00 — 4 commitsMon 19:00 — 15 commitsMon 20:00 — 11 commitsMon 21:00 — 10 commitsMon 22:00 — 13 commitsMon 23:00 — 10 commitsTue 0:00 — 8 commitsTue 1:00 — 6 commitsTue 2:00 — 9 commitsTue 3:00 — 7 commitsTue 4:00 — 9 commitsTue 5:00 — 7 commitsTue 6:00 — 8 commitsTue 7:00 — 7 commitsTue 8:00 — 17 commitsTue 9:00 — 6 commitsTue 10:00 — 9 commitsTue 11:00 — 3 commitsTue 12:00 — 2 commitsTue 13:00 — 2 commitsTue 14:00 — 1 commitsTue 15:00 — 8 commitsTue 16:00 — 8 commitsTue 17:00 — 8 commitsTue 18:00 — 5 commitsTue 19:00 — 1 commitsTue 20:00 — 5 commitsTue 21:00 — 14 commitsTue 22:00 — 6 commitsTue 23:00 — 6 commitsWed 0:00 — 5 commitsWed 1:00 — 5 commitsWed 2:00 — 3 commitsWed 3:00 — 3 commitsWed 4:00 — 3 commitsWed 5:00 — 2 commitsWed 6:00 — 5 commitsWed 7:00 — 3 commitsWed 8:00 — 7 commitsWed 9:00 — 8 commitsWed 10:00 — 4 commitsWed 11:00 — 0 commitsWed 12:00 — 2 commitsWed 13:00 — 9 commitsWed 14:00 — 2 commitsWed 15:00 — 4 commitsWed 16:00 — 5 commitsWed 17:00 — 20 commitsWed 18:00 — 12 commitsWed 19:00 — 13 commitsWed 20:00 — 15 commitsWed 21:00 — 15 commitsWed 22:00 — 9 commitsWed 23:00 — 6 commitsThu 0:00 — 7 commitsThu 1:00 — 6 commitsThu 2:00 — 2 commitsThu 3:00 — 7 commitsThu 4:00 — 5 commitsThu 5:00 — 10 commitsThu 6:00 — 4 commitsThu 7:00 — 6 commitsThu 8:00 — 7 commitsThu 9:00 — 12 commitsThu 10:00 — 11 commitsThu 11:00 — 10 commitsThu 12:00 — 16 commitsThu 13:00 — 9 commitsThu 14:00 — 5 commitsThu 15:00 — 4 commitsThu 16:00 — 4 commitsThu 17:00 — 5 commitsThu 18:00 — 5 commitsThu 19:00 — 11 commitsThu 20:00 — 9 commitsThu 21:00 — 7 commitsThu 22:00 — 0 commitsThu 23:00 — 4 commitsFri 0:00 — 10 commitsFri 1:00 — 15 commitsFri 2:00 — 9 commitsFri 3:00 — 13 commitsFri 4:00 — 26 commitsFri 5:00 — 12 commitsFri 6:00 — 22 commitsFri 7:00 — 22 commitsFri 8:00 — 21 commitsFri 9:00 — 23 commitsFri 10:00 — 38 commitsFri 11:00 — 21 commitsFri 12:00 — 22 commitsFri 13:00 — 37 commitsFri 14:00 — 31 commitsFri 15:00 — 43 commitsFri 16:00 — 31 commitsFri 17:00 — 28 commitsFri 18:00 — 24 commitsFri 19:00 — 24 commitsFri 20:00 — 23 commitsFri 21:00 — 16 commitsFri 22:00 — 15 commitsFri 23:00 — 8 commitsSat 0:00 — 10 commitsSat 1:00 — 10 commitsSat 2:00 — 14 commitsSat 3:00 — 12 commitsSat 4:00 — 10 commitsSat 5:00 — 10 commitsSat 6:00 — 15 commitsSat 7:00 — 10 commitsSat 8:00 — 10 commitsSat 9:00 — 11 commitsSat 10:00 — 10 commitsSat 11:00 — 11 commitsSat 12:00 — 9 commitsSat 13:00 — 18 commitsSat 14:00 — 14 commitsSat 15:00 — 19 commitsSat 16:00 — 20 commitsSat 17:00 — 13 commitsSat 18:00 — 11 commitsSat 19:00 — 16 commitsSat 20:00 — 19 commitsSat 21:00 — 13 commitsSat 22:00 — 18 commitsSat 23:00 — 20 commits
Commit volume by weekday and hour (UTC). Larger dots mean more commits.
DateListRankStars gained
Feb 16, 2026daily#16+167
Feb 15, 2026daily#17+215
Feb 14, 2026daily#6+258
  • avelino/awesome-go

    A curated list of awesome Go frameworks, libraries and software

    195K stars · Go

  • kubernetes/kubernetes

    Production-Grade Container Scheduling and Management

    129.3K stars · Go

  • JuliusBrussee/caveman

    why use many token when few token do trick. Skill + local proxy for coding agents: shorter answers, smaller tool output, every original recoverable.

    121.8K stars · Go

  • microsoft/TypeScript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    111.9K stars · Go

  • infiniflow/ragflow

    RAGFlow is an agent-native database: a Retrieval-Augmented Generation (RAG) engine that grew into context infrastructure.

    94.5K stars · Go

  • caddyserver/caddy

    Fast and extensible multi-platform HTTP/1-2-3 web server with automatic HTTPS

    79.2K stars · Go