update
Generate and update BUILD files for your project. Learn more →
Bazelle provides a command-line interface for generating and managing Bazel BUILD files.
update
Generate and update BUILD files for your project. Learn more →
fix
Fix BUILD files, potentially making breaking changes. Learn more →
init
Initialize a new Bazel project with Gazelle support. Learn more →
watch
Watch for file changes and auto-update BUILD files. Learn more →
daemon
Manage the background daemon for improved performance. Learn more →
These flags are available for all commands:
-v, --verbosity int Verbosity level (default 1) 0 = error only 1 = warnings 2 = info 3 = debug 4 = trace
--log-format Log format: text (default) or jsonbazelle [command] [flags] [path...]# Update BUILD files in current directorybazelle update
# Update specific directorybazelle update ./src
# Check if BUILD files are up to date (CI)bazelle update --check
# Initialize a new projectbazelle init
# Watch for changes during developmentbazelle watch
# Start daemon for improved performancebazelle daemon start
# Check daemon statusbazelle daemon status
# Show versionbazelle version| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Error or changes needed (with --check) |
Unknown flags are passed through to the underlying Gazelle binary:
# Pass Gazelle-specific flagsbazelle update -go_prefix=github.com/org/repo
# Run in bzlmod mode (passed to gazelle)bazelle update -bzlmod# Show helpbazelle --helpbazelle help
# Command-specific helpbazelle update --helpbazelle fix --help