Documentation navigation
Anybuild documentation

The Anybuild File

The editable Starlark definition that connects provider detection to execution.

Basic shape

Anybuild
load("//anybuild/tools:python.bzl", "python_build", "python_config", "python_serve")
config = python_config(    schema = 1,    commands = {"start": "python main.py"},    python_main_file = "main.py",    python_version = "3.13",    uv_version = "0.8.15",)
build = python_build(config)
python_serve(config, build, name = "my-app")

The generated config arguments record the detected project settings and pinned runtime versions. Environment variables and --config JSON are applied when the config is constructed.

Config, build, and serve functions

Each provider exposes a typed config constructor, a build function that returns steps and runtime requirements, and a serve function that assembles the final command, environment, mounts, volumes, and services.

ProviderConfig / build / serve
Pythonpython_config / python_build / python_serve
Node.jsnode_config / node_build / node_serve
Gogo_config / go_build / go_serve
PHPphp_config / php_build / php_serve
Laravellaravel_config / laravel_build / laravel_serve
WordPresswordpress_config / wordpress_build / wordpress_serve
Static Filesstaticfile_config / staticfile_build / staticfile_serve
Hugohugo_config / hugo_build / staticfile_serve
Jekylljekyll_config / jekyll_build / staticfile_serve
MkDocsmkdocs_config / mkdocs_build / staticfile_serve
Node Staticnodestatic_config / nodestatic_build / staticfile_serve

Serve overrides

All provider serve functions accept common overrides including build_pre, build_post, extra_deps, extra_env, commands, prepare, cwd, mounts, volumes, and services.

Load labels

LabelResolution
//anybuild/...:file.bzlBundled Anybuild standard library.
//pkg/path:file.bzlA file under the project root.
file.bzl or ./file.bzlRelative to the file performing the load.