fix: standard help, honest flags, and an rm that asks first
#10
No reviewers
Labels
No labels
blocked
blocker:ci-red
blocker:conflict
blocker:drill-pending
blocker:unrequested
bug
claimed
documentation
enhancement
epic
merge-next
needs-triage
ready
release
scope:cli
scope:drill
scope:host
scope:installer
scope:templates
scope:tiers
stale
state:addressing
state:bots-reviewing
state:building
state:needs-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: heavy-duty/box#10
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/cli-help-and-contract"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #8.
The help was the script scraping its own header comment by line number
(
sed -n '2,9p' "$0"). No sections, no per-command help, no-h, no--version. And parts of the interface it described weren't real — which is thehalf that actually cost my co-founder time.
The interface now tells the truth
claudebox lstunknown command: lst — did you mean 'list'?, exit 2claudebox new --helpusage:error, exit 1newhelp pageclaudebox snapshot work --labl x--lablunknown option: --lablclaudebox exec work ls -la-laswallowed--"claudebox rm work--forceskipsclaudebox --versionclaudebox 0.2.0 (/path)--forcewas the sharp one: parsed on line 23, never read anywhere, whilermran
incus delete -funconditionally. Shellcheck had been calling it (SC2034: force appears unused) and it was read as a lint nit rather than the missingguard on the one irreversible command.
What's here
usage()/help_cmd():USAGE,COMMANDS,OPTIONS(every flag, with thecommand it belongs to),
EXAMPLES,EXIT STATUS, and a shortTHE MODELoncreds-free + no-inbound-path. Plus a page per command —
claudebox help rm,claudebox new --help.-h/--helpanywhere;--version/-Vreading a newVERSIONfile (0.2.0 —bump it on release, or swap it for a tag if you'd rather).
did-you-mean by edit distance.
execno longer reportsusage: claudebox exec <box>, omitting the-- <cmd...>that makes it work).shellcheck bin/claudeboxis now clean — SC2034 and SC2015 both gone.⚠️ One behavior change
rmconfirms before deleting ([y/N], default no).--force/-fskips it.With no TTY and no
--force, it refuses and exits 2 rather than destroying abox — so any script calling
claudebox rmmust now pass--force. That's thepoint of the change, but it is a break: shout if you'd rather it only guard
running boxes.
Testing
Same caveat as #9: no real Incus — I work inside a claudebox, which has
neither
incusnor nested virt. Every path above was driven against a stubbedincusand is reproduced verbatim in the table; thermprompt was exercised ona real pty (
script) fory,n, and bare Enter (aborts, exit 1), plus theno-TTY refusal.
shellcheckandbash -nclean. The help paths touch no Incusat all, so those are exercised for real.
🤖 Generated with Claude Code
Rebased onto the updated #9 (
list/infosplit). The help, the per-command pages,COMMANDS, and the synopses all follow the split —claudebox help infois its own page, andinfnow suggestsinfo.Still stacked: merge #9 first. And note #11 proposes replacing this PR's hand-written help with a table that generates dispatch and help from one source — which is the durable fix for the drift this PR is patching by hand.