Local builds, dependency management, and Elixir release builds. Owns
the build parent subcommand; container-image and chart-publish steps
are contributed by other plugins that extend the same parent
(Marea.Plugins.Docker for build docker /
build show-dockerfile / build show-docker-versions,
Marea.Plugins.Helm for build helm).
Always loaded (part of @base_plugins).
Every
buildleaf is also exposed as an MCP tool viamarea mcp serve—build_clean,build_local,build_deps,build_release, plusbuild_dockerandbuild_helmwhen their plugins are loaded. Builds are long-running but non-interactive; their stdout/stderr are captured and returned as the MCP tool result.
Commands
marea build
├── clean --mix-env <env>
├── local --mix-env <env>
├── deps --app <name|--all> --mix-env <env>
└── release --deploy <d> --release <r> --mix-env <env> [--run]--deploy and --release default to the most recently used values
(persisted in <state_dir>/last_values).
marea build clean
Removes <state_dir>/build and <state_dir>/last_values. Useful
before a clean rebuild or to reset the deploy/release defaults.
marea build local
Runs MIX_ENV=<env> mix deps.get && mix compile. The default
--mix-env is dev. Honours cmd_prefix.build.
marea build deps --app <name>
Updates one (or all, with --app --all) dependencies and re-runs
mix deps.get for the chosen MIX_ENV. Convenience for keeping
mix.lock consistent with what the docker build will use.
marea build release
Runs mix release <release> --overwrite for the deploy/release pair,
and prints a summary table:
| MIX_ENV | deploy | release | vsn |
|---|---|---|---|
| prod | staging | api | 2026_05_06-…-abcdef1 |
The release version comes from the
Marea.Plugins.Base.marea_release_vsn/0 callback — the default
implementation is <date>-<git-sha>.
If --run is passed, Marea immediately delegates to
Marea.Plugins.Run.run_cmd([:release], …) so that you build and start
the release in one go.
The build calls Lib.update_git!/0 after mix release to commit any
mix.lock change automatically — keeping the deployed image
reproducible from a clean git ref.
Public helpers
build/2— runsmix releasefor the active deploy/release, prints theBUILD <target>table, updates git, and stashestargetandgit_vsnintoconfig.values. Public so plugins that compose multi-step builds can reuse the release step. Bothmarea build docker(inMarea.Plugins.Docker) andmarea build helm(inMarea.Plugins.Helm) start with a call to it.