Gogcli: Google Workspace Management from Your Terminal
This repository profile is provided by osrepos.com, an open source repository discovery platform.
Summary
Gogcli is a powerful command-line interface for Google Workspace, allowing users to manage Gmail, Calendar, Drive, Docs, Sheets, and many other services directly from their terminal. It is designed for both interactive use and robust automation, providing predictable output, agent safety features, and support for multiple accounts.
Repository Information
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Gogcli, also known as gog, is a command-line interface (CLI) that brings Google Workspace to your terminal. It provides a single binary to manage a wide array of Google services, including Gmail, Calendar, Drive, Docs, Sheets, Slides, Forms, Meet, Apps Script, Analytics, Search Console, Contacts, Tasks, Classroom, Chat, and YouTube. Designed for individuals, scripts, CI/CD pipelines, and coding agents, gog focuses on task-first commands and predictable automation.
Installation
Installing gogcli is straightforward, with options for various operating systems and environments.
Homebrew
brew install openclaw/tap/gogcli
gog --version
Docker
docker run --rm ghcr.io/openclaw/gogcli:latest version
For authenticated container runs, use a persistent GOG_HOME directory and the encrypted file keyring:
docker volume create gogcli-state
docker run --rm -it \
-e GOG_HOME=/persist/gogcli \
-e GOG_KEYRING_BACKEND=file \
-e GOG_KEYRING_PASSWORD \
-v gogcli-state:/persist/gogcli \
ghcr.io/openclaw/gogcli:latest \
auth add you@gmail.com --services gmail,calendar,drive
Windows
Download gogcli_<version>_windows_amd64.zip or gogcli_<version>_windows_arm64.zip from the latest release page, extract gog.exe, and add its directory to your system's PATH.
Build from source
git clone https://github.com/openclaw/gogcli.git
cd gogcli
make
./bin/gog --version
Source builds require the Go version declared in go.mod.
Examples
gogcli offers a rich set of commands for daily tasks and automation across Google services. Here are a few examples:
Gmail
Search mail and get sanitized message content for scripts:
gog gmail search 'from:boss newer_than:30d' --json
gog gmail get <messageId> --sanitize-content --json
Calendar
List today's events and create a new one:
gog calendar events --today
gog calendar create --summary "Review" \
--from "2026-05-06T10:00:00+02:00" \
--to "2026-05-06T10:30:00+02:00"
Drive
Perform read-only folder audits:
gog drive tree --parent <folderId> --depth 2
gog drive audit sharing --parent <folderId> --internal-domain example.com --json
Docs
Append Markdown content to a Google Doc:
gog docs write <docId> --append --markdown --text '## Status'
Why Use Gogcli?
Gogcli goes beyond merely exposing Google APIs, it builds upon them to provide a robust and durable CLI experience. Key benefits include:
- Task-first workflows: It focuses on real-world tasks like searching and sanitizing mail, resolving calendar names, auditing Drive sharing, editing Docs, and managing Workspace users.
- Automation that composes: Offers stable
--jsonand--plainstdout, clear exit codes, and--no-inputfor seamless integration into CI/CD and scripts. - Many identities, one install: Supports various authentication methods, including account aliases, named OAuth clients, direct access tokens, and Workspace service accounts.
- Agent safety with explicit boundaries: Features runtime
--readonlyflags, command allow/deny rules,--gmail-no-send, and safety-profile binaries to prevent unintended actions. - A discoverable contract: Provides
gog schema --jsonfor introspection, generated reference pages, and service skills for agent workflows.
Links
For more detailed information and comprehensive guides, refer to the official documentation:
Source repository
Open the original repository on GitHub.