CLI reference¶
The CLI packages explicit inputs. It does not detect languages, infer platforms
or choose runtime images. Run brewlet --help or brewlet <command> --help for
the built-in reference.
| Command | Purpose |
|---|---|
brewlet build REF |
Validate and package application layers and launch.json into a local OCI layout. |
brewlet push REF |
Upload a local build (or any local OCI layout) to a registry without rewriting bytes. |
brewlet inspect REF |
Show the effective launch.json and layer structure of an application image. |
brewlet index REF |
Advanced: combine separately produced platform manifest descriptors into one index. |
brewlet verify REF |
Verify the structure and content of an OCI artifact graph. |
brewlet run REF |
Run a local build on an explicitly chosen runtime image with Docker or Podman. |
brewlet k8s ... |
Manage runtimes and node profiles on a Brewlet cluster: dashboard, runtime, profile, doctor. |
brewlet inventory |
Export observed workload image/runtime facts; never mutate workloads or scan CVEs. |
brewlet version |
Print the release version, source commit and native platform. |
Usage errors exit with status 2, --help with 0, and brewlet run passes the
container's exit status through.
Output formats¶
build, push, index, inspect, verify,
inventory and version print readable text by default. Add -o json (or
--output json) for indented JSON that scripts can parse:
brewlet version -o json | jq -r .version
brewlet inspect REF -o json | jq '.platforms[].launch.process'
The format is never chosen from the environment: output stays text when piped
or redirected, so scripts must request -o json explicitly. Files written by
--result, --push-result and inventory --report are always compact JSON.
brewlet k8s commands keep their own -o table|wide|json|yaml.
Build and publish¶
brewlet build registry.example.com/apps/api:v2 \
--platform linux/arm64 \
--launch launch.json \
--layer ./dependencies:/app/lib \
--layer ./src:/app/src
brewlet push registry.example.com/apps/api:v2 --push-result push.json
build never uploads; push never rebuilds. build writes to
.brewlet/images/<REF> (reference characters outside [A-Za-z0-9._-] become
_) unless --store names another layout, so add .brewlet/ to .gitignore.
push REF finds that layout again. Build options passed to push are rejected.
build option |
Contract |
|---|---|
--launch FILE |
Authoritative version-1 launch descriptor; required. |
--platform OS/ARCH[/VARIANT] |
Required explicit declaration; repeat to build a multi-platform index. |
--layer [OS/ARCH[/VARIANT]:]DIRECTORY:/app/PATH |
Explicit application payload. Every supplied layer is automatically assigned the app role. Unprefixed layers are shared by every platform; prefixed layers belong to that declared platform only. |
--store DIRECTORY |
Output layout instead of .brewlet/images/<REF>. |
--result FILE |
Also write the JSON result (reference, digest, media type, size, store). |
push option |
Contract |
|---|---|
--store DIRECTORY |
Source layout instead of .brewlet/images/<REF>; any existing OCI layout works. |
--source REF_OR_DIGEST |
Choose one root when the layout holds several; defaults to REF, then the only root. |
--push-result FILE |
Also write the JSON result (reference, digest, media type, size) to FILE. |
push verifies every blob digest before contacting the registry, then copies
bytes unchanged. It does not apply Brewlet launch/layer policy: consumers still
validate the artifact. See multi-architecture images for
platform-scoped native layers.
Command-specific options¶
| Command/options | Contract |
|---|---|
index --manifest FILE (repeatable) |
Explicit OCI platform manifest descriptors; no native-payload discovery. Prefer platform-prefixed build layers. |
--registry-scheme https, --insecure |
Explicit transport choices; HTTP is an opt-in, not an insecure-TLS mode. |
Invalid or unsupported inputs return a nonzero status; there is no success-shaped compatibility fallback.
Artifact verification and inventory¶
verify REF@sha256:DIGEST --platform OS/ARCH checks the OCI graph and the
selected platform's launch and layer contract, including referenced manifests,
configs, layers, and digests. This verifies structural integrity, not publisher
authenticity or vulnerability status.
inventory exports observed runtime bindings and a structurally verified
ApplicationReport for each application. Its report contains
schemaVersion, structural, root, manifest, config, platform,
layers, and launch. The command is read-only. Provide an
explicit kubeconfig, context, and namespaces as required by
brewlet inventory --help. Incomplete observations are reported as such.
Local testing with brewlet run¶
Run a local build on an explicitly chosen runtime image with Docker or Podman. This is a development aid: no merged application+runtime image is ever built, tagged or pushed.
brewlet run registry.example.com/apps/api:v2 --runtime java-21=eclipse-temurin:21-jre -p 8080:8080
brewlet run registry.example.com/apps/api:v2 --runtime java-21 --from-cluster -- --debug
- REF is read from the layout written by
brewlet build REF(or--store); the runtime is never guessed.--runtime IMAGE,--runtime ID=IMAGE, or--runtime ID --from-clusterto use the cluster RuntimeImage's pinnedspec.source.imageand approvedspec.user. - The container is assembled like the shim's: app layers bind-mounted read-only
at
/app, read-only root filesystem, no capabilities, no-new-privileges, and argv composed as runtimeENTRYPOINT+ launch command/args (or runtimeCMDwhen both launch fields are omitted), plusworkingDir/envover the runtime image env. The runtime image is inspected locally;--dry-runnever pulls and fails if the image is not present.-e NAME=VALUEoverrides those, except runtime-ownedPATH. ARGSafter--replacelaunch.jsonargswhile preserving itscommand, like Podargs. UID/GID 0 is refused; without--user UID:GIDor--from-clusterthe image's default user is used with a warning.--tmpfs PATHadds writable space.--platformdefaults tolinux/<host arch>;--enginedefaults to$BREWLET_CONTAINER_ENGINEordocker;--dry-runprints the engine command.
Not reproduced locally: node authorization, runtime installation and rotation,
admission defaults, exec parity, HOME synthesis for UIDs without a passwd
entry, and volume-zone rules except --tmpfs with --from-cluster.
Cluster management with brewlet k8s¶
Administrative commands for cluster operators. They use standard kubeconfig
loading ($KUBECONFIG, then ~/.kube/config); --kubeconfig and --context
may appear before or after the subcommand. -o is shorthand for --output.
| Command | Purpose |
|---|---|
dashboard [--port 8088] [--allow-write] [--namespace brewlet] |
Serve the local Brewlet Dashboard: inventory, evidence export, and optional confirmed runtime rotation. Loopback-only and read-only by default. |
dashboard --in-cluster [--public-url https://runtimes.example.com] |
Container entry point for the Helm-installed dashboard. Listens on pod interfaces and uses each caller's bearer token, not pod privileges. |
runtime list [--output table\|wide\|json\|yaml] |
RuntimeImages with approval, generation, digest, rotation and offering profiles. |
runtime status ID [--output table\|json\|yaml] |
Conditions, rotation progress, restart summary, nodes, pods and lease bindings. |
runtime add ID --image REF [--profile P ...] [--install Eager\|OnDemand] [--idle-ttl DURATION] |
Resolve tag to digest, check platforms and golden-image rules, create the RuntimeImage and place it in profiles. Also accepts --platform, --volume-mount-path, --uid, --gid, --description, --ecosystem, --abi, --skip-image-checks and --insecure. |
runtime rotate ID --image REF [--yes] |
Show affected nodes, workloads and pods, then patch spec.source.image. |
runtime remove ID [--force --yes] |
Refuse while referenced; --force removes profile entries and deletes the RuntimeImage. |
profile list [--output table\|wide\|json\|yaml] |
NodeProfiles with pool, runtimes, ready/assigned nodes and age. |
profile status NAME [--output table\|json\|yaml] |
Pool, rollout, conditions, runtimes with approval state, and the nodes the profile targets. |
profile create NAME (--pool POOL ... \| --all-nodes) --runtime ID[:INSTALL[:IDLE-TTL]] ... |
Create a NodeProfile. Also accepts --pool-key, --include-control-plane, --toleration KEY[=VALUE][:EFFECT], --max-unavailable and --containerd-restart validated\|none. |
profile delete NAME [--yes] |
Show affected nodes and pods, then delete. --yes is required when nodes are assigned or pods are running. Cleanup is asynchronous. A just-created profile can be deleted only after the operator has reconciled it. |
profile add-runtime NAME ID [--install Eager\|OnDemand] [--idle-ttl DURATION] |
Offer an approved runtime on an existing profile. |
profile remove-runtime NAME ID [--yes] |
Stop offering a runtime. A profile always keeps at least one runtime. |
doctor [--namespace brewlet] [--output table\|json] |
Check CRDs, operator/admission, RuntimeClass, approvals and profiles; nonzero exit on failure. |
Every mutating runtime and profile command accepts --dry-run and
prints the resulting manifests (YAML, or JSON with --output json) without
changing the cluster, so the output can go into a GitOps repository. rotate
and a forced remove with a non-empty impact require --yes; there is no
interactive prompt. Removal revokes new starts only: running
containers keep their leases until they exit. Editing a Helm-managed profile
prints a warning because the next upgrade will revert it.
A NodeProfile must always list at least one runtime, so profile create needs
--runtime, and a catch-all profile that selects every worker node needs an explicit
--all-nodes. A runtime that is missing or not yet approved is a warning, not an
error: the profile reports UnknownRuntimeImage until runtime add approves it.
profile does not edit an existing profile's pools, tolerations, rollout or mirrors;
use kubectl edit for those. Deleting a profile removes its runtimes from the nodes
once no pod uses them.
brewlet k8s profile create web --pool userpool --runtime python-3.12 --runtime java-25:OnDemand:72h
brewlet k8s runtime add python-3.12 --image registry.example.com/golden/python:3.12 --profile web
brewlet k8s runtime rotate python-3.12 --image registry.example.com/golden/python:3.12.7 --yes
brewlet k8s doctor
Registry access¶
The producer honors BREWLET_REGISTRY_USERNAME, BREWLET_REGISTRY_PASSWORD and
an additional CA through SSL_CERT_FILE. Credentials are origin-bound.
The release/observation commands require BREWLET_REGISTRY_ORIGIN with these
environment credentials, or --registry-auth FILE for exact-origin mappings.
Use --registry-scheme https (--registry-https for inventory) for explicit
TLS, including loopback registries. --insecure explicitly opts into HTTP; it
is not a TLS verification bypass.
Kubelet imagePullSecrets and runtime-source containerd registry configuration are separate from producer credentials. No example on this site grants blanket credential forwarding or recommends embedding secrets in artifacts.