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.
| Provider | Config / build / serve |
|---|---|
| Python | python_config / python_build / python_serve |
| Node.js | node_config / node_build / node_serve |
| Go | go_config / go_build / go_serve |
| PHP | php_config / php_build / php_serve |
| Laravel | laravel_config / laravel_build / laravel_serve |
| WordPress | wordpress_config / wordpress_build / wordpress_serve |
| Static Files | staticfile_config / staticfile_build / staticfile_serve |
| Hugo | hugo_config / hugo_build / staticfile_serve |
| Jekyll | jekyll_config / jekyll_build / staticfile_serve |
| MkDocs | mkdocs_config / mkdocs_build / staticfile_serve |
| Node Static | nodestatic_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
| Label | Resolution |
|---|---|
| //anybuild/...:file.bzl | Bundled Anybuild standard library. |
| //pkg/path:file.bzl | A file under the project root. |
| file.bzl or ./file.bzl | Relative to the file performing the load. |