...

Command autogazelle

autogazelle is a program that tracks changes in a workspace and runs gazelle to incorporate those changes into Bazel build files.

autogazelle has two components: a client and a server. The server watches for file system changes within the workspace and builds a set of build files that need to be updated. The server listens on a UNIX socket. When it accepts a connection, it runs gazelle in modified directories and closes the connection without transmitting anything. The client simply connects to the server and waits for the connection to be closed.

autogazelle is intended to be invoked by autogazelle.bash as a bazel wrapper script. It requires the BUILD_WORKSPACE_DIRECTORY environment variable to be set to the workspace root directory and BAZEL_REAL to be set to the local of the real bazel binary.