cli

module
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2022 License: Apache-2.0

README

The aspect CLI is a drop-in replacement for the bazel CLI that comes with Bazel.

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 product webpage: https://aspect.build/cli

Installation

MacOS

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.

We plan to have a standard "core" homebrew formula so this will just be brew install aspect in the future.

Bazelisk

On any platform, so long as you already have bazelisk installed, you can have bazelisk install the Aspect CLI just like it can install the standard Bazel CLI. Add this to your .bazeliskrc in your project folder to install Aspect for all developers:

BAZELISK_BASE_URL=https://github.com/aspect-build/aspect-cli/releases/download
USE_BAZEL_VERSION=aspect/5.0.1

Note that in all cases, the .bazelversion file continues to indicate which version of the Bazel tool is fetched and run beneath the wrapper.

Manual

You can manually install a binary from our GitHub Releases page and put it in your PATH.

On MacOS you can bypass the "Unknown Developer" dialog by running

xattr -c $(which aspect)

before launching aspect.

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-dev channel.

For Enterprise

aspect is sponsored by Aspect Development, a Bazel consulting company. If your organization needs more help to make your Bazel migration a success, come find us at aspect.dev

We also offer a Professional edition of the Aspect CLI. This adds features that big codebases rely on, like BUILD file generation. See our website at http://aspect.build to learn more about our 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
help/topics
Package topics contains only generated files.
Package topics contains only generated files.
pkg
aspect/configure
Command gazelle is a BUILD file generator for Go projects.
Command gazelle is a BUILD file generator for Go projects.
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/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/loader/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/sdk/v1alpha1/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/v1alpha2/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/v1alpha2/plugin/mock
Package mock contains generated files.
Package mock contains generated files.
plugin/sdk/v1alpha3/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/v1alpha3/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/mock
Package mock contains generated files.
Package mock contains generated files.
stdlib/mock
Package mock contains generated files.
Package mock contains generated files.

Jump to

Keyboard shortcuts

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