llms.txt: machine-readable documentation index. Markdown version of this page is also available.

IntelliJ IDEA 2026.3 Help

Bazel project view

A Bazel project view is a configuration used by IntelliJ IDEA to:

  • Decide which parts of a Bazel workspace to import/index

  • Decide which Bazel targets to sync for features, such as code navigation, completion, run configurations, and tests

  • Apply Bazel flags and other settings to the sync and build actions initiated from IntelliJ IDEA.

Bazel project view prevents pulling the entire Bazel workspace when you only need one or several subtrees. It does not change the way Bazel works, but rather scopes the work Bazel and IntelliJ IDEA do. This improves the performance and makes the project easier to work with.

Project view configuration

The project view is configured in a .bazelproject file. You might have several such files located anywhere in your project. For information on file syntax, refer to .bazelproject file reference.

If you are unsure where the currently active project view is configured, the IDE can bring you to the corresponding file.

Select a project view

When there are multiple project views in a workspace, you can switch between them.

  • From the Project tool window: right-click a .bazelproject file and select Load Project View.

  • From settings Ctrl+Alt+S: go to Build, Execution, Deployment | Build Tools | Bazel, then enter the path to the .bazelproject file in the Project View Path field.

.managed.bazelproject

There is a special type of .bazelproject file that is checked into your repo and owned by repo maintainers. To define a central template, place it in tools/intellij/.managed.bazelproject. It is used to provide a default minimal view for scenarios such as large repos and short-lived remote development environments.

Here is a short summary of the differences between the two types of project views:

.managed.bazelproject

.bazelproject

Purpose

A canonical, centrally maintained project view template for your organization/repo.

The concrete project view that IntelliJ IDEA actually reads when indexing/building.

Location

Under your repo, typically at tools/intellij/.managed.bazelproject

Generated inside your checkout at .bazelbsp/.bazelproject

Ownership

Maintained by the repo (code owners, build team).

Per-user, per-working-copy artifact created by the plugin.

VCS

Committed to VCS.

Usually NOT committed; treated as a generated file.

Intended edits

You generally do not edit this locally unless you are changing the shared template for everyone .

You can make local tweaks here, but they are not shared with others.

When you open a new project that has a .managed.bazelproject file, IntelliJ IDEA will generate a .bazelproject file based on it.

The precedence order for project view resolution is:

  • {project root}/.bazelproject

  • managed.bazelproject is copied to {project root}/.bazelbsp/.bazelproject – configurable via Settings | Build, Execution, Deployment | Build Tools | Bazel

  • default {project root}/bazelbsp/.bazelproject is created with the following settings:

    derive_targets_from_directories: true directories: .
10 November 2026