@mieweb/cli
v0.3.1
Published
`mieweb` CLI — a thin, target-aware wrapper over wrangler. On the cloudflare target it delegates verbatim to the real wrangler binary; on other targets it drives the matching @mieweb adapter (e.g. the local Node host harness).
Readme
@mieweb/cli — the mieweb command
Target-aware wrapper over wrangler. On the cloudflare target (default)
most commands are forwarded verbatim to wrangler; the deploy lifecycle verbs
(deploy, dev, tail, plus login/logout/whoami, and destroy) go
through a pluggable deploy provider (@mieweb/deploy-contract) whose
Cloudflare reference implementation still delegates to wrangler — adding
structured logging, resource reporting, and auth-aware error handling around it.
On the built-in local/mieweb targets the CLI runs your unchanged worker on
the Node host harness backed by the matching adapters (a custom target with
targets[t].provider routes provider verbs through that provider instead). See
the root README for the full model.
mieweb [--target <cloudflare|local|mieweb>] <command> [...args]Images (Cloudflare Containers)
Build container images once, distribute them with skopeo (see container-plan.md).
Prerequisites: skopeo plus a builder — buildah (preferred) or docker.
brew install skopeo buildah # macOS
# apt/dnf install skopeo buildah # LinuxThe CLI reads the containers array in wrangler.jsonc (class → Dockerfile)
and the per-target registry block in mieweb.jsonc:
// mieweb.jsonc
{
"targets": {
"mieweb": {
"registry": {
"url": "cr.os.mieweb.org",
"project": "cloud-apps",
"username": "robot$cloud-apps+ci",
"authFile": "~/.config/mieweb/registry-auth.json"
}
}
}
}Commands
mieweb images build # build every containers[] image (buildah/docker)
mieweb images push --target mieweb # build + skopeo copy → registry, pin digests
mieweb images push # cloudflare target: delegates to `wrangler containers push`
mieweb images inspect CONVERTER # skopeo inspect by binding name or class name
mieweb images status # lockfile pins vs. what's live in the registry
mieweb registry login --target mieweb # skopeo login (writes authFile; password prompted, never argv)
mieweb registry logout --target miewebConventions
- Naming:
docker://<registry.url>/<project>/<class_name lowercased>:<git short SHA>, plus alatestmoving tag.projectdefaults to the wrangler appname. - Lockfile: pushes pin the manifest digest per class per target in
.mieweb/images.lock.json(commit it — it's what makes deploys reproducible).mieweb images statusreports drift between the pin and the registry'slatest. - Auth: prefer
authFile(written bymieweb registry login) over inline credentials; secrets are never passed on the command line or logged. Harbor robot accounts (robot$project+name) are the expected CI identity. - Cloudflare: the managed registry is wrangler's job —
images pushon thecloudflaretarget hands off towrangler containers pushrather than reimplementing its auth with skopeo.
