IMPORTANT: The Bazel docs have moved! Please update your bookmark to

You can read about the migration, and let us know what you think.

Installing Bazel using Bazelisk

This page describes how to install Bazel using Bazelisk.

Bazelisk is a launcher for Bazel which automatically downloads and installs an appropriate version of Bazel. Use Bazelisk if you need to switch between different versions of Bazel depending on the current working directory, or to always keep Bazel updated to the latest release.

You can install Bazelisk in multiple ways, including:

  • using a binary release for Linux, macOS, or Windows
  • using npm: npm install -g @bazel/bazelisk
  • using Homebrew on macOS: brew install bazelisk
  • by compiling from source using Go: go install (needs Go 1.17 or later)

For more details, see the official README.