Scaffold a new Bazel workspace

Bazel has a reputation for being complicated, and one reason is that it doesn't come with reasonable default behaviors. I've written about this before, for example Since there's not much pressure on the Bazel team to improve ergonomics, even the root folder of a Bazel workspace needs at least six files to be well-formed. (Why does the Bazel version have to go in .bazelversion instead of .bazelrc for example?) As you add languages to your monorepo, you need even more boilerplate.

Aspect CLI has an init command for the purpose of making this more convenient, and I'm excited about improvements we've made to it recently. Roll the demo!


To try it out yourself, just install and run the command:

% brew install aspect-build/aspect/aspect
% aspect init

to install on other platforms, see

This scaffolding is powered by a separate GitHub repo: This way we can keep the dependencies at latest, and update the template independently from CLI releases. We plan to add a lot more features to this soon.

Note that monorepos aren't created very often; in fact the whole point is to avoid a commonly used "new project" scaffold. However even if you don't need to make your own repo, this is useful to create a minimal repro of some Bazel issue, it's great for developers who are just getting started with Bazel, and it also serves as a "kitchen sink" example of a working Bazel setup.

This is using an excellent library: Please thank and support the developer behind it:! We understand OSS is a labor of love, and want to send love back to engineers who make our lives easier.