Important
Maintenance Mode Notice
This repository contains the legacy Go implementation of the Aspect CLI and is now in maintenance mode. It has been superseded by a new Rust-based version available at https://github.com/aspect-build/aspect-cli.
Aspect CLI (aspect
) is wrapper for Bazel, built on top of Bazelisk, that adds additional features and extensibility to the popular polyglot build system from Google.
Every organization has a different engineering culture and developer stack.
Bazel was designed for Google's workflows, not yours.
Many companies have found they have to write a wrapper around Bazel.
This starts out as a small need to shim something in the developer workflow, and is often an
untested Bash script living in /tools/bazel
which Bazelisk understands as a wrapper script.
Over time, the wrapper accumulates more code, and is a constant source of developer distress.
Aspect CLI is Apache 2 licensed.
Aspect CLI can be installed in an existing Bazel workspace using Bazelisk.
Note
This approach doesn't provide the aspect init
command, which has to run outside a Bazel workspace.
From the OSS releases page,
copy the .bazeliskrc
snippet into your .bazeliskrc
file to install Aspect CLI for all developers in the target repository.
The underlying version of Bazel can be configured in your .bazelversion
file or the BAZEL_VERSION
environment variable.
To install the Aspect CLI on MacOS, you can run
brew install aspect-build/aspect/aspect-legacy
This installs the aspect
command and also links it to bazel
, just like the Bazelisk installer does.
On MacOS and Linux, you can download the Aspect CLI aspect
binary for your platform on our
Releases page and add it to your PATH
manually.
Note, if you manually install for MacOS, you can bypass the "Unknown Developer" dialog by running
xattr -c $(which aspect)
before launching aspect
.
Just run aspect help
to see the available commands.
Some are the standard ones you know from Bazel, and others are new, such as print
and docs
.
If you think you've hit a bug please file a Bug Report.
You can also find us on Bazel Slack on the #aspect-build channel.
Aspect CLI is built by Aspect.
See our website at http://aspect.build to learn more about our product offerings.