Skip to content

Drop image subcommand from the CLI#52

Merged
jserv merged 1 commit intomainfrom
simplifiy
Apr 8, 2026
Merged

Drop image subcommand from the CLI#52
jserv merged 1 commit intomainfrom
simplifiy

Conversation

@jserv
Copy link
Copy Markdown
Contributor

@jserv jserv commented Apr 8, 2026

The dispatcher existed solely to route to a single subcommand, forcing every invocation, doc, and test script to spell "kbox image" for no disambiguation value. Collapse the wrapper and let kbox [OPTIONS] -- COMMAND run directly. Also fix a latent issue where a positional command after -- would override -c, and add unit tests for the positional and -c+extras paths.

Change-Id: I3a927bb58163fc7528973e791b810ce6dc426fc2


Summary by cubic

Simplifies the CLI by removing the image subcommand. You now run commands as kbox [OPTIONS] -- COMMAND, with cleaner parsing and clearer help.

  • Refactors

    • Drop the image subcommand and dispatcher; options are parsed at the top level.
    • Fix parsing so -c CMD -- ARGS keeps extra args and isn’t overridden by a positional command.
    • Add -h help flag and update usage text.
    • Replace kbox_args with kbox_image_args; kbox_parse_args(argc, argv, struct kbox_image_args*).
    • Update docs, test scripts, and examples to use kbox ... instead of kbox image ....
    • Add unit tests for positional command parsing and -c with extra args.
  • Migration

    • Replace all kbox image invocations with kbox.
    • Use -- to separate kbox options from the guest command.
    • Help is now kbox --help (or kbox -h).
    • If calling the parser from code, update to the new kbox_parse_args signature and types.

Written for commit 0000353. Summary will update on new commits.

The dispatcher existed solely to route to a single subcommand, forcing
every invocation, doc, and test script to spell "kbox image" for no
disambiguation value. Collapse the wrapper and let kbox [OPTIONS] --
COMMAND run directly. Also fix a latent issue where a positional
command after -- would override -c, and add unit tests for the
positional and -c+extras paths.

Change-Id: I3a927bb58163fc7528973e791b810ce6dc426fc2
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 10 files

@jserv jserv merged commit dc7aa2f into main Apr 8, 2026
6 checks passed
@jserv jserv deleted the simplifiy branch April 8, 2026 11:13
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