Marea's CLI is assembled from plugins. Every top-level command — and
many of the flags on existing ones — comes from a plugin's
Marea.Plugins.Base.marea_config_args/1 callback. This page is the index: the core
command tree, the global options shared by every leaf subcommand, and
links to each plugin's reference for the full subcommand and flag
list.
The command tree
marea
├── setup init-umbrella | init-release
├── build clean | local | deps | release (Marea.Plugins.Build, base)
│ | docker | show-dockerfile (Marea.Plugins.Docker, optional)
│ | show-docker-versions (Marea.Plugins.Docker, optional)
│ | helm (Marea.Plugins.Helm, optional)
├── run local | release | docker
├── mcp serve | tools | call (Marea.Plugins.Mcp, base)
├── schema show [--json]
├── helm chart | list | history | values | template | upgrade
│ | delete | rollback (Marea.Plugins.Helm, optional)
├── k8s describe | logs | shell | console | restart | remote
│ (Marea.Plugins.K8s, optional)
├── aws ecr {login | login-docker | list | create | delete}
│ route53 {get | list | create | delete | update-deploy-domains}
│ s3 {sync-in | sync-out} (Marea.Plugins.Aws, optional)
└── … anything contributed by plugins listed in marea.yamlsetup, build, run, mcp, schema (plus base) are part of
@base_plugins and always loaded. The build parent is owned by
Marea.Plugins.Build, but multiple plugins extend it: Docker adds
build docker / show-dockerfile / show-docker-versions, Helm adds
build helm — both opt-in. helm, k8s, aws, and any custom
plugin also live behind a plugins: entry in marea.yaml
(plugin_deps: resolves the obvious chains, e.g. listing Helm
brings in Docker and Build).
Every leaf subcommand listed above is also exposed as an MCP tool when
marea mcp serveis running — the tool name is the joined path (helm_upgrade,aws_ecr_login,build_docker, …) and its JSON-Schema input is derived from the same option/flag spec used by the CLI. See the MCP Plugin guide.
marea --help (or marea help <command>) prints the live tree for
the project — it is built from whatever plugins are loaded, so it is
always authoritative.
Global options and flags
These are added by Marea.Plugins.Base and propagated by
Marea.Config.Args into every leaf subcommand, so you can pass them
anywhere on the command line.
| Name | Default | Purpose |
|---|---|---|
--marea-dir <dir> | marea.d | Deploy assets root: the configs/, secrets/, deploys/, templates/, helms/, charts/ subtree. |
--state-dir <dir> | .marea | Runtime state dir: next_cmd, last_values, build artefacts. |
-h, --help | — | Show help for the current command (also accepted as marea help <cmd…>). |
--nopause | off | Skip the enter / Ctrl-C confirmation on destructive commands (helm upgrade, helm delete, helm rollback, Route53 changes). Useful in CI. |
Many subcommands also share a smaller set of common options provided
by Marea.Config.Args and reused across plugins:
| Name | Provided by | Purpose |
|---|---|---|
-d, --deploy <DEPLOY> | deploy_option/0 | Which deploys.<name> block to act on. Defaults to the last value used. |
-r, --release <RELEASE> | release_option/0 | Which releases.<name> block to act on. Defaults to the last value used. |
--mix-env <MIX_ENV> | mix_env_option/1 | MIX_ENV for build/run; default depends on the command. |
--cookie <COOKIE> | cookie_option/0 | Erlang cookie for run and remote IEx attach. Default marea_cookie. |
--pos <N> | pos_option/0 | Relative index when running multiple instances side-by-side. Default 0. |
Marea remembers the last --deploy and --release you used in
<marea_dir>/last_values and reuses them as defaults — most
follow-up commands need neither.
Per-plugin commands
Each plugin's reference page lists every subcommand it contributes, the flags and options it accepts, and the YAML schema fields it adds. Start here:
| Plugin | Status | Top-level command(s) | Reference |
|---|---|---|---|
Marea.Plugins.Base | base | marea schema show (plus the shared callbacks and global options/flags) | base.md |
Marea.Plugins.Setup | base | marea setup init-umbrella, marea setup init-release | setup.md |
Marea.Plugins.Build | base | marea build clean / local / deps / release | build.md |
Marea.Plugins.Run | base | marea run local / release / docker | run.md |
Marea.Plugins.Mcp | base | marea mcp serve / tools / call (and exposes every other leaf subcommand as an MCP tool) | mcp.md |
Marea.Plugins.Docker | optional | marea build docker / show-dockerfile / show-docker-versions (extend build) and the docker: / release type: schema | docker.md |
Marea.Plugins.Helm | optional | marea helm chart / list / history / values / template / upgrade / delete / rollback, plus marea build helm | helm.md |
docker.python (Marea.Plugins.Docker.Python) | optional | (no commands) — adds releases.<r>.docker.python: and a Python venv to the generated Dockerfile | docker-python.md |
Marea.Plugins.K8s | optional | marea k8s describe / logs / shell / console / restart / remote | k8s.md |
Marea.Plugins.Aws | optional | marea aws ecr / route53 / s3 (and the top-level aws: schema field) | aws.md |
Each plugin doc follows the same shape: a "Commands" tree, one
section per subcommand with its options and flags, and the schema
fields it adds to marea.yaml.
Adding your own commands
A plugin can contribute three things to the CLI:
- A new top-level command (or subcommand under an existing one),
added through
Marea.Config.Args.add_subcommands/2inside itsMarea.Plugins.Base.marea_config_args/1callback. - An extra flag or option on an existing command, by enriching
the same
argsmap (listing your plugin before the one you want to influence inplugins:so it sees the chain first). The same merge rules let several plugins extend a shared parent — that's howBuild,Docker, andHelmall contribute children underbuild. - Extra global options/flags, by setting
global: trueon the spec —Args.build_optimus/1injects globals into every leaf subcommand automatically.
Command dispatch goes through the Marea.Plugins.Base.marea_cmd/2 chain: each plugin
either matches a command prefix (e.g. [:helm | rest]) or returns
:cont to pass control on. The full callback shape, return values,
and chain ordering rules are documented in
Plugin Development, and the underlying
mechanism in Architecture.
Where to go next
- Plugin Development — write a plugin that contributes commands, flags, or schema fields.
- Architecture — how
Marea.Plugins.Base.marea_config_args/1andMarea.Plugins.Base.marea_cmd/2actually compose. - marea.yaml Reference — the config that drives the commands listed above.