mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 16:27:33 -10:00
The first run, in a terminal, before base's features are first chosen, asks for the CPUs and memory new VMs get, when no default size is saved and neither --cpus nor --memory is given; devvm setup asks after the backend and features, and --cpus/--memory choose without asking (with only them, the backend and features stay). Each question starts from the saved size, else base.yaml's fitted to this machine (FitCPUs/FitMemory); Enter keeps it, a value Size.Check refuses is warned and asked again. Only typed values are saved, in the size file devvm size -g writes (a saved disk kept); keeping both writes nothing. Without a terminal nothing is asked. - internal/vm/sizechoice.go: SizeChoice (Ask, Set, Fitted), writeDefaultSize, creation.firstRunSize; SetSize -g uses SizeChoice.Set - internal/vm/size.go: baseSetting (BaseDisk on it), readDefaultSize - internal/vm/env.go: Env.Answer and Env.Interactive (stdin and stdout terminals); vm.UI gains Answer and StdoutIsTerminal - internal/vm/up.go: plan asks before reading the default size - internal/ui: UI.Answer, a line prompt; largeTypes allows UI 41 methods - internal/cli/setup.go: setupChoice, --cpus/--memory, saveBackend, saveFeatures; Short/Long updated - messages: size_question, size_cpus_prompt, size_memory_prompt (refusals reuse too_many_cpus, too_much_memory, cpus_not_number; size_defaults after saving) - tests: TestSizeChoiceAsk, TestSizeChoiceSet, TestFirstRunSize, setup's size prompts; setup.txtar (--cpus/--memory, refusals, no terminal), up_size.txtar (first run without a terminal) - docs: first-vm (paragraph, diagram), ports-size (Choosing new VMs' size), customizing, backends, settings; CLI reference regenerated Co-Authored-By: Claude Opus 5.5 <[email protected]>