COCKROACH-SQLFMT(1)

NAME

cockroach-sqlfmt - format SQL statements

SYNOPSIS

cockroach sqlfmt [flags]

DESCRIPTION

Formats SQL statements from stdin to line length n.

OPTIONS

--align[=false]

Align the output.

-e, --execute=

Execute the SQL statement(s) on the command line, then exit. This flag may
 be specified multiple times and each value may contain multiple semicolon
 separated statements. If an error occurs in any statement, the command exits
 with a non-zero status code and further statements are not executed. The
 results of each SQL statement are printed on the standard output. This flag
 is incompatible with --file / -f.

-h, --help[=false]
    help for sqlfmt

--no-simplify[=false]

Don't simplify output.

--print-width=60

The line length where sqlfmt will try to wrap.

--tab-width=4

Number of spaces per indentation level.

--use-spaces[=false]

Indent with spaces instead of tabs.

OPTIONS INHERITED FROM PARENT COMMANDS

--enterprise-require-fips-ready[=false]
    abort if FIPS readiness checks fail

--log=

Logging configuration, expressed using YAML syntax. For example, you can
 change the default logging directory with: --log='file-defaults: {dir: ...}'.
 See the documentation for more options and details. To preview how the log
 configuration is applied, or preview the default configuration, you can use
 the 'cockroach debug check-log-config' sub-command.

--log-config-file=

File name to read the logging configuration from. This has the same effect as
 passing the content of the file via the --log flag.

--log-config-vars=[]

Environment variables that will be expanded if present in the body of the
 logging configuration.

--log-dir=

--log-dir=XXX is an alias for --log='file-defaults: {dir: XXX}'.

--logtostderr[=UNKNOWN]

--logtostderr=XXX is an alias for --log='sinks: {stderr: {filter: XXX}}'. If
 no value is specified, the default value for the command is inferred: INFO for
 server commands, WARNING for client commands.

--redactable-logs=false

--redactable-logs=XXX is an alias for --log='file-defaults: {redactable:
 XXX}}'.

--vmodule=
    comma-separated list of pattern=N settings for file-filtered logging (significantly hurts performance)

SEE ALSO

cockroach(1)

HISTORY

13-May-2026 Auto generated by spf13/cobra