id = "bazel" name = "Bazel" homepage = "https://bazel.build" description = "Bazel is an open-source build and test tool similar to Make, Maven, and Gradle." icon = "SimpleIcons:bazel" executables = ["bazel", "bazelisk"] [dotfiles] # https://bazel.build/run/bazelrc — the "home bazelrc" is $HOME/.bazelrc on # Unix and %USERPROFILE%\.bazelrc on Windows, which is the same ~/.bazelrc once # the consumer resolves the home directory. The system rc # (/etc/bazel.bazelrc, %ProgramData%\bazel.bazelrc) and the workspace .bazelrc # are not user-level, so they are not listed. paths = ["~/.bazelrc"] exclude = [] # A bazelrc is a list of flags. No credentials — remote-cache auth goes through # --google_credentials / --remote_header, pointed at a file elsewhere. secret = [] # The user bazelrc is where local resource and cache tuning lands, and those # values name directories that exist only on this machine — the user put them # there deliberately, often to move gigabytes onto another volume, so they are # worth keeping to set this machine up the same way again: backup. [[dotfiles.machine_lines]] file = "~/.bazelrc" match = { prefix = ["startup --output_user_root", "build --disk_cache", "build --repository_cache"] } scope = "backup" [commands] format = 1 label = "Bazel startup options" description = "Startup options that go before the command. Use the subcommand tabs to build, test or run targets; query, clean and other commands are left out." quality = "ai-draft" base = "fig:bazel" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/bazel.ts" license = "MIT" [[commands.field]] id = "batch" label = "Batch mode" description = "Run as a client process without a server." type = "boolean" option = ["--batch"] sources = ["fig"] [[commands.field]] id = "bazelrc" label = "User bazelrc" type = "path" option = ["--bazelrc"] path = { kind = "file", role = "input" } sources = ["fig"] [[commands.field]] id = "ignore_all_rc_files" label = "Ignore all rc files" type = "boolean" option = ["--ignore_all_rc_files"] sources = ["fig"] [[commands.field]] id = "output_base" label = "Output base" description = "Where all build output is written." type = "path" option = ["--output_base"] path = { kind = "directory", role = "output" } sources = ["fig"] [[commands.field]] id = "max_idle_secs" label = "Max idle seconds" description = "Seconds the server idles before shutting down." type = "integer" option = ["--max_idle_secs"] sources = ["fig"] [[commands.task]] id = "batch" label = "Batch mode" fields = ["batch"] required = [] set = { batch = [true] } [[commands.group]] id = "basic" label = "Basic" fields = ["batch"] [[commands.group]] id = "advanced" label = "Advanced" fields = ["bazelrc", "ignore_all_rc_files", "output_base", "max_idle_secs"] [[commands.subcommand]] path = ["build"] label = "Build targets" description = "Build the specified targets. Per-command flags are not in the completion data; add them by hand." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/bazel.ts" license = "MIT" [[commands.subcommand.field]] id = "targets" label = "Targets" description = "Bazel label, for example //app:server or //..." type = "string" position = 0 multiple = true suggestions = [{ value = "//...", label = "//..." }] sources = ["fig"] [[commands.subcommand.task]] id = "build" label = "All targets" fields = ["targets"] required = ["targets"] set = { targets = ["//..."] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["targets"] [[commands.subcommand]] path = ["test"] label = "Run tests" description = "Build and run the specified test targets. Per-command flags are not in the completion data; add them by hand." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/bazel.ts" license = "MIT" [[commands.subcommand.field]] id = "targets" label = "Targets" description = "Bazel label, for example //app:server or //..." type = "string" position = 0 multiple = true suggestions = [{ value = "//...", label = "//..." }] sources = ["fig"] [[commands.subcommand.task]] id = "test" label = "All targets" fields = ["targets"] required = ["targets"] set = { targets = ["//..."] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["targets"] [[commands.subcommand]] path = ["run"] label = "Run a target" description = "Run the specified target. Per-command flags are not in the completion data; add them by hand." parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.subcommand.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/bazel.ts" license = "MIT" [[commands.subcommand.field]] id = "targets" label = "Target" description = "Bazel label, for example //app:server or //..." type = "string" position = 0 suggestions = [{ value = "//...", label = "//..." }] sources = ["fig"] [[commands.subcommand.task]] id = "run" label = "All targets" fields = ["targets"] required = ["targets"] set = { targets = ["//..."] } [[commands.subcommand.group]] id = "basic" label = "Basic" fields = ["targets"]