Documentation navigation
Anybuild documentation

How Anybuild Works

From source detection to a local process, Docker build, or Wasmer package.

The pipeline

  1. Resolve the workspace root and optional application subdirectory.
  2. Generate Anybuild file.
    • Read command hints from a Procfile and CLI overrides.
    • Score every provider and select the highest-scoring match.
    • Detect typed provider configuration and write it into the generated file.
  3. Load the Anybuild Starlark definition and apply environment and JSON config overrides.
  4. Evaluate the definition into a Serve plan.
  5. Execute build steps with a Builder backend (Local or Docker).
  6. Prepare and run a Runner backend (Local or Wasmer).

Provider selection

Anybuild evaluates providers in specificity order and chooses the highest detection score. Laravel, Hugo, MkDocs, and other specific providers can therefore win over a generic PHP, Python, Node.js, or static-file match.

Terminal
anybuild . --provider node --start

Use --provider when automatic detection is not the behavior you want.

The evaluated plan

The Starlark evaluator produces one Serve value containing ordered build steps, runtime packages, named commands, mounts, volumes, environment variables, prepare steps, and backing services.

Terminal
anybuild plan .anybuild plan . --out plan.json

State and artifacts

Operation state is scoped to .anybuild. Subdirectory apps get isolated state beneath a normalized subdirectory slug, so multiple apps in one workspace do not overwrite each other.