Skip to main content
Version: 5.9.x

aspect configure

Auto-configure Bazel by updating BUILD files


configure generates and updates BUILD files from source code.

It is named after the "make configure" workflow which is typical in C++ projects, using autoconf.

configure is non-destructive: hand-edits to BUILD files are generally preserved. You can use a # keep directive to force the tool to leave existing BUILD contents alone. Run 'aspect help directives' for more documentation on directives.

So far these languages are supported:

configure is based on gazelle. We are very grateful to the authors of that software. The advantage of configure in Aspect CLI is that you don't need to compile the tooling before running it.

To change the behavior of configure, you add "directives" to your BUILD files, which are comments in a special syntax. Run 'aspect help directives' or see for more info.

aspect configure [flags]


  -h, --help          help for configure
--mode string Method for emitting merged BUILD files.
fix: write generated and merged files to disk
print: print files to stdout
diff: print a unified diff (default "fix")

Options inherited from parent commands

      --aspect:config string   User-specified Aspect CLI config file. /dev/null indicates that all further --aspect:config flags will be ignored.
--aspect:interactive Interactive mode (e.g. prompts for user input)