gog
Generated from
gog schema --json. Do not edit this page by hand; runmake docs-commands.
Google CLI for Gmail/Calendar/Chat/Classroom/Drive/Contacts/Tasks/Sheets/Docs/Slides/People/Forms/Meet/App Script/Analytics/Search Console/Ads/Groups/Admin/Keep/YouTube/Maps/Photos
Config: file: <config-dir>/gogcli/config.json keyring backend: auto (source: default)
#Usage
gog <command> [flags]
#Subcommands
- gog admin - Google Workspace Admin (Directory API) - requires domain-wide delegation
- gog agent - Agent-friendly helpers
- gog analytics - Google Analytics
- gog appscript - Google Apps Script
- gog auth - Auth and credentials
- gog backup - Encrypted Google account backups
- gog calendar - Google Calendar
- gog chat - Google Chat
- gog classroom - Google Classroom
- gog completion - Generate shell completion scripts
- gog config - Manage configuration
- gog contacts - Google Contacts
- gog docs - Google Docs (export via Drive)
- gog download - Download a Drive file (alias for 'drive download')
- gog drive - Google Drive
- gog exit-codes - Print stable exit codes (alias for 'agent exit-codes')
- gog forms - Google Forms
- gog gmail - Gmail
- gog groups - Google Groups
- gog keep - Google Keep (Workspace only)
- gog login - Authorize and store a refresh token (alias for 'auth add')
- gog logout - Remove a stored refresh token (alias for 'auth remove')
- gog ls - List Drive files (alias for 'drive ls')
- gog maps - Google Maps
- gog me - Show your profile (alias for 'people me')
- gog meet - Google Meet
- gog open - Print a best-effort web URL for a Google URL/ID (offline)
- gog people - Google People
- gog photos - Google Photos Library API (app-created media)
- gog schema - Machine-readable command/flag schema
- gog search - Search Drive files (alias for 'drive search')
- gog searchconsole - Google Search Console
- gog send - Send an email (alias for 'gmail send')
- gog sheets - Google Sheets
- gog sites - Google Sites (Drive-backed)
- gog slides - Google Slides
- gog status - Show auth/config status (alias for 'auth status')
- gog tasks - Google Tasks
- gog time - Local time utilities
- gog upload - Upload a file to Drive (alias for 'drive upload')
- gog version - Print version
- gog whoami - Show your profile (alias for 'people me')
- gog youtube - YouTube Data API (activities, videos, playlists, comments, channels)
- gog zoom - Zoom
#Flags
| Flag | Type | Default | Help |
|---|---|---|---|
--access-token | string | Use provided access token directly (bypasses stored refresh tokens; token expires in ~1h) | |
-a--account--acct | string | Account email for API commands (gmail/calendar/chat/classroom/drive/drivelabels/docs/slides/contacts/tasks/people/sheets/forms/sites/appscript/analytics/searchconsole/ads/photos) | |
--client | string | OAuth client name (selects stored credentials + token bucket) | |
--color | string | auto | Color output: auto|always|never |
--disable-commands | string | Comma-separated list of disabled commands; dot paths allowed | |
-n--dry-run--dryrun--noop--preview | bool | Do not make changes; print intended actions and exit successfully | |
--enable-commands | string | Comma-separated list of enabled commands; dot paths allowed (restricts CLI) | |
-y--force--assume-yes--yes | bool | Skip confirmations for destructive commands | |
--gmail-no-send | bool | false | Block Gmail send operations (agent safety) |
-h--help | kong.helpFlag | Show context-sensitive help. | |
-j--json--machine | bool | false | Output JSON to stdout (best for scripting) |
--no-input--non-interactive--noninteractive | bool | Never prompt; fail instead (useful for CI) | |
-p--plain--tsv | bool | false | Output stable, parseable text to stdout (TSV; no colors) |
--results-only | bool | In JSON mode, emit only the primary result (drops envelope fields like nextPageToken) | |
--select--pick--project | string | In JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands. | |
-v--verbose | bool | Enable verbose logging | |
--version | kong.VersionFlag | Print version and exit | |
--wrap-untrusted | bool | false | In JSON/raw output, wrap fetched text fields in external untrusted-content markers |