Skip to content

feat(cli): add --rootfs flag to run/create command [WIP]#549

Open
ruilong1999 wants to merge 4 commits into
boxlite-ai:mainfrom
ruilong1999:feat/449-cli-rootfs-flag
Open

feat(cli): add --rootfs flag to run/create command [WIP]#549
ruilong1999 wants to merge 4 commits into
boxlite-ai:mainfrom
ruilong1999:feat/449-cli-rootfs-flag

Conversation

@ruilong1999
Copy link
Copy Markdown

Close #449

Added --rootfs flag to the CLI run/create command to allow users
to specify a custom root filesystem path.

ruilong1999 and others added 4 commits May 18, 2026 08:14
Adds RootfsFlags carrying optional IMAGE positional and optional
--rootfs PATH flag with clap ArgGroup(required=true, multiple=false),
so exactly one source is required and they're mutually exclusive.

CLI-side fail-fast validation checks the path exists, is a directory,
and contains an oci-layout file; deeper OCI parsing stays in the
runtime's existing image_manager.load_from_local.

Unblocks offline/air-gapped use of pre-exported OCI bundles via the
CLI; previously only the SDKs and REST layer exposed this.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
)

Adds integration tests for both run and create:
- IMAGE and --rootfs mutually exclusive
- neither argument provided
- --rootfs path does not exist
- --rootfs path is not a directory
- --rootfs path missing oci-layout

These don't boot a box (no real OCI bundle needed) so they're safe
to run on the standard CI matrix.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Updates synopsis, option tables, and examples in both the CLI README
and the CLI reference. Adds a RootfsFlags section to the shared
flag-groups reference, with a note about using -- before COMMAND
when combining --rootfs with boxlite run.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
CI's `make fmt:check:rust` (cargo fmt --all -- --check) flagged 7
formatting drift spots introduced by the boxlite-ai#449 commits. Applies the
exact diff rustfmt emitted in
github.com/boxlite-ai/boxlite/actions/runs/26084049396 — no
behaviour changes.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.

Expose --rootfs support in boxlite-cli

1 participant