byteanvil2.4.1Sign in

CLI reference

Nine subcommands. All of them accept the global flags below and all of them write one JSON object per line to stdout under --json, with diagnostics on stderr. The exit code is the contract; the human text on stderr is not.

Global flags

FlagMeaning
--registry <url>Registry address; also ANVIL_REGISTRY in the environment.
--token <t>Access token; also ANVIL_TOKEN. Never put it in a repo .anvil.toml.
--channel <c>Default channel for the command; also ANVIL_CHANNEL.
--jsonOne JSON object per line on stdout, diagnostics on stderr.

Exit codes

Every command shares one table. Script against the number, never the message.

CodeMeans
0ok
1usage error
2coordinate already exists
3digest mismatch
4signature not trusted
5signing key rejected
6registry refused or unreachable
7empty selection

Commands

anvil push

anvil push <name>@<version> <file> [--meta k=v]... [--channel dev|staging|release]

anvil pull

anvil pull <name>@<version|channel> [--out <path>] [--no-verify]

anvil promote

anvil promote <name>@<version> --to <channel> [--pin] [--note <text>]

anvil ls

anvil ls [<name>] [--channel <channel>] [--limit <n>] [--since <date>]

anvil show

anvil show <name>@<version|channel> [--history] [--meta]

anvil verify

anvil verify <name>@<version> [--local <path>] [--key <key-id>]

anvil prune

anvil prune [<name>] [--channel <channel>] [--yes] [--keep <n>] [--older-than <span>]

anvil import

anvil import --from-dir <dir> --pattern <glob> [--name <name>] [--dry-run]

anvil serve

anvil serve --root <dir> [--listen <addr:port>] [--tls-cert <f> --tls-key <f>]