
Usage: gina image:<action> [<bundle>] @<project> [options]

Actions:

    build       Package a project bundle as a standard OCI image.
                Synthesizes a Containerfile + build context from the project's
                registered state (bundles, ports, env model, node floor) and
                executes the build with buildah — natively on Linux, or on a
                container host reached over ssh.

    help        Show this help.
    man         Show the image group manual.

Options (image:build):

    --env=<env>              Target env baked into the image (default: the
                             project's single non-dev env, e.g. prod).
                             A non-dev env ships the release tree, built
                             in-image by `gina bundle:build` (dev/prod parity).
    --scope=<scope>          Target scope (default: the project's production
                             scope for a non-dev env, else its default scope).
    --tag=<ref>              Image reference (default: <project>/<bundle>:<env>).
    --platform=<os/arch>     linux/arm64 or linux/amd64 (default: build-host
                             native). Cross-arch builds need qemu/binfmt on the
                             build host.
    --start-port-from=<n>    First in-container port (default: 3100). The
                             EXPOSEd port is computed deterministically from
                             the gina-init allocator.
    --gina-version=<v>       Framework version installed in the image
                             (default: the project's registered version).
    --emit                   Print the synthesized Containerfile, entrypoint
                             and context manifest — build nothing.
    --format=json            Machine-readable output. One-shot result:
                             { project, bundle, image, tag, imageId?,
                               durationMs, host, exposedPort }
    --stream                 NDJSON progress frames (one JSON object per line):
                             start -> step -> log* -> done | error.
                             `done` carries the one-shot shape.

Container host:

    Where the build executes, in precedence order:
      1. GINA_CONTAINER_HOST=ssh://[user@]host[:port]   (env override)
      2. native buildah                                 (Linux + buildah on PATH)
      3. container.host in ~/.gina/<shortVersion>/settings.json
    With none of the three available the command fails (exit 1) naming the
    descriptor surfaces. The remote path streams the build context as a tar
    over ssh stdin — no listening socket is ever opened.

Secrets:

    ${secret:KEY} placeholders in the project's config ride VERBATIM into the
    image and resolve from the container's environment at runtime. No secret
    value is ever read, resolved or baked at build time.

Examples:

    # Inspect the synthesized artifact without building
    gina image:build @myproject --emit

    # Production image for a single-bundle project
    gina image:build @myproject

    # Explicit bundle + env, machine-readable result
    gina image:build demo @myproject --env=prod --format=json

    # Stream progress as NDJSON (CI / GUI consumers)
    gina image:build demo @myproject --stream

    # Build on a remote Linux box
    GINA_CONTAINER_HOST=ssh://build@lin gina image:build @myproject
