The logo prints from the UI alone (ui.UI.Logo, msg.Reporter's Logo), once
a run, only with stdout a terminal (or a test build's PickOnPipe), not with
--no-input, --json or names mode; its mark green, plain under NO_COLOR. The
CLI reference's pages don't get it: only the root's help func prints it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Generic usage errors (an argument too many or missing, an unknown flag)
left 14 CLI scripts: TestUsageErrorsEveryCommand checks every command
for them, TestShowCommandsTakeJSON for which commands take no --json,
and root.txtar keeps one through the binary. e2e drops five checks that
exercise no VM: retention's settings (retention.txtar), a second gc
(gc.txtar), ls and size --json (TestJSONShapes, beside e2e's text
checks), devvm code with a stub (host_code.txtar) and a CA file that
isn't a certificate (ca.txtar, trust's TestRead).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm runs every VM on Lima, so the command line has no backend choice:
- --backend is gone from devvm, build, rebuild, images, images rm, gc,
space, doctor and setup (addBackendFlag, addBackendFilterFlag, setup's
own, checkFlagValue's case, its completion); a removed flag now fails
as an unknown flag (exit 2).
- devvm setup no longer asks for or saves a default backend; config.toml
and settings.json have no backend key (settings.KeyBackend, Values and
Defaults' Backend, checkBackend, Value.With, Source.File, FromFlag).
- Tables lose BACKEND: ls, images (both tables), space (both tables);
doctor's FEATURE table is FEATURE and SUPPORT for Lima. space's images
row is freed by images rm.
- --json keeps every backend field (ls, images, tool records, space,
doctor's backend, backend_source "built-in" and every backend's
features).
- The registry keeps Lookup, For and Default: For(d, vm) gives a VM its
recorded backend and a new VM NewVMs, else Default; tests set NewVMs.
vm.Env's lookups lose the flag parameter, found.flagIgnored and
Options.Backend.
- Messages removed: backend_unknown, backend_unknown_default,
default_backend, backend_help, doctor_backend_from,
backend_flag_ignored; backend_unknown_vm stays (a VM's recorded
backend), linked to backends#a-vms-backend.
- Docs: Backends' choosing section becomes "A VM's backend"; settings,
setup, images, gc, space, doctor, commands and install pages lose
--backend and BACKEND; Contributing gains "How a backend plugs in".
- Tests: unit tests for For, settings, setup, doctor's table, the
tables; CLI scripts check --backend as an unknown flag on devvm,
build, restart, images, gc, space, doctor and setup, and a config.toml
backend key as unknown; e2e's table checks lose the column.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Lima is devvm's only backend. The backend architecture stays (Backend,
Caps, Features, Review/Require, the registry, backendtest.Fake), so
another backend is an addition.
State from a smolvm VM reads as an unknown backend (backend_unknown_vm,
gc_orphans_unknown); nothing migrates it. The image keys of
layers/docker.sh, layers/nix.sh and features/desktop.sh change, so images
rebuild once.
Lima's port forwarder moves off smolvm's files first: newForwarderCmd and
forwarderMain from internal/cli/smolvmports.go to limaports.go, and
assets/container/ports.sh to assets/guest/ports.sh (sent by the forwarder
at run time, so no image key changes).
Removed:
- internal/backend/smolvm (4,070 lines with tests), _smolvm-ports, its
registry entry, registry.Experimental and backend_experimental.
- The decider: backend.Decider/UsesDecider, Confinement.Decider and
DeciderToken, internal/proxy/decider.go and its test, the proxy's
-decider, -decider-to and -decider-token-file, netpolicy's
KeyDeciderPort, KeyDeciderToken and deciderToken, the decider port in
vm's forwarding and UsedPorts.
- backend.AgentStarter/AgentUnchosen, vm's checkAgentStart and
agent_unchosen_stop.
- vmssh/key.go (EnsureKey, Public, HostKey, ServicesArgs, Capped).
- paths.Smolvm/SmolvmImage and space's smolvm folders; paths.VM's
Record, Key, KnownHosts and ProxyURL; project.Detect, which nothing
called (a test helper now).
- ubuntu.ContainerRepo/ContainerDigest/ContainerRef/ContainerOrigin and
bump.sh's ubuntu_image, with its part of bump.txtar.
- assets/smolvm/ and assets/container/; the no-init-system branches of
layers/docker.sh, layers/nix.sh and guest/sync.sh, and the notes in
features/desktop.sh and guest/ca.sh.
- Messages: smolvm_* (14), vm_no_ssh, vm_no_sshd, ports_no_ssh,
creating_from_image, packing_image, pack_failed, backend_experimental,
agent_unchosen_stop; descriptions naming smolvm reworded.
- Tests: smolvm.txtar, the smolvm stub, registry, decider, netpolicy and
sshagent cases; gc_backend, gc_skipped, gc_orphans and space test a
failing or hanging Lima listing instead (the limactl stub's list-fails
and list-hangs); the --backend smolvm examples; e2e's --backend smolvm
and its section (about 1,130 lines), the smol_* helpers and the
link section's backend switch.
- Coverage: internal/backend/smolvm's lines in both baselines.
- Docs: backends/smolvm.md, internals/smolvm.md, design.md's smolvm
notes (Ports on Lima now holds the forwarder's description), the
backends table's smolvm column, every page naming smolvm, the README,
the home page's backends art, and AGENTS.md's smolvm rows and gotchas
(and the Docker bind-mount gotcha, which nothing refers to).
Kept: the docker layer, on Lima; --from's local Docker; --backend, the
BACKEND column and setup's backend choice, which the next commit removes.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm is about VMs, and Docker's containers aren't VMs: Lima is the
default backend and smolvm stays experimental. The backend architecture
(Backend, Caps, Require, the registry, backendtest.Fake) stays, so
another backend is an addition.
Removed:
- internal/backend/docker, its registry entry and Names/Experimental's
docker half; devvm _docker-connect and _docker-ports
(internal/cli/dockerssh.go); assets/docker/unpack.sh.
- Test-build overrides DEVVM_DOCKER_KIND, DEVVM_DOCKER_PROC_SYS,
DEVVM_LINUX_BUILD_URL/_SHA256, the registry.linuxURL/linuxSHA256
ldflags vars and the CLI tests' Linux-build archive (linux_release).
- Interfaces only Docker implemented, with their callers:
backend.ProxySocket/ProxySocketOf (the proxy's -listen-unix),
DiskUser (ls's and size's disk-over warning, size's disk_used and
--json disk_used_gib), Reporter (doctor), LeftoverLister and Leftover
(gc --orphans' volumes, networks, containers and images),
DockerLayerVM and VMSpec.DockerLayer, SSHTarget.ProxyCommand and
vmssh.SSH.Proxy, vmssh.SSH.SessionArgs, CacheEntry.Name.
- The docker layer's runtime on a backend that makes VMs for it:
vm/dockerlayer.go, KeyDockerLayer, chooseNet's refusal (chooseNet
returns a bool now), the refusals at start and devvm network on, ls's
"(sysbox)" and --json docker_layer, size_disk_default_unused.
- The proxy's relay mode (relay.go, -relay, -relay-to, -listen-unix).
- paths.Dirs.Docker and paths.VM.Lifeline.
- assets/guest/tools.sh's linked-folder branch; services.sh's
DEVVM_LOOP, DEVVM_DOCKERD and DEVVM_SSHD=inetd.
- Messages: every docker_* the backend used, docker_layer_runtime,
net_docker_layer, net_off_docker_layer, committing_image,
pulling_image, unpacking_tools, disk_over, size_disk_default_unused,
gc_orphan_volume/_network/_container/_image, docker_connect_failed;
gc_orphan_elsewhere reworded.
- Tests: docker.txtar, the docker stub's engine (its --from half
stays), the ssh stub's login-shell branch; e2e's --backend docker,
--engine, the docker host VM and Docker Desktop runs.
- Release: one GoReleaser pass, no Linux-build pin in the macOS builds,
no Linux devvm in the Homebrew formula's libexec. Linux builds stay.
- Docs: backends/docker.md and internals/docker.md, design.md's Docker
notes, the Docker column of the feature table, and every page's
mentions of the Docker backend, Docker Desktop as one, and Sysbox.
Kept: the docker layer in Lima VMs, devcontainer docker-in-docker,
--from with images only a local Docker has, Docker Hub references.
State written by a Docker VM before this reads as an unknown backend
(backend_unknown_vm).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm node said "Did you mean devvm code?", which misleads anyone who
means the tool. When the unknown word, or each name in it joined with +
or a comma, is a toolchain, an agent or a layer (devvm's own or the
user's), the usage error is no_command_part, with the flags that choose
them: devvm node+claude -> devvm --tools node --agents claude. Any other
word keeps the did-you-mean over the commands (msg.Closest). The names
come from partNames, which checkPartFlag reads too.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm takes no IMAGE word any more than any other: in a terminal a new VM's
toolchains, coding agents and layers are checked in one picker, under three
headings, before the network-policy question; --tools, --agents and
--layers (each an exact list, or none) skip it, and a part left out takes
its default: the detected toolchains, devvm setup's agents, no layers (a
devcontainer.json's features still count). Without a terminal, or with
--no-input, the VM gets the defaults and new_vm_gets says so in one line.
devvm setup --agents (and its first-run question) chooses new VMs' agents.
devvm tools in a terminal opens the same picker for the VM, its layers
fixed, and turns the changes into tools add and rm.
An image is base and layers only: tools are the VM's tool_names state key.
build, rebuild and images rm refuse a shared tool (tool_not_layer), and
devvm build builds no tool images. devvm ls gains a TOOLS column and
--json tools. gc's --tools is --tool-images, so --tools has one meaning.
Gone: image.Reserved, checkWord's image half (devvm WORD is no_command or
no_command_like, did-you-mean over commands, msg.Closest), the lacks path
in internal/vm/existing.go, and the messages vm_lacks_tools,
vm_lacks_layer, layer_is_command, layer_name_command, no_image_for,
no_command_or_image*, tools_not_images, tools_not_images_rm, detected,
vm_is_now (vm_tools_now), secret_with_image (secret_with_claude).
New: ui.Pick takes headed sections with fixed rows, ui.CanPick,
vm.PickPart/PickRow/AgentsChoice/CheckPart (internal/vm/parts.go),
state.KeyToolNames, state.ReadAgents/WriteAgents, paths.Dirs.Agents,
project.DetectFiles. Image keys are unchanged in form: images never held
tools; docker.sh's and nix.sh's comments changed, so those layers rebuild.
Docs: the home page's quick start steps, diagram (sandbox.svg), cards and
FAQ; README; getting started; using (images' What a new VM gets, coding
agents' Running an agent, settings' agents); internals; contributing;
the cli skill; AGENTS.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
script_test.go's sandbox sets DEVVM_MESSAGES=names and DATA, VMS, RUN
and CFG by default, and adds stub_reset, catg (the one file a glob
matches), vm_name VAR NAME (the folder's VM) and project NAME [git];
script_cmds.txtar checks each. Every script is rewritten onto them, its
assertions kept; TestCommandLines leaves the scripts' own commands out.
mise run test runs scripts/test.sh: the tests as before, with the CLI
tests' devvm built with -cover for every package (CLI_GOCOVERDIR),
merged with the Go tests' counters by go tool covdata, then
scripts/coverage.sh holds each package to testdata/coverage/<os>.txt.
mise run coverage raises the baselines; coverage.txtar checks the
comparison. The macOS baseline is recorded from this tree.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm [IMAGE]'s flags for a new VM (--backend, --from, --cpus, --memory,
--disk, --ports, --network-policy, --no-network-policy) are the root's
own, so devvm ls --cpus 4 and devvm setup --cpus 2 fail as unknown
flags. build, rebuild and images rm take --backend and --from;
images, gc and space take --backend as a filter of their own (images
and space now filter: only that backend's rows); doctor takes
--backend; restart and tools take none. ports -g is local on ports,
ports add and ports rm. No command has a persistent flag.
One name, one meaning: network log --follow loses -f (-f is --force's,
and gc --force gains it); the hidden secret get's --force becomes
--to-terminal. Flag defaults name the setting command (devvm size -g,
devvm ports -g, devvm setup --backend); descriptions lose then/also
openings.
Special values are words: an empty flag value (flag_blank) or an empty
argument (arg_blank) is refused everywhere, replacing features_empty.
Durations: state.ParseDuration (a whole number and m, h, d or w) for gc
--older-than, retention's ages and ssh-agent add --lifetime (which also
takes forever, via sshagent.CheckLifetime), with one message,
bad_duration, replacing gc_bad_age and agent_lifetime_invalid.
Blanks are checked with the other usage errors (checkCommand, before
checkFlags), and an unknown --backend NAME is a usage error checked
first too (checkFlagValue, against registry.Names, which a test keeps
equal to the registry's own).
Tests: TestPersistentFlags, TestFlagNamesHaveOneMeaning,
TestUpFlagsAreUpsAlone, TestParseDuration, TestCheckLifetime; root,
setup, images, space, gc_history, retention, ssh_agent and network_log
scripts. Docs: commands.md (Flags and values), from.md, install.md,
images.md, space.md, settings.md, ssh.md, network pages; CLI reference.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every argument and flag error is a devvm message naming what the command
expected, followed by usage_help naming that command's own --help, and
exits with 2. Arguments and flag values are checked in Args, before the
root's PersistentPreRun and any VM lookup.
- internal/cli/args.go: noArgs, exactArgs, maxArgs, minArgs (argsN, with
ValidArgs), argsOf (the arguments in Use), checkCommands (wraps every
command's Args with checkFlags and marks RunE's errors as ranError),
checkFlagValue (--cpus, --memory, --disk, --ports, --lifetime,
--older-than), exclusive (flag groups checked first, then Cobra's own
required flags and groups), flagError (SetFlagErrorFunc: pflag's
NotExist, ValueRequired, InvalidValue, InvalidSyntax errors).
- Execute: 0, 1 for a failure (RunE's error: a message, or
output_failed), 2 for a usage error; usage_error is only the fallback.
- Checked early: ports LIST and add/rm LIST (vm.ParsePortList), network
allow/deny RULEs, network on/off(/ask with -g), layer new NAME
(build.CheckLayerName), retention KEY=VALUE (state.CheckRetention),
setup --features '', secret NAME, completion SHELL, git-protect and
ssh-agent values.
- ui.UI.Error prints an error without ending the run (UI's method limit
44).
- Messages: usage_help, arg_missing, args_too_many, args_none,
arg_not_choice, no_subcommand, flag_unknown, flag_needs_value,
flag_bad_value, flag_bad_switch, flags_exclusive, output_failed;
usage_error reworded; doc links to troubleshooting.
- Tests: TestUsageErrorsEveryCommand, TestRanErrorIsAFailure, TestArgsOf,
TestFlagErrors; txtars check message names; e2e checks a bad port list
exits 2.
- Docs: troubleshooting (a command refused before it runs, exit codes),
contributing (command arguments), AGENTS.md.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
- devvm --version (and a hidden devvm version) prints the version alone:
the one release builds set with -ldflags -X .../internal/cli.version,
else Go's build info without the v, else (devel). No -v shorthand.
- devvm help [COMMAND], --help and -h stay Cobra's.
- devvm completion bash|zsh|fish prints Cobra's script (no powershell).
Completion offers image names after the +-joined parts given (base,
the toolchains, the user's layers, the agents), shared tools for
remove, backend names for --backend, all/none for --ports, and never
file names.
- Tests: version.txtar, completion.txtar, help cases in root.txtar;
TestJoined, TestVersionFromRelease, TestVersionFlagHasNoShorthand;
more exit codes in TestExecuteExitCodes; docgen tests know the
completion page and keep version and __complete out.
- Docs: commands.md "devvm itself" and "Shell completion"; the CLI
reference regenerated (devvm_completion.md, --version on devvm.md).
- Converted: cli.bats "doctor: all there; --version prints VERSION"
(its --version half; doctor waits for doctor). No messages added.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
devvm [IMAGE] in a folder creates its VM: the folder checked (its path,
unsafe folders, a folder made again), its size and ports, the image
named or detected and built, cloned with only the folder mounted, its
state, .git hooks and config locked (macOS), started, then the backend's
shell in place of devvm. Network policy isn't there yet, so a VM is
created only with --no-network-policy; an existing VM is refused for
now. Ctrl+C before the first shell deletes the VM and unlocks .git.
Global flags: --backend, --network-policy/--no-network-policy, --cpus,
--memory, --disk, --ports; up's own --unsafe-folder, --no-git-protect.
tests/e2e.sh gains a project section, with Lima's Exec quoting checked
on a real VM. New docs: commands, security model, .git protection.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
internal/ui is now the only package that prints: the message helpers,
prompts, tty detection, the status line, the run log (Logged, step
counts, proxy keys redacted) and ui.Main, which recovers Die, runs the
cleanup stack and handles INT/TERM/HUP (exit 130). main runs devvm
through it, and Cobra's errors print as one-line devvm errors.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Run testdata/script/*.txtar against a freshly built devvm, with HOME,
the XDG folders, the Lima home and the stub state in a sandbox under
/tmp, and testdata/stubs first on PATH. Add the stub_calls command,
uname and sw_vers stubs driven by env vars, scripts for the root
command and the sandbox, and README sections on writing CLI tests.
Co-Authored-By: Claude Opus 5.5 <[email protected]>