# Gogcli: Google Workspace Management from Your Terminal

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/openclaw-gogcli
Generated for open source discovery and AI-assisted research.

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.

GitHub: https://github.com/openclaw/gogcli
OSRepos URL: https://osrepos.com/repo/openclaw-gogcli

## 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.

## Topics

- gcal
- gcontacts
- gdrive
- gmail
- google
- Go
- CLI
- Workspace Automation

## Repository Information

Last analyzed by OSRepos: Wed Jun 24 2026 20:09:33 GMT+0100 (Western European Summer Time)
Detail views: 0
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## 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

bash
brew install openclaw/tap/gogcli
gog --version


### Docker

bash
docker run --rm ghcr.io/openclaw/gogcli:latest version


For authenticated container runs, use a persistent `GOG_HOME` directory and the encrypted file keyring:

bash
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](https://github.com/openclaw/gogcli/releases "gogcli latest release") page, extract `gog.exe`, and add its directory to your system's `PATH`.

### Build from source

bash
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:

bash
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:

bash
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:

bash
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:

bash
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 `--json` and `--plain` stdout, clear exit codes, and `--no-input` for 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 `--readonly` flags, command allow/deny rules, `--gmail-no-send`, and safety-profile binaries to prevent unintended actions.
*   **A discoverable contract**: Provides `gog schema --json` for introspection, generated reference pages, and service skills for agent workflows.

## Links

For more detailed information and comprehensive guides, refer to the official documentation:

*   [Overview](https://gogcli.sh/ "Gogcli Overview")
*   [Install Guide](https://gogcli.sh/install.html "Gogcli Install Guide")
*   [Quickstart](https://gogcli.sh/quickstart.html "Gogcli Quickstart")
*   [Command Index](https://gogcli.sh/commands/ "Gogcli Command Index")
*   [Automation Guide](https://gogcli.sh/automation.html "Gogcli Automation Guide")
*   [Auth Clients](https://gogcli.sh/auth-clients.html "Gogcli Auth Clients")
*   [GitHub Repository](https://github.com/openclaw/gogcli "Gogcli GitHub Repository")