Aspect CLI ships built-in tasks —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.
aspect build, aspect test, aspect run, aspect format, aspect lint, aspect delivery, aspect gazelle, plus aspect buildifier as a one-liner you opt into — that run on any CI system. Built-in tasks work out of the box; customize their behavior in .aspect/config.axl. Extend the CLI with your own tasks by dropping .axl files into .aspect/ — they’re auto-discovered. Invoke any task with aspect <task> in your CI YAML and it works the same whether the pipeline runs on GitHub Actions, Buildkite, GitLab, CircleCI, a self-hosted runner, or your local machine.
On Aspect Workflows self-hosted runners, tasks automatically detect the environment and configure remote caching, remote build execution, and pre-warmed NVMe output bases — no extra setup required.
Task reference
| CLI command | What it does | Guide |
|---|---|---|
aspect build | Build Bazel targets | aspect build & test |
aspect test | Run Bazel tests | aspect build & test |
aspect run | Build and run a binary target | aspect run |
aspect format | Format source files | aspect format |
aspect buildifier | Format Starlark files (opt-in via format.alias()) | aspect buildifier |
aspect lint | Run linters | aspect lint |
aspect gazelle | Generate and sync BUILD files | aspect gazelle |
aspect delivery | Deliver build artifacts | aspect delivery |
Configuration
.aspect/config.axl at the root of your repository is the central place to customize tasks and wire up task hooks. It is evaluated once per aspect <task> invocation; values can branch on environment variables, CLI flags, or any Starlark expression.
A minimal config enabling artifact uploads for CI:
.aspect/config.axl
Running tasks in CI
The sameaspect <task> command runs identically in CI and on a developer machine — no wrapper scripts, no CI-specific flags. The CLI reads the CI environment variable to activate CI-specific behaviors (remote cache usage, artifact upload, status checks).
Minimal CI example (GitHub Actions):
ASPECT_API_TOKEN in the job environment to unlock GitHub Status Checks, Buildkite Annotations, and GitLab job annotations. Without it, tasks still build and test normally. See Running tasks in CI for platform-specific pipeline YAML.
Version pinning
Pin the CLI version in.aspect/version.axl to ensure reproducible behavior:

