Reference

`gog docs format`

gog docs format

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

Apply text or paragraph formatting to a Google Doc

#Usage

gog docs (doc) format <docId> [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
--alignmentstringParagraph alignment: left, center, right, justify, start, end, justified
--batchstringAppend requests to a persisted Docs batch instead of submitting
--bg-colorstringText background color as #RRGGBB or #RGB
--boldboolSet bold
--bullet-presetstringCreate a list with a Google Docs bullet glyph preset
--bulletsboolCreate a bulleted list with the default disc preset
--clientstringOAuth client name (selects stored credentials + token bucket)
--codeboolApply code style (Courier New + grey background)
--colorstringautoColor output: auto|always|never
--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 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
--font-familystringFont family, for example Arial or Georgia
--font-sizefloat64Font size in points
-y
--force
--assume-yes
--yes
boolSkip confirmations for destructive commands
--gmail-no-sendboolfalseBlock Gmail send operations (agent safety)
--heading-level*intSet paragraph named style to HEADING1..HEADING6 (shortcut for --named-style=HEADING_N)
-h
--help
kong.helpFlagShow context-sensitive help.
--homestringOverride gogcli config/data/state/cache root (equivalent to GOG_HOME)
--indent-end*float64Paragraph end indentation in points
--indent-first-line*float64Paragraph first-line indentation in points
--indent-start*float64Paragraph start indentation in points
--italicboolSet italic
-j
--json
--machine
boolfalseOutput JSON to stdout (best for scripting)
--keep-lines-together*boolKeep all paragraph lines on one page or column when possible; use --no-keep-lines-together to clear
--keep-with-next*boolKeep the paragraph with the next paragraph when possible; use --no-keep-with-next to clear
--line-spacingfloat64Paragraph line spacing percentage, for example 100 or 150
--linkstringSet hyperlink target (http://, https://, mailto:, #bookmarkId, or #heading-slug)
--matchstringOnly format the first text match
--match-allboolFormat all matches instead of only the first
--match-caseboolUse case-sensitive matching with --match
--named-stylestringSet paragraph named style: NORMALTEXT, TITLE, SUBTITLE, HEADING1..HEADING_6
--no-boldboolClear bold
--no-bulletsboolRemove bullets or numbering
--no-input
--non-interactive
--noninteractive
boolNever prompt; fail instead (useful for CI)
--no-italicboolClear italic
--no-linkboolClear hyperlink
--no-strikethrough
--no-strike
boolClear strikethrough
--no-underlineboolClear underline
--orderedboolCreate a numbered list with the default decimal preset
-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
--results-onlyboolIn JSON mode, emit only the primary result (drops envelope fields like nextPageToken)
--segmentstringTarget an exact header, footer, or footnote segment ID
--select
--pick
--project
stringIn JSON mode, select comma-separated fields (best-effort; supports dot paths). Desire path: use --fields for most commands.
--space-above*float64Space above the paragraph in points
--space-below*float64Space below the paragraph in points
--strikethrough
--strike
boolSet strikethrough
--tabstringTarget a specific tab by title or ID (see docs list-tabs)
--text-colorstringText color as #RRGGBB or #RGB
--underlineboolSet underline
-v
--verbose
boolEnable verbose logging
--versionkong.VersionFlagPrint version and exit
--wrap-untrustedboolfalseIn JSON/raw output, wrap fetched text fields in external untrusted-content markers

#See Also