aspect-cli

module
v1.202449.18 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2024 License: Apache-2.0

README


title: Aspect CLI sidebar_label: Overview

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.

Why Aspect CLI?

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.

See more on our docsite: https://docs.aspect.build/cli/

Licenses

Aspect CLI OSS

Aspect CLI OSS, the open-source, open-core portion of the Aspect CLI, is found in this repository and is Apache 2 licensed.

Aspect CLI

The standard Aspect CLI is built on top of the open-source, open-core portion found is this repository and is licensed under the Aspect Community License. The parts of the Aspect CLI that are not found in this repository are closed source.

We intend for Aspect CLI to remain free for individuals (only for personal use), Small Business (fewer than 50 employees), and non-profit or academic institutions. Please contact Aspect at https://aspect.build if you would like to use the Aspect CLI and fall outside of free use.

Installation

Aspect CLI OSS

Bazelisk (MacOS / Linux / Windows)

Aspect CLI OSS 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 OSS 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.

Manual (MacOS / Linux / Windows)

On MacOS and Linux, you can download the Aspect CLI OSS 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.

Aspect CLI (standard)

Homebrew (MacOS)

To install the Aspect CLI on MacOS, you can run

brew install aspect-build/aspect/aspect

This installs the aspect command and also links it to bazel, just like the Bazelisk installer does.

Bazelisk (MacOS / Linux)

Aspect CLI can be installed in an existing Bazel workspace using Bazelisk.

From the releases page, copy the .bazeliskrc snippet into your .bazeliskrc file to install Aspect CLI OSS 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.

[!IMPORTANT] Windows releases for Aspect CLI standard will be available soon. In the meantime, please use Aspect CLI OSS releases on Windows.

Usage

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.

Write a plugin

Aspect's plugin system allows you to fit Bazel into your team's development process, with custom commands, behaviors, and integrations.

A plugin is any program (written in any language) that serves our gRPC protocol. The easiest way to get started is to clone our starter template repo.

See the Plugin Documentation for more information on how to write a plugin.

Need help or having issues?

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.

For Enterprise

Aspect CLI is built by Aspect.

See our website at http://aspect.build to learn more about our product offerings.

Directories

Path Synopsis
bazel
Variables in this file will be replaced by the linker when Bazel is run with --stamp The time should be in format '2018-12-12 12:30:00 UTC' The GitStatus should be either "clean" or "dirty" Release will be a comma-separated string representation of any tags.
Variables in this file will be replaced by the linker when Bazel is run with --stamp The time should be in format '2018-12-12 12:30:00 UTC' The GitStatus should be either "clean" or "dirty" Release will be a comma-separated string representation of any tags.
cmd
docs
bazelrc
Package bazelrc contains only generated files.
Package bazelrc contains only generated files.
gazelle
bzl
Package bzl generates a `bzl_library` target for every `.bzl` file in each package.
Package bzl generates a `bzl_library` target for every `.bzl` file in each package.
js
pkg
aspect/configure
Command gazelle is a BUILD file generator for Go projects.
Command gazelle is a BUILD file generator for Go projects.
aspect/configure/internal/wspace
Package wspace provides functions to locate and modify a bazel WORKSPACE file.
Package wspace provides functions to locate and modify a bazel WORKSPACE file.
aspect/init
init is a thin adapter for Aspect CLI to the Scaffold CLI: https://hay-kot.github.io/scaffold/
init is a thin adapter for Aspect CLI to the Scaffold CLI: https://hay-kot.github.io/scaffold/
aspect/query/shared/mock
Package mock contains generated files.
Package mock contains generated files.
aspectgrpc/mock
Package mock contains generated files.
Package mock contains generated files.
bazel
Package core contains the core Bazelisk logic, as well as abstractions for Bazel repositories.
Package core contains the core Bazelisk logic, as well as abstractions for Bazel repositories.
bazel/mock
Package mock contains generated files.
Package mock contains generated files.
bazel/workspace/mock
Package mock contains generated files.
Package mock contains generated files.
osutils/filesystem/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/client/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/sdk/v1alpha4/plugin
grpc.go hides all the complexity of doing the gRPC calls between the aspect Core and a Plugin implementation by providing simple abstractions from the point of view of Plugin maintainers.
grpc.go hides all the complexity of doing the gRPC calls between the aspect Core and a Plugin implementation by providing simple abstractions from the point of view of Plugin maintainers.
plugin/sdk/v1alpha4/plugin/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/system/bep/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/system/besproxy/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/system/mock
Package mock contains generated files.
Package mock contains generated files.
stdlib/mock
Package mock contains generated files.
Package mock contains generated files.
release

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL