Skip to content

[codex] add platform flag for images and runs#54

Draft
rgarcia wants to merge 1 commit into
mainfrom
codex/add-platform-flag
Draft

[codex] add platform flag for images and runs#54
rgarcia wants to merge 1 commit into
mainfrom
codex/add-platform-flag

Conversation

@rgarcia
Copy link
Copy Markdown
Contributor

@rgarcia rgarcia commented Jun 8, 2026

Summary

Adds a --platform flag to the Hypeman CLI for image creation/pull and instance creation.

This lets local macOS users exercise the Rosetta support from hypeman PR 279 directly through the CLI, for example:

hypeman run --platform linux/amd64 --hypervisor vz docker.io/library/alpine:3.19

Details

  • Adds --platform to hypeman image create and hypeman pull.
  • Adds --platform to hypeman run.
  • Threads the platform through image auto-pull during run when the image is missing.
  • Threads the platform through the final instance create request.
  • Uses the SDK's option.WithJSONSet because the currently generated hypeman-go version does not yet expose typed platform fields.

Server-side instance creation is responsible for resolving/validating the requested platform when an image tag already exists locally.

Validation

go test ./pkg/cmd ./cmd/hypeman
go build -o bin/hypeman ./cmd/hypeman
./bin/hypeman run --help | rg -n "platform|amd64"
./bin/hypeman pull --help | rg -n "platform"
./bin/hypeman image create --help | rg -n "platform"

@rgarcia rgarcia force-pushed the codex/add-platform-flag branch from ec08ca3 to f1a9bea Compare June 8, 2026 02:36
@rgarcia rgarcia force-pushed the codex/add-platform-flag branch from f1a9bea to 4a26c20 Compare June 8, 2026 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant