cli: rewrite help text for AI-driven discovery
Frontier models tend to discover a CLI by running --help, scanning the Long description, and inferring the dominant workflow from the examples. Today's banger help reads like a man page index — every verb has a one-line Short and nothing else. This rewrites the groups (banger, vm, vm workspace, image, kernel, system, ssh-config) so each landing page answers "what is this for, what's the 80% command, what comes next" in three to ten lines, with runnable examples. Also disambiguates the near-twin lifecycle commands so a model reading the subcommand index can tell stop/kill/delete apart at a glance: start Start a stopped VM stop Stop a running VM gracefully restart Stop then start a VM kill Force-kill a VM (use when 'vm stop' hangs) delete Stop a VM and remove its disks (irreversible) vm create / vm ssh / vm logs / vm show pick up Long descriptions and examples for the same reason. No behaviour changes; help text only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
41ced66a54
commit
35bfac3f13
6 changed files with 251 additions and 30 deletions
|
|
@ -15,8 +15,28 @@ import (
|
|||
func (d *deps) newImageCommand() *cobra.Command {
|
||||
cmd := &cobra.Command{
|
||||
Use: "image",
|
||||
Short: "Manage images",
|
||||
RunE: helpNoArgs,
|
||||
Short: "Pull and manage banger images (rootfs + kernel + work-seed)",
|
||||
Long: strings.TrimSpace(`
|
||||
A banger image bundles a rootfs.ext4, a kernel, an optional initrd
|
||||
+ modules, and an optional work-seed (the snapshot used to populate
|
||||
each new VM's /root). Most users only need 'banger image pull
|
||||
<catalog-name>' for the cataloged paths (see internal/imagecat),
|
||||
or 'banger image pull <oci-ref>' for an OCI image.
|
||||
|
||||
Subcommands:
|
||||
pull fetch a bundle by catalog name OR pull an OCI image
|
||||
register point banger at an existing local rootfs (advanced)
|
||||
promote copy a registered image's files into banger's managed dir
|
||||
list show what's installed
|
||||
show print one image's full record as JSON
|
||||
delete remove an image (no VMs may reference it)
|
||||
`),
|
||||
Example: strings.TrimSpace(`
|
||||
banger image pull debian-bookworm
|
||||
banger image pull docker.io/library/alpine:3.20 --kernel-ref generic-6.12
|
||||
banger image list
|
||||
`),
|
||||
RunE: helpNoArgs,
|
||||
}
|
||||
cmd.AddCommand(
|
||||
d.newImageRegisterCommand(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue