Stubs

Getting started

Install the CLI

stubs is Stubs's command-line tool: it pushes modules, manages dependencies, and lints, checks for breaking changes, formats and generates code, with the same checks Stubs runs on every push. It reads an existing buf.yaml as it is (see Already using buf?).

Install script (Linux and macOS)

curl -fsSL https://stubs.dev/install.sh | sh

The script downloads the release for your system, checks it against the release's checksums, and installs stubs to ~/.local/bin, with no root needed. Choose a version or a directory with options:

curl -fsSL https://stubs.dev/install.sh | sh -s -- --version 0.1.0 --dir /usr/local/bin

Homebrew (macOS)

brew install stubsdev/tap/stubs

Windows

Download the zip for your CPU from the releases page, and put stubs.exe on your PATH.

GitHub Actions

- uses: stubsdev/setup-stubs@v1
  with:
    version: 0.1.0 # or "latest" (the default)

See CI with GitHub Actions for a workflow that signs in and pushes.

Container image

docker run --rm -v "$PWD:/workspace" -w /workspace ghcr.io/stubsdev/stubs-cli:0.1.1 lint

Check it works

stubs --version

Every release is on the releases page, with checksums and signatures.