Co-authored-by: Ali Karbassi <ali@karbassi.com> Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
3.7 KiB
3.7 KiB
gog gmail
Generated from
gog schema --json. Do not edit this page by hand; runmake docs-commands.
Gmail
Usage
gog gmail (mail,email) <command> [flags]
Parent
Subcommands
- gog gmail archive - Archive messages (remove from inbox)
- gog gmail attachment - Download a single attachment
- gog gmail autoreply - Reply once to matching messages
- gog gmail batch - Batch operations (permanent delete requires broader Gmail scope; use gmail trash for normal trashing)
- gog gmail drafts - Draft operations
- gog gmail forward - Forward a message to new recipients
- gog gmail get - Get a message (full|metadata|raw)
- gog gmail history - Gmail history
- gog gmail labels - Label operations
- gog gmail mark-read - Mark messages as read
- gog gmail messages - Message operations
- gog gmail raw - Dump raw Gmail API response as JSON (Users.Messages.Get; lossless; for scripting and LLM consumption)
- gog gmail search - Search threads using Gmail query syntax
- gog gmail send - Send an email
- gog gmail settings - Settings and admin
- gog gmail thread - Thread operations (get, modify)
- gog gmail track - Email open tracking
- gog gmail trash - Move messages to trash
- gog gmail unread - Mark messages as unread
- gog gmail url - Print Gmail web URLs for threads
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/docs/slides/contacts/tasks/people/sheets/forms/appscript/ads) | |
--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 |