This section contains language-agnostic utility rules and libraries that are useful across many Bazel projects.Documentation Index
Fetch the complete documentation index at: https://docs.aspect.build/llms.txt
Use this file to discover all available pages before exploring further.
APIs
bazel_lib
General-purpose utilities from aspect-build/bazel-lib:- copy_file - Copy a file to a new location
- copy_directory - Copy a directory tree
- copy_to_bin - Copy files to the output tree
- copy_to_directory - Copy files into a directory
- write_source_files - Write generated files back to source
- expand_template - Expand template files with substitutions
- run_binary - Run a binary as a build action
- diff_test - Test that two files are identical
- params_file - Generate parameter files
- output_files - Select specific output files from a target
- directory_path - Reference a path within a directory
- bzl_library - Declare a library of .bzl files
Data Processing
- jq - Transform JSON data using jq
- yq - Transform YAML data using yq
- tar - Create and manipulate tar archives
Formatting & Linting
- format - Multi-language code formatting
- keep_sorted - Keep lists sorted in source files
- lint_test - Run linters as tests

