Files
devvm/testdata/script/completion.txtar
T
w3cjandClaude Opus 5.5 a134e0d8a6 feat(cli): choose a new VM's toolchains, agents and layers in a picker or with --tools, --agents and --layers
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]>
2026-11-03 00:45:09 -07:00

84 lines
2.1 KiB
Plaintext

# devvm completion prints a script for bash, zsh and fish, and nothing else.
exec devvm completion bash
stdout '__devvm'
! stderr .
exec devvm completion zsh
stdout '^#compdef devvm$'
exec devvm completion fish
stdout 'complete -c devvm'
! exec devvm completion powershell
stderr '^devvm: arg_not_choice choices=bash, zsh, fish command=devvm completion given=powershell$'
stderr '^usage_help command=devvm completion$'
! stdout .
# The commands users run, not the hidden ones; devvm takes no image.
exec devvm __complete ''
stdout '^build\t'
stdout '^completion\t'
! stdout '^base$'
! stdout '^claude$'
! stdout '^_'
! stdout '^version'
stdout '^:4$'
# Your layers are image names, and shared tools aren't; the layers given
# are left out.
mkdir $XDG_CONFIG_HOME/devvm/layers
cp foo.sh $XDG_CONFIG_HOME/devvm/layers/foo.sh
exec devvm __complete build docker+
stdout '^docker\+foo$'
stdout '^docker\+nix$'
! stdout '^docker\+docker$'
! stdout 'claude|node'
# --tools, --agents and --layers: comma-separated lists of their part's
# names, and none.
exec devvm __complete --agents claude,c
cmp stdout agents-c.txt
exec devvm __complete --layers ''
stdout '^foo$'
stdout '^none$'
! stdout '^base$'
exec devvm __complete --tools n
stdout '^node$'
stdout '^none$'
exec devvm __complete setup --agents ''
stdout '^opencode$'
# tools add and rm take shared tools only, each a word of its own, those
# given left out.
exec devvm __complete tools add ''
stdout '^python$'
! stdout '^foo$'
! stdout '^base$'
exec devvm __complete tools rm python c
stdout '^claude$'
stdout '^codex$'
! stdout python
exec devvm __complete tools add python ''
! stdout '^python$'
stdout '^claude$'
# Flags: backend names, the ports keywords; never file names.
exec devvm __complete --backend ''
stdout '^lima$'
exec devvm __complete setup --backend ''
stdout '^lima$'
exec devvm __complete setup --features fzf,
stdout '^fzf,omb$'
! stdout '^fzf,fzf$'
exec devvm __complete --ports ''
stdout '^all$'
stdout '^none$'
exec devvm __complete rm ''
stdout '^:4$'
exec devvm __complete completion ''
stdout '^fish$'
! stub_calls
-- foo.sh --
#!/bin/bash
-- agents-c.txt --
claude,codex
:4