Bloop

Bloop

  • Install
  • Docs
  • GitHub

›General

General

  • What is Bloop
  • Integration Guide

CLI

  • CLI tutorial
  • CLI --help

Build Tools

  • Overview
  • sbt
  • Maven
  • Gradle
  • Mill

IDEs

  • Overview
  • IntelliJ
  • Metals

References

  • Debugging Reference
  • Performance guide
  • Build Server
  • Built-in Launcher
  • JSON Configuration
  • Contributing Guide
Edit

Integrate with the Build Server

There are two ways to implement a client integration with Bloop's build server:

  1. via the Build Server Protocol, recommended for text editors and build tools
  2. via the Command-Line Application, recommended for lightweight clients such as scripts

Bloop architecture diagram

Note on installation requirements

Every of the above mechanisms require you to have an environment with bloop installed and a server running in the background. It's likely that won't always hold for all your users. Can you still use bloop?

The answer is yes. The Launcher Reference explains how you can use bloop's launcher to automatically install bloop and start a background server, as well as establish an open bsp connection with it. Therefore, clients that wish to integrate with bloop can provide an out-of-the-box experience to their users.

Build Server Protocol (BSP)

The Build Server Protocol is a work-in-progress protocol designed by the Scala Center and JetBrains. Bloop is the first build server to implement the protocol and provide build supports to clients such as Metals and IntelliJ

At the moment, Bloop 2.0.10 partially implements version 2.0.0-M2 and Bloop v1.0.0 implements version 1.0.0. If you want to implement a compatible build client, check out the protocol specification. As a client, the protocol gives you fine-grained build and action information and it's more suitable for rich clients such as build tools or editors.

Creating a BSP client

BSP allows clients to have fine-grained information and control about the build tool actions. For example, a client can obtain the projects in a build, inspect their metadata, trigger supported tasks such as compilation, listen to compiler diagnostics and receive task notifications.

You can implement your BSP client:

  1. via Java (ch.epfl.scala:bsp4j:2.0.0-M2) based on lsp4j
  2. via Scala (ch.epfl.scala:bsp4s:2.0.0-M2) based on lsp4s

Command-line application (CLI)

Lightweight build clients that don't need to control the output of the build server or obtain the positions of compiler diagnostics can shell out to the bloop command-line application. This simple integration is useful whenever you want to use bloop features in custom tools or scripts or when you want to prototype a quick build tool integration.

To interface with the bloop CLI, head to the CLI reference to learn all the supported commands.

Generating configuration files

You may have a simple tool that wants to use Bloop but needs to generate Bloop configuration files. For example, imagine that you are creating a small utility to run integration tests or you want to assert that a certain code snippet doesn't compile in your tests.

To use bloop in these scenarios, you need to learn how to generate Bloop configuration files. Head to the JSON Configuration Reference to learn more about what's required to generate configuration files.

Inspecting JSON files with scripts

Have you ever wanted to extract information from your build definition when writing a script for your local development, your team or your CI? With bloop you can extract this information from its configuration files via common CLI tools such as:

  1. gron to simply grep JSON files.
  2. jq to process and extract in-depth JSON data.
← What is BloopCLI tutorial →
  • Build Server Protocol (BSP)
    • Creating a BSP client
  • Command-line application (CLI)
    • Generating configuration files
    • Inspecting JSON files with scripts
BloopBloop
Overview
What is BloopIntegrate with BloopBuild ToolsContributing
Build Tools
sbtGradleMavenMill
Social
Copyright © 2025 Bloop
Credits to @freepik for svg icons
Credits to Bazel, Babel and Metals for inspiring Bloop's website design