mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
A word after devvm that's neither a command nor an image (no +, and not base, a shared tool or a layer) is a usage error, exit 2, suggesting the closest command (Cobra's SuggestionsFor, distance 2) and the closest image name. devvm help WORD and devvm WORD --help fail the same way instead of printing the root's help. Layers can't take a word devvm keeps for its commands. - internal/image/reserved.go: Reserved (every command and subcommand name, hidden ones and help, and link, group, join, leave, publish, unpublish kept for later), IsReserved; LayerName refuses them, so Layers() and completion leave such files out. - build.CheckLayerName refuses one (layer_name_command); CheckLayers refuses a layer file named with one wherever an image names it (layer_is_command, naming the file). - internal/cli/word.go: checkWord (the root's Args), closest and levenshtein, addHelp (devvm's own help command, and a help func that panics with wordPanic for execute to recover), helpTarget, printUsage. - Messages: layer_name_command, layer_is_command, no_command_or_image, no_command_or_image_command, no_command_or_image_image, no_command_or_image_both, with doc links. - Tests: TestEveryCommandReserved, TestImagesNotReserved, TestLevenshtein, TestUnknownWord; layer.txtar and up_checks.txtar; e2e checks a mistyped command exits 2 with its suggestion. - Docs: customizing (layer names), commands (devvm WORD), contributing, AGENTS.md. Co-Authored-By: Claude Opus 5.5 <[email protected]>