Reference

`gog upload`

gog upload

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

Upload a file to Drive (alias for 'drive upload')

#Usage

gog upload (up,put) <localPath> [flags]

#Parent

#Flags

FlagTypeDefaultHelp
--access-tokenstringUse provided access token directly (bypasses stored refresh tokens; token expires in ~1h)
-a
--account
--acct
stringAccount email for API commands (gmail/calendar/chat/classroom/drive/docs/slides/contacts/tasks/people/sheets/forms/appscript/ads)
--clientstringOAuth client name (selects stored credentials + token bucket)
--colorstringautoColor output: auto|always|never
--convertboolAuto-convert to native Google format based on file extension (create only)
--convert-tostringConvert to a specific Google format: doc|sheet|slides (create only)
--disable-commandsstringComma-separated list of disabled commands; dot paths allowed
-n
--dry-run
--dryrun
--noop
--preview
boolDo not make changes; print intended actions and exit successfully
--enable-commandsstringComma-separated list of enabled commands; dot paths allowed (restricts CLI)
-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.
-j
--json
--machine
boolfalseOutput JSON to stdout (best for scripting)
--keep-frontmatterboolKeep YAML frontmatter (---) in Markdown when converting to a Google Doc (--convert or --convert-to doc; default: strip)
--keep-revision-foreverboolKeep the new head revision forever (binary files only)
--mime-typestringOverride MIME type inference
--namestringOverride filename (create) or rename target (replace)
--no-input
--non-interactive
--noninteractive
boolNever prompt; fail instead (useful for CI)
--parentstringDestination folder ID (create only)
-p
--plain
--tsv
boolfalseOutput stable, parseable text to stdout (TSV; no colors)
--replacestringReplace the content of an existing Drive file ID (preserves shared link/permissions)
--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.
-v
--verbose
boolEnable verbose logging
--versionkong.VersionFlagPrint version and exit

#See Also