# gogcli | Peter Steinberger | Knowledge Base | Instagit

Google Suite CLI: Gmail, GCal, GDrive, GContacts.

GitHub Stars: 3k

Repository: https://github.com/steipete/gogcli

---

## Articles

### [How to Export Google Drive Files in Different Formats Using gogcli](/steipete/gogcli/how-to-export-drive-files-in-different-formats-using-gogcli)

Export Google Drive files to PDF, DOCX, CSV, XLSX, PPTX, or TXT using gogcli. Learn how to convert documents, spreadsheets, and presentations with the gog docs export command.

- Tags: how-to-guide
- Published: 2026-02-19

### [gogcli Authentication for Headless Servers: Manual and Remote OAuth Flows](/steipete/gogcli/gogcli-authentication-for-headless-servers)

Learn gogcli authentication for headless servers using OAuth 2.0 offline flows. Securely exchange authorization codes for refresh tokens for automated CI pipelines or manual setup.

- Tags: how-to-guide
- Published: 2026-02-19

### [How to Use the gogcli --select Flag for JSON Field Projection: Complete Guide](/steipete/gogcli/gogcli-select-flag-for-field-projection)

Master the gogcli --select flag for JSON field projection. Learn to filter output with dot-path notation like id,name,owner.email with this complete guide.

- Tags: how-to-guide
- Published: 2026-02-16

### [List the first 20 personal contacts](/steipete/gogcli/gogcli-contacts-vs-other-contacts-vs-directory)

Explore gogcli contacts, other contacts, and directory commands to manage personal, shared, and directory profiles. Access Google People API endpoints with ease.

- Tags: how-to-guide
- Published: 2026-02-16

### [Debugging gogcli API Requests with the Verbose Flag: A Complete Guide](/steipete/gogcli/debugging-gogcli-api-requests-with-the-verbose-flag)

Debug gogcli API requests effectively using the verbose flag. Expose detailed request metadata retry attempts and authentication flow to stderr.

- Tags: how-to-guide
- Published: 2026-02-16

### [How to Configure Multiple OAuth Clients for Different Domains in gogcli](/steipete/gogcli/configure-multiple-oauth-clients-for-different-domains-in-gogcli)

Easily configure multiple OAuth clients for different domains in gogcli. Map each Google Workspace domain to a unique client ID/secret using the domain flag for automatic resolution.

- Tags: how-to-guide
- Published: 2026-02-16

### [What Is the gogcli Schema Command? A Complete Technical Guide](/steipete/gogcli/what-is-the-gogcli-schema-command)

Explore the gogcli schema command for a machine readable JSON output of all commands, flags, and arguments. Uncover your CLI's full structure.

- Tags: deep-dive
- Published: 2026-02-16

### [How to Insert Rows and Format Cells with the gogcli Sheets API](/steipete/gogcli/gogcli-sheets-api-inserting-rows-and-formatting-cells)

Learn to insert rows and format cells using the gogcli Sheets API. Easily add rows with gogcli sheets insert and customize cell styles with gogcli sheets format.

- Tags: how-to-guide
- Published: 2026-02-16

### [How to Use gogcli --json-transform and --results-only for Clean JSON Output](/steipete/gogcli/gogcli-json-transform-and-results-only)

Learn to use gogcli --json-transform and --results-only to get clean JSON output. Streamline automation by selecting specific fields for script-friendly data extraction from steipete/gogcli.

- Tags: how-to-guide
- Published: 2026-02-16

### [How to Batch Modify Gmail Labels with gogcli: Commands and Code Examples](/steipete/gogcli/batch-modifying-gmail-labels-with-gogcli)

Easily batch modify Gmail labels using gogcli commands. Learn how to add or remove labels from multiple emails with code examples and efficient API calls.

- Tags: how-to-guide
- Published: 2026-02-16

### [gogcli Agent-Friendly Shortcuts: How to Use send, ls, and search for Automation](/steipete/gogcli/gogcli-agent-friendly-shortcuts-send-ls-search)

Streamline automation with gogcli's agent-friendly shortcuts. Use send, ls, and search for JSON-friendly Gmail and Google Drive operations without nested subcommands.

- Tags: how-to-guide
- Published: 2026-02-16

### [Creating Recurring Calendar Events with Reminders in gogcli: A Complete Guide](/steipete/gogcli/creating-recurring-calendar-events-with-reminders-in-gogcli)

Master gogcli recurring calendar events. Learn to set recurrence rules with --rrule and add multiple custom alerts using the --reminder flag. Create events that work for you.

- Tags: how-to-guide
- Published: 2026-02-16

### [gogcli Auth Flags: Understanding --readonly vs --drive-scope](/steipete/gogcli/gogcli-auth-readonly-vs-drive-scope-flags)

Understand gogcli Auth flags --readonly vs --drive-scope. Learn how each flag uniquely controls Google service and Drive permissions for secure access.

- Tags: understanding
- Published: 2026-02-16

### [Secure Credential Storage and Token Refresh in gogcli: A Complete Guide](/steipete/gogcli/secure-credential-storage-and-token-refresh-in-gogcli)

Learn about secure credential storage and token refresh in gogcli. Discover how gogcli uses OS-native keyrings and automatic token validation for enhanced security.

- Tags: how-to-guide
- Published: 2026-02-16

### [Fetching Calendar Events for a Google Group's Shared Calendar with gogcli](/steipete/gogcli/fetching-calendar-events-for-a-groups-shared-calendar-with-gogcli)

Easily fetch Google Group calendar events with gogcli. Aggregate and deduplicate events from all group members into one view. Learn how to use gog calendar team now!

- Tags: how-to-guide
- Published: 2026-02-16

### [How to Use the gogcli Command Allowlist for Security](/steipete/gogcli/how-to-use-gogcli-command-allowlist-for-security)

Secure your CI pipelines with the gogcli command allowlist. Learn how to restrict CLI commands using GOG_ENABLE_COMMANDS or the enable-commands flag for enhanced security.

- Tags: how-to-guide
- Published: 2026-02-16

### [How to Configure Email Tracking with Cloudflare Workers and gogcli](/steipete/gogcli/how-to-configure-email-tracking-with-cloudflare-workers-and-gogcli)

Learn to configure email tracking with Cloudflare Workers and gogcli. Generate keys and deploy a worker to capture email open events easily.

- Tags: how-to-guide
- Published: 2026-02-16

### [How to Set Up gogcli with a Service Account and Domain-Wide Delegation](/steipete/gogcli/how-to-set-up-gogcli-with-service-account-and-domain-wide-delegation)

Learn to set up gogcli with a service account and domain-wide delegation. Impersonate Google Workspace users by configuring your service account key and using the account flag.

- Tags: how-to-guide
- Published: 2026-02-16

### [How the gogcli Gmail Watch Command Uses Pub/Sub: Implementation Guide](/steipete/gogcli/how-does-gogcli-gmail-watch-command-use-pub-sub)

Learn how gogcli Gmail watch command uses Pub/Sub to get instant email notifications. This guide details its implementation with push notifications and API calls.

- Tags: how-to-guide
- Published: 2026-02-16

### [gogcli Keyring Backend Options: How to Configure Secure Token Storage](/steipete/gogcli/what-are-the-gogcli-keyring-backend-options)

Explore gogcli keyring backend options: auto, keychain, and file. Learn how to securely store OAuth tokens on macOS, Linux, and in containers.

- Tags: how-to-guide
- Published: 2026-02-16

### [What OAuth Scopes Does gogcli Use for Gmail? A Complete Guide](/steipete/gogcli/what-oauth-scopes-does-gogcli-use-for-gmail)

Discover the OAuth scopes gogcli uses for Gmail access. Learn about full access scopes like gmail.modify and restricted gmail.readonly mode for your security.

- Tags: deep-dive
- Published: 2026-02-16

### [How to Manage Multiple Google Accounts with gogcli: A Complete Guide](/steipete/gogcli/how-to-manage-multiple-google-accounts-with-gogcli)

Efficiently manage multiple Google accounts with gogcli. Securely store OAuth tokens and switch accounts easily using the CLI. Get the complete guide today.

- Tags: how-to-guide
- Published: 2026-02-16

### [How Gogcli Implements Command Allowlisting for Sandboxed Agent Runs](/steipete/gogcli/how-does-gog-implement-command-allowlisting-for-sandboxing-agent-runs)

Learn how Gogcli implements command allowlisting for sandboxed agent runs. Secure your agent by controlling executable commands with flags or environment variables.

- Tags: internals
- Published: 2026-02-16

### [gog Keyring Backends and Cross-Platform Credential Storage: A Complete Guide](/steipete/gogcli/what-keyring-backends-does-gog-support-and-how-does-it-handle-credential-storage-across-platforms)

Explore gog's keyring backends supporting macOS Keychain Linux Secret Service Windows Credential Manager encrypted files and headless detection for secure cross-platform credential storage.

- Tags: how-to-guide
- Published: 2026-02-16

### [How Gmail Watch Pub/Sub Push Works in gogcli: A Deep Dive into the `watch serve` Command](/steipete/gogcli/how-does-gmail-watch-pub-sub-push-work-in-gog-with-the-watch-serve-command)

Learn how gogcli's `watch serve` command processes Gmail Pub/Sub push notifications. Discover the workflow from notification receipt to API fetching and webhook forwarding.

- Tags: deep-dive
- Published: 2026-02-16

### [How gog Manages Multiple Google Accounts with Isolated OAuth Clients and Automatic Selection](/steipete/gogcli/how-does-gog-handle-multiple-google-accounts-with-isolated-oauth-clients-and-automatic-account-selection)

Learn how gog manages multiple Google accounts using isolated OAuth clients and automatic selection based on email mappings and domain rules for seamless access.

- Tags: internals
- Published: 2026-02-16

### [How gog Implements Least-Privilege Authentication with `--readonly` and `--drive-scope` Flags](/steipete/gogcli/how-does-gog-implement-least-privilege-auth-with-readonly-and-drive-scope-flags)

Learn how gog implements least-privilege authentication using --readonly and --drive-scope flags for secure, granular access control. Minimize permissions effectively.

- Tags: how-to-guide
- Published: 2026-02-16

