Reference

`gog drive changes serve`

gog drive changes serve

Generated from gog schema --json. Do not edit this page by hand; run make docs-commands.

Receive Drive change notifications and run a local hook

#Usage

gog drive (drv) changes serve --state-file=STRING [flags]

#Parent

#Flags

FlagTypeDefaultHelp
--access-tokenstringUse provided access token directly (bypasses stored refresh tokens; token expires in ~1h)
-a
--account
--acct
stringAccount email, alias, or auto for authenticated Google API commands
--auto-renewboolCreate and renew the Drive notification channel
--certstringTLS certificate path; pair with --key (omit behind an HTTPS reverse proxy)
--channel-tokenstringExpected X-Goog-Channel-Token value
--channel-token-filestringRead the expected channel token from a file
--channel-ttltime.Duration24hRequested channel lifetime
--clientstringOAuth client name (selects stored credentials + token bucket)
--colorstringautoColor output: auto|always|never
--disable-commandsstringComma-separated list of disabled commands; dot paths allowed
--drive
--drive-id
stringShared drive ID for a shared-drive change log
-n
--dry-run
--dryrun
--noop
--preview
boolDo not make changes; print intended actions and exit successfully
--enable-commandsstringComma-separated list of enabled command prefixes; dot paths allowed (restricts CLI)
--enable-commands-exactstringComma-separated list of exact enabled commands; dot paths allowed and parent commands do not enable children
--filter-filestringOnly invoke the hook for changes to this file ID
-y
--force
--assume-yes
--yes
boolSkip confirmations for destructive commands
--gmail-no-sendboolfalseBlock Gmail send operations (agent safety)
-h
--help
kong.helpFlagShow context-sensitive help.
--homestringOverride gogcli config/data/state/cache root (equivalent to GOG_HOME)
--include-removedbooltrueInclude removed changes
-j
--json
--machine
boolfalseOutput JSON to stdout (best for scripting)
--keystringTLS private key path; pair with --cert
--listenstring127.0.0.1:8443Listen address
--max
--limit
int64100Max changes per API page
--no-input
--non-interactive
--noninteractive
boolNever prompt; fail instead (useful for CI)
--notification-timeouttime.Duration5mMaximum time for one callback, including Drive reads and the hook
--on-changestringTrusted local shell command run for each non-empty change batch; event JSON is provided on stdin
--pathstring/drive-changesNotification handler path
-p
--plain
--tsv
boolfalseOutput stable, parseable text to stdout (TSV; no colors)
--readonlyboolfalseBlock mutating API requests at runtime; auth add also requests read-only OAuth scopes
--renew-beforetime.Duration10mRenew this long before channel expiration
--results-onlyboolIn JSON mode, emit only the primary result (drops envelope fields like nextPageToken)
--select
--pick
--project
stringIn JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands.
--state-filestringJSON file that stores the current Drive page token and channel state
--tokenstringInitial Drive page token when creating a new state file
-v
--verbose
boolEnable verbose logging
--versionkong.VersionFlagPrint version and exit
--webhook-urlstringPublic HTTPS callback URL used by --auto-renew
--wrap-untrustedboolfalseIn JSON/raw output, wrap fetched text fields in external untrusted-content markers

#See Also