Documentation navigation
Anybuild documentation

Installing Additional Packages

Add project dependencies, build tools, or runtime packages at the correct layer.

Prefer project manifests

Application libraries belong in the project's normal manifest—such as package.json, pyproject.toml, requirements.txt, composer.json, or go.mod. Anybuild's providers detect and install those manifests using the selected package manager.

Provider-specific extras

Providers expose separate dependency fields to avoid collisions when their configurations are composed. python_extra_dependencies adds Python packages with uv, while node_extra_dependencies exposes additional Anybuild packages to Node.js build steps.

Terminal
ANYBUILD_PYTHON_EXTRA_DEPENDENCIES='["orjson"]' anybuild . --provider python --start

Build-time and runtime packages

In Starlark, use(dep(...)) exposes a package to following build steps. extra_deps adds packages needed by the running application. Declare both when a tool is required in both phases.

Anybuild
load("//anybuild/tools:node.bzl", "node_build", "node_config", "node_serve")
config = node_config(    schema = 1,    node_server = "node",    node_version = "24",)
build = node_build(config)
node_serve(    config,    build,    build_pre = [use(dep("ffmpeg"))],    extra_deps = [dep("ffmpeg")],)