Skip to main content

docs

These are the flags/commands under buck2 docs and their --help output:

buck docs

Print documentation of specified symbols

Usage: buck2-release docs [OPTIONS] <COMMAND>

Commands:
starlark Print documentation of user-defined starlark symbols
uquery Print documentation for uquery
query Print documentation for uquery
cquery Print documentation for cquery
aquery Print documentation for aquery
help Print this message or the help of the given subcommand(s)

Options:
-h, --help
Print help (see a summary with '-h')

Universal Options:
-v, --verbose <VERBOSITY>
How verbose buck should be while logging.

Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
more info about everything; 4 = more info about everything + stderr;

It can be combined with specific log items (stderr, full_failed_command, commands,
actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
"-v=1,stderr"

[default: 1]

--oncall <ONCALL>
The oncall executing this command

--client-metadata <CLIENT_METADATA>
Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
datasets

buck docs starlark

Print documentation of user-defined starlark symbols

Usage: buck2-release docs starlark [OPTIONS] [SYMBOL_PATTERNS]...

Options:
-h, --help
Print help (see a summary with '-h')

Buckconfig Options:
-c, --config <SECTION.OPTION=VALUE>
List of config options

--config-file <PATH>
List of config file paths

--fake-host <HOST>
[possible values: default, linux, macos, windows]

--fake-arch <ARCH>
[possible values: default, aarch64, x8664]

--fake-xcode-version <VERSION-BUILD>
Value must be formatted as: version-build (e.g., 14.3.0-14C18 or 14.1-14B47b)

--reuse-current-config
Re-uses any `--config` values (inline or via modefiles) if there's a previous command,
otherwise the flag is ignored.

If there is a previous command and `--reuse-current-config` is set, then the old config is
used, ignoring any overrides.

If there is no previous command but the flag was set, then the flag is ignored, the
command behaves as if the flag was not set at all.

--exit-when-different-state
Used for exiting a concurrent command when a different state is detected

Starlark Options:
--disable-starlark-types
Disable runtime type checking in Starlark interpreter.

This option is not stable, and can be used only locally to diagnose evaluation performance
problems.

--stack
Record or show target call stacks.

Starlark call stacks will be included in duplicate targets error.

If a command outputs targets (like `targets` command), starlark call stacks will be
printed after the targets.

Console Options:
--console <super|simple|...>
Which console to use for this command

[env: BUCK_CONSOLE=]
[default: auto]
[possible values: simple, simplenotty, simpletty, super, auto, none]

--ui <UI>...
Configure additional superconsole ui components.

Accepts a comma-separated list of superconsole components to add. Possible values are:

dice - shows information about evaluated dice nodes debugevents - shows information about
the flow of events from buckd

These components can be turned on/off interactively. Press 'h' for help when superconsole
is active.

Possible values:
- dice
- debugevents
- io: I/O panel
- re: RE panel

--no-interactive-console
Disable console interactions

[env: BUCK_NO_INTERACTIVE_CONSOLE=]

Event Log Options:
--event-log <PATH>
Write events to this log file

--write-build-id <PATH>
Write command invocation id into this file

--unstable-write-invocation-record <PATH>
Write the invocation record (as JSON) to this path. No guarantees whatsoever are made
regarding the stability of the format

--markdown-files-destination-dir <DESTINATION_DIR>


--markdown-files-native-subdir <NATIVE_SUBDIR>
[default: native]

--markdown-files-starlark-subdir <STARLARK_SUBDIR>
[default: starlark]

--format <FORMAT>
how to format the returned documentation

[default: json]
[possible values: json, markdown_files]

--builtins
get documentation for built in functions, rules, and providers

--prelude
get documentation for the prelude, if present

[SYMBOL_PATTERNS]...
Patterns to interpret. //foo:bar.bzl is 'every symbol in //foo:bar.bzl', //foo:bar.bzl:baz
only returns the documentation for the symbol 'baz' in //foo:bar.bzl

Universal Options:
-v, --verbose <VERBOSITY>
How verbose buck should be while logging.

Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
more info about everything; 4 = more info about everything + stderr;

It can be combined with specific log items (stderr, full_failed_command, commands,
actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
"-v=1,stderr"

[default: 1]

--oncall <ONCALL>
The oncall executing this command

--client-metadata <CLIENT_METADATA>
Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
datasets

buck docs uquery

Print documentation for uquery

Usage: buck2-release docs uquery [OPTIONS]

Options:
--format <FORMAT>
How to format the documentation

[default: rendered]
[possible values: markdown, rendered]

-h, --help
Print help (see a summary with '-h')

Universal Options:
-v, --verbose <VERBOSITY>
How verbose buck should be while logging.

Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
more info about everything; 4 = more info about everything + stderr;

It can be combined with specific log items (stderr, full_failed_command, commands,
actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
"-v=1,stderr"

[default: 1]

--oncall <ONCALL>
The oncall executing this command

--client-metadata <CLIENT_METADATA>
Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
datasets

buck docs query

Print documentation for uquery

Usage: buck2-release docs query [OPTIONS]

Options:
--format <FORMAT>
How to format the documentation

[default: rendered]
[possible values: markdown, rendered]

-h, --help
Print help (see a summary with '-h')

Universal Options:
-v, --verbose <VERBOSITY>
How verbose buck should be while logging.

Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
more info about everything; 4 = more info about everything + stderr;

It can be combined with specific log items (stderr, full_failed_command, commands,
actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
"-v=1,stderr"

[default: 1]

--oncall <ONCALL>
The oncall executing this command

--client-metadata <CLIENT_METADATA>
Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
datasets

buck docs cquery

Print documentation for cquery

Usage: buck2-release docs cquery [OPTIONS]

Options:
--format <FORMAT>
How to format the documentation

[default: rendered]
[possible values: markdown, rendered]

-h, --help
Print help (see a summary with '-h')

Universal Options:
-v, --verbose <VERBOSITY>
How verbose buck should be while logging.

Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
more info about everything; 4 = more info about everything + stderr;

It can be combined with specific log items (stderr, full_failed_command, commands,
actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
"-v=1,stderr"

[default: 1]

--oncall <ONCALL>
The oncall executing this command

--client-metadata <CLIENT_METADATA>
Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
datasets

buck docs aquery

Print documentation for aquery

Usage: buck2-release docs aquery [OPTIONS]

Options:
--format <FORMAT>
How to format the documentation

[default: rendered]
[possible values: markdown, rendered]

-h, --help
Print help (see a summary with '-h')

Universal Options:
-v, --verbose <VERBOSITY>
How verbose buck should be while logging.

Values: 0 = Quiet, errors only; 1 = Show status. Default; 2 = more info about errors; 3 =
more info about everything; 4 = more info about everything + stderr;

It can be combined with specific log items (stderr, full_failed_command, commands,
actions, status, stats, success) to fine-tune the verbosity of the log. Example usage
"-v=1,stderr"

[default: 1]

--oncall <ONCALL>
The oncall executing this command

--client-metadata <CLIENT_METADATA>
Metadata key-value pairs to inject into Buck2's logging. Client metadata must be of the
form `key=value`, where `key` is a snake_case identifier, and will be sent to backend
datasets