Skip to content

Installation

Installation Methods

Build Bazelle directly from the source repository:

  1. Clone the repository

    Terminal window
    git clone https://github.com/albertocavalcante/bazelle.git
    cd bazelle
  2. Build with Bazel

    Terminal window
    bazel build //cmd/bazelle
  3. Run or install

    Terminal window
    ./bazel-bin/cmd/bazelle/bazelle_/bazelle --help

Using Bazel Run

You can run Bazelle directly through Bazel without installing it:

Terminal window
# From the bazelle repository
bazel run //cmd/bazelle -- update /path/to/your/project
# Or use the wrapper target
bazel run //:gazelle

Verifying Installation

Check that Bazelle is installed correctly:

Terminal window
bazelle version

You should see output like:

bazelle v0.1.0 (abc1234)

Dependencies

Bazelle is a self-contained Go binary with all language extensions built-in. The only external requirements are:

  • Bazel 7.0+: Required for running builds (Bazelisk recommended)
  • Go 1.21+: Only needed if building from source

Project Setup

After installing Bazelle, you can set up a new project:

Terminal window
# Navigate to your project
cd /path/to/your/project
# Initialize (creates MODULE.bazel and BUILD.bazel if needed)
bazelle init
# Generate BUILD files
bazelle update

See Configuration for details on customizing Bazelle behavior.

Editor Integration

For the best development experience, install the Bazelle extension for your editor:

  • VS Code: See the VS Code Extension documentation
  • Run Bazelle commands from the Command Palette
  • Status bar shows BUILD file status
  • Watch mode for automatic updates
  • Syntax highlighting for Starlark/BUILD files