A build system Documentation: https://buck2.build/docs/ Usage: buck2 [OPTIONS] Commands: audit Perform lower level queries aquery Perform queries on the action graph (experimental) build Build the specified targets bxl Run BXL scripts help-env Print help for environment variables used by buck2 test Build and test the specified targets cquery Perform queries on the configured target graph init Initialize a buck2 project explain Generates web browser view that shows actions that ran in the last build mapped to the target graph expand-external-cell Expand the contents of an external cell into the repo install Build and install an application kill Kill the buck daemon killall Kill all buck2 processes on the machine root Find buck cell, project or package root query Alias for `uquery` run Build and run the selected target server Start, query, and control the http server status Buckd status starlark Run Starlark operations targets Alias for `utargets` utargets Show details about the specified targets ctargets Resolve target patterns to configured targets uquery Perform queries on the unconfigured target graph completion Print completion configuration for shell docs Print documentation of specified symbols profile Run starlark profiler clean Delete generated files and caches log Commands for interacting with buck2 logs lsp Start an LSP server for starlark files subscribe Subscribe to updates from the Buck2 daemon help Print this message or the help of the given subcommand(s) Options: -h, --help Print help (see a summary with '-h') -V, --version Print version Universal Options: --isolation-dir The name of the directory that Buck2 creates within buck-out for writing outputs and daemon information. If one is not provided, Buck2 creates a directory with the default name. Instances of Buck2 share a daemon if and only if their isolation directory is identical. The isolation directory also influences the output paths provided by Buck2, and as a result using a non-default isolation dir will cause cache misses (and slower builds). [env: BUCK_ISOLATION_DIR=] [default: v2] -v, --verbose 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" [env: BUCK_VERBOSE=] [default: 1] --oncall The oncall executing this command --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 --agent-context Agent context key=value pairs for telemetry. Used by AI agents to pass structured metadata. Schema is defined via buckconfig. Entries can be comma-separated or passed as separate flags. Examples: --agent-context intent=fix,attempt=2,prior_error=missing_target --agent-context intent=build --agent-context attempt=1