mirror of
https://github.com/devvmhq/devvm.git
synced 2026-12-01 06:23:17 -10:00
main
58
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
2615a1322b |
docs: changelog entries by audience, with a test that keeps their shape
Releasing, in Contributing's maintaining.md, now gives the entry's groups in their order (Highlights, What to do, Fixed, If you use… blocks, Security hardening, Internal changes), what goes in each and the question behind them, who notices; each line as one outcome sentence of at most 35 words, then its links; the release page as the full story; the sort table and a fresh docs-voice review before the release commit; and how lines go into Unreleased as changes land. AGENTS.md gets a Changelog line, and the codebase-standards skill a checklist item and its guard in rules.md. The rules that named the old Breaking and After you upgrade sections (AGENTS.md, structure.md's Released state, standards.md, rules.md) now name What to do. TestChangelogShape (internal/cli/docgen/changelog_test.go) reads CHANGELOG.md and checks each entry from 0.2.0-rc.1 on, and Unreleased once it has a line: the groups and their order, three to five Highlights, balanced <details> with a <summary> and the blank lines GitHub needs, 35 words of prose a line outside What to do (links and a credit not counted), a details link to releases/ on every line, and full links for issues and pull requests. TestChangelogProblems breaks each rule once on a small entry. lint:docs runs both. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
6c36850251 |
feat(cursor): devvm cursor opens this folder's VM in the Cursor editor
devvm cursor is devvm code's twin for Cursor, the editor. It gets the folder's VM ready as devvm host does, then runs `cursor --remote ssh-remote+HOST DIR` in devvm's place, with the SSH agent devvm started with. Without `cursor` on PATH it fails with no_cursor_command, naming the host to connect to. Cursor's Agent and your sign-in (from CJ's manual check with a real login): recent Cursor runs Agent in the editor's server in the VM, which holds your Cursor sign-in in memory only (no token on disk, in any environment or command line) and calls Cursor from the VM. Cursor's `cursorAgentHost.remoteInferenceRoute` is application-scoped, so it's read only from the user settings on this machine; with it set to "always", Agent's own requests go through the Cursor app here, while the VM's server still talks to Cursor. - vm: Code and Cursor share openRemote; vm.CursorCommand names the editor's command, apart from the CLI agent's agents.Cursor. After LookPath finds `cursor`, devvm reads Cursor's user settings on this machine (platform.AppSettingsDir: Application Support on macOS, $XDG_CONFIG_HOME or ~/.config on Linux) through safefile.Read, 1 MiB at most, read-only, as JSON with comments, and warns with cursor_agent_in_vm unless the route is "always". It never fails on the file. - sync.sh: Cursor's ~/.cursor-server/data/Machine/settings.json gets VS Code's remote.autoForwardPorts, git.terminalAuthentication and github.gitAuthentication off, in one loop over both editors' files. devvm doesn't write the route there, since Cursor ignores it. - structure: nameFree lets a literal that is an agent's name stand in one file, with its reason, and fails when it frees nothing. - cli: cursor.go (--ssh-config, --here, --parent), registered beside code; cursor_failed, no_cursor_command, cursor_agent_in_vm and their doc links; ssh_host_info names Cursor too; the cli skill's judgment note: an editor's command is a bare verb named after the editor's. - Tests: host_code.txtar (cursor, its full-name host, the missing command, the warning and no warning once the route is set), guest.txtar, TestCursorAgentWarning (always, absent, other values, no file, broken JSON, too long, a FIFO, the XDG path; never written), e2e network: devvm cursor passes the editor only the host and folder, a fake editor sign-in on this machine reaches neither the VM's home, its processes' environments nor the proxy's logs, and a Cursor login in the store reaches the CLI's methods while the agent store's are refused. - Docs: SSH and editors (commands first; "Cursor's Agent": it runs in the VM with your sign-in, the user-settings line, what it doesn't cover, open only VMs you trust; if Tab doesn't work on the allowlist tier, devvm network allow api3.cursor.sh), the agents page's Cursor notes, Commands, attack vectors, design, the home page, CHANGELOG, generated CLI pages. Reviewed adversarially before the push: the settings read (size, FIFOs, links), the warning's wording and when it fires. Researched with PR #44's design as reference only. Co-authored-by: JB <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
5c8aeafcbc |
test: gosec's G703 off in test files, where it reports a helper's write on some runs only
gosec's taint analysis reported internal/gitprotect's test helper write
(G703) on some runs and not others, which failed macOS CI's lint at
|
||
|
|
52bb0f467b |
feat(clone): a --clone VM gets the repo as it is here
A --clone VM's clone is now seeded with a snapshot, not git push, and gets everything a working copy has. devvm clone fetch brings it all back, and devvm rm and clone off check it before deleting. - Refs: every branch, tag and notes ref, and a detached HEAD. - Uncommitted changes: staged, unstaged and untracked files; files skip-worktree by hand get the index's version, named. - Operations in progress (merge, rebase, cherry-pick, revert, bisect) and the stash; a stash's untracked part goes as its own branch. - The repo's settings and hooks, sent as settings only where they live in the repo (husky); ORIG_HEAD never goes. - Partial clones, with their promisor remote, and messages per network tier when it can't be reached. - Initialised submodules, nested ones too, each with a clone of its own; a submodule's own folder is refused as a top-level --clone. vm.json gains an optional `submodules` field. - Git LFS both ways: objects hash-checked, written under os.Root with no link followed, a question past 2 GiB; the filter is set only in the clone's repos; git-lfs 3.8.1 in base, pinned by SHA-256. - rm and clone off keep the VM when anything the VM has didn't come back, and name it. - Every shell script embedded in Go is shellchecked. - clone.md is a guide that leads with commands; TestUserPageProse covers it and coding-agents.md. After you upgrade: base and every image on it build again once, for git-lfs. Fixes #40, reported by @Josuesp1620. Thanks to @dhruv1220 for #42, which found the cause (receive-pack refusing a shallow push); its receive.shallowUpdate setting stays in the VM's repos. Co-authored-by: Dhruv Arora <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
d349868c31 |
feat(agents): one definition per coding agent, and Cursor's CLI
Every list of the coding agents now derives from internal/agents' registry, one Def each, and Cursor's CLI (cursor-agent) is a fifth agent. The registry: - each agent's login command, login formats and capture on its Def; one message for every agent where each had its own - the agents' table, the README's list and the docs' history lists are generated from the registry (cli.DocBlocks, TestDocBlocks); scripts and Go tests take their lists from it too - each agent's own code lives in a file named for it; the structure test lets only an agent's own files choose by its name, following constants named after an agent - a VM remade by clone on/off keeps no agent's login files (agents.LoginFiles from every Def.Logins; Claude Code's .claude.json stays, as it is also history) Cursor's CLI: - `devvm --agents cursor`, `devvm agent login cursor`, history import and export of ~/.cursor/chats - the proxy captures its login at a GET endpoint, guards a shared host by path, and puts the login in only where the CLI sends it, bound to the CLI's 57 methods - account changes and the agent store are refused in a VM; Cursor's headers and trailers are scanned for tokens - e2e: Cursor's CLI in the network section, its poll behind the fake company proxy Docs: the agents' pages lead with commands, with a How it works page for the agents. Co-authored-by: JB <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
a03f119427 |
docs: user pages lead with commands, and lint:docs fails a wall of prose
The user pages (getting-started, using, safety, backends, compared) now
show a task's command first, then lists, tables, steps and callouts.
Longer mechanism moves to the matching How it works page, linked, with
every fact kept (facts.sh against each parent).
- The rule: a line in AGENTS.md's Docs, the docs-voice skill's "Commands
first on user pages", and Writing docs' "User pages lead with doing".
- scan.sh checks runs on every page (2+ paragraphs on user pages, 3+ in
internals and contributing), prints each run's word counts, adds a
`long` column (paragraphs and list items over 80 words or 4
sentences), and exempts a colon-ended lead-in only up to 40 words.
- TestUserPageProse (internal/cli/docgen), run by lint:docs, fails a
user page with a run of 3+ paragraphs where two are over 80 words, or
any paragraph or list item over 150 words; TestProseProblems covers
the rules.
- Pages: images (Base first, Outdated VMs after Rebuilding), vms,
ports-size, links, space, settings, command-line, troubleshooting ("A
command fails" as the skill's own after example), upgrading, desktop,
from, customizing, safety/network, safety/git-protection,
attack-vectors, backends.
- Moved mechanism: internals/network.md (Starting a VM on its tier,
Requests by method and path, The VM's CA) and a new "The run log" in
internals/overview.md.
On the user pages: runs of 3+ paragraphs 32 -> 0, paragraphs or list
items over 150 words 46 -> 0.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
2f0cc97392 |
feat(paste): devvm paste and devvm paste rm (#38)
feat(paste): devvm paste, an image, PDF or copied file from the clipboard into the VM (#38) devvm paste reads the host's clipboard and streams what's on it into the running VM's paste folder over the backend's Exec, with no SSH agent and no new channel, then copies the file's path in the VM to the host clipboard for the agent's prompt. devvm paste rm empties the folder after a question, and a launch that starts a stopped VM offers to. What it reads: - an image (PNG, JPEG, GIF, WebP; TIFF is converted to PNG), checked by its bytes; browsers hand over a PNG, so an animated GIF arrives as one frame - PDF data, sent as it is, and preferred over a file reference beside it (Preview's page copies) - one copied file, after a question that shows its path on this machine; --send-file answers it only for a file inside the project folder reached without links, and never for a --clone VM - never text; several files are refused Security: - macOS reads file URLs only through NSPasteboard (FileURLsOnly): AppleScript's «class furl» coercion turned any text, such as a path a web page or the VM's OSC 52 put there, into a file to send - copied files are opened with openat and O_NOFOLLOW|O_NOCTTY|O_NONBLOCK, following a root-owned link only in a folder only root can change, and read through internal/safefile (Checked), capped at 64 MiB - osascript and pbcopy by absolute path, Linux's tools only from system folders, never PATH - time limits on every clipboard tool and on paste.sh in the VM; bounded reads of everything the VM prints - the path copied back is built on the host, keeping only the file's extension: nothing the VM says reaches the clipboard Also: the paste-dir setting (default /tmp/devvm-paste, made at each launch), --json with sent, the agents' guide line, messages with doc links, stubs, CLI tests, an e2e check in the project section, and docs on coding-agents, settings, design, security and attack-vectors. Co-authored-by: dustypolk <[email protected]> Co-authored-by: w3cj <[email protected]> Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
647ad4bf2a |
feat(network): transparent mode for tools that ignore the proxy settings
On every confined tier, a tool that ignores the proxy settings (workerd
under wrangler dev, a static Go binary, a container made through Docker's
API) reaches the VM's proxy by the names it looks up. In the VM, dnsmasq
answers every name with the stand-in address 198.18.0.1 and has no
upstream; nftables sends that address's ports 80, 443 and those the allow
rules name to socat listeners on it, which make each an authenticated
CONNECT transparent.devvm.proxy:PORT to the VM's proxy. The proxy reads the
host from the connection's first bytes (TLS SNI, or each HTTP request's
Host) and judges it as CONNECT host:PORT, with the same order of checks,
log, secrets and floor. A blocked HTTPS host gets the 403 over a
certificate from the VM's CA. Nothing new runs on the host, and the
backends don't change.
Proxy (internal/proxy):
- transparent.go: TransparentHost, ProxyDomain, SentinelAddr,
IsSentinelAddr, ViaDNS, transparent (serve, take, tls, handler,
refusePage, ports), sniHost, replay, reservedRefusal, withVia, viaOf.
- routeFor and route: the one order of checks for CONNECT and the
transparent path; carry, the one tunnel with its SNI check; block split
into the record and blockPage; links.refuse split (isLinkDomain);
caEndedRefusal's test moved to routeFor; handshake and serveOne shared
by intercept and the 403 page.
- devvm.proxy reserved whole, CONNECT devvm.proxy:P included; the stand-in
address refused with its own reason.
- Hosts and SNI in ASCII alone, never folded (the Kelvin sign), in
splitHostPort, sniMatches and sniHost.
- A ClientHello record past 16 KiB + 256 is never read; once it starts,
a ClientHello must arrive whole within 10 s, on every tunnel; a stream
whose first byte is 0x16 is TLS from then on, so a record header that
doesn't come whole, or isn't TLS's version, is refused, never passed on
unchecked; and only a ClientHello that parsed (sniOf) counts, so one
split across records is refused, an address's tunnel's included, which
may have no name (a gap older than this change).
- routeFor carries the method and path rules: a host they narrow is
refused where it can't be decrypted and intercepted where it can, on
the transparent path too.
- On the transparent HTTP path, devvm.proxy answers /blocked alone.
- policy.transparentPorts and /transparent/ports: 80, 443, then the ports
allow rules name for hosts by name, at most 32, never 22 or 53.
- Event.Via ("dns"), shown in devvm network log, /blocked and the prompt's
note as "without proxy settings".
Guest (assets/): base.sh installs dnsmasq(-base), socat and nftables;
guest/transparent.sh is devvm-transparent: setup and teardown from
sync.sh (the proxy URL on stdin), the supervisor service (systemd or
OpenRC), the ruleset (render: two filter chains at -150 keep every
interface but lo and Docker's bridges, and every protocol but TCP, UDP
and ICMP, off the stand-in address; both NAT chains at -110 map every port of
the stand-in address, so Docker's published ports never take one; DNS to
public servers and 127.0.0.1:53 go to dnsmasq, which listens on the
stand-in address alone; private, link-local, CGNAT and loopback servers
are left alone, but the VM's own name servers, which Lima's DHCP adds
beside 127.0.0.1 and Docker gives containers, go to dnsmasq too), slots,
the port list's check, and status for devvm-why. Names without a dot and
names under the search domains (this machine's network's, through Lima)
don't resolve.
Setting: config.toml's transparent-proxy, and devvm network transparent
[on|off], the VM's own value in net.transparent (Settings.Transparent,
SetTransparent; netpolicy.TransparentOf, TransparentAddr); the setup gets
DEVVM_TRANSPARENT_ADDR while the VM runs confined and its mode is on.
devvm network --json has transparent; devvm network lock lists apart the
hosts only tools without proxy settings reached (Learned.NoProxy, via in
--json). vmssh.dialAddr refuses the stand-in address.
Tests: the transparent path's unit tests and FuzzTransparent; the
setting, TransparentOf, FormatEvent's via and learned hosts; the ruleset,
slots and port list under bash 3.2; network_transparent.txtar and
sync.txtar; e2e: transparentRuns, the network section's checks, a docker
step, the from section's Debian 12 and Alpine on the allowlist tier, and
the guarantee checks run with transparent mode stopped and running.
Docs: safety/network.md (tools that ignore the proxy, what isn't
covered, the setting, logs, lock), internals/network.md (tools that skip
the proxy), internals/design.md (the design note and threat check),
using/settings.md, using/troubleshooting.md, using/limits.md,
using/images.md, safety/attack-vectors.md, internals/lima.md,
contributing/tests.md and testing.md, the proxy's README, the CLI
reference and the Commands page.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
6fd1d846d6 |
fix(lima): cache a Linux VM's project folder with 9p's none
Linux's 9p client loses data with Lima's default cache=mmap for a writable share: a stat() during an extending write() takes the host's stale size and writeback drops the data, so files reach the host empty or cut to 4096 bytes even after fsync (Claude Code's Edit sets it off); and on devvm's Ubuntu 26.04 guest kernel, a lock after a write makes the next read return zeros, which breaks SQLite in any journal mode and Gradle's daemon. macOS's vz VMs use virtiofs and aren't affected. - New VMs on a Linux host record cache mode none in a new mount section of vm.json, and their project folder is made and started with it, as is the folder devvm clone off mounts. VMs whose state has no mode (0.1.0's, and every VM made before this) keep Lima's mmap untouched, with no limactl edit, and each launch warns (mount_cache_unchosen) until devvm mount-cache none. - devvm mount-cache [none], with --json: none is the only mode devvm sets, so any other value is a usage error (mount_cache_invalid); a stopped VM gets it in its next start's one edit, a running one after the restart devvm offers. macOS refuses (backend_lacks), and so does a Linux VM whose folder isn't a 9p mount (mount_cache_no_choice). No -g or config.toml key: every new VM gets none. - The start that changes the mode mounts the folder again in the guest, as cloud-init rewrites fstab only after systemd has mounted it, through the logged runner with a minute's limit (output pipes closed a second after), then checks it with mountpoint and findmnt, reading 4 KiB at most and only the last line: a folder left unmounted stops the VM and fails the start before its shell (mount_cache_unmounted), and so does a check that gets no answer (mount_cache_unchecked); one still mounted with the old mode is warned of (mount_cache_remount_failed), any mode but none or mmap named unknown. An interrupt meanwhile, on any tier, leaves a cleanup that stops the VM, the one stop then. A launch into a running VM asks the guest, in words, whether its folder is a mount point, and refuses one that isn't (project_unmounted) or whose check fails or gives no answer (project_unchecked). A stored mmap, from a build before none alone, reads as none chosen, and devvm clone off records none for its new mount; any other mode is refused naming vm.json. - backend: FeatureMountCache (native on Linux, none on macOS, built on project-mount), Want.ProjectCache, Instance.ProjectCache, CacheModes. - lima: mount rewrites keep only the sshfs and 9p settings devvm knows where they differ from Lima's defaults, and drop the rest for Lima to fill in, so lima.yaml never freezes a default; same() compares the cache where devvm sets one. Build VMs' writable output folders (tools, --from) get none. - tools: an EROFS tool image that ends before its superblock does, or is shorter than its superblock says, as a build under mmap could leave one, counts as not built, so the next build makes it again; a build's short output is refused. The fakes' tool images are a page (backendtest.ToolImage). - The limactl stub lists QEMU's vmType, fills in 9p cache defaults on Linux, and answers the remount's check. - Docs: backends/lima (the project folder's cache, when it changes, programs that map files for writing, SQLite), using/limits, using/clone, commands, internals/lima, internals/backends, the design note (both mmap bugs, why none alone, the remount, tool images, the e2e findings), the CLI reference and the cli skill. - Tests: TestProjectCache, TestMountRoundTrip, TestStartSetsProjectCacheOnce (the remount's outcomes), TestCutShort, TestBuiltCutShort, TestGuestMountOptions, TestFilledMounts, TestUpCacheMode, TestWarnMountCache, TestCacheAtNextStart, TestSwitchCache, TestSetMountCache, TestCheckStateCache, the mount_cache CLI test, clone_switch and the 0.1.0 fixture on Linux, and e2e's projectMountCache (findmnt, a stat-while-write loop, SQLite's journals, a shared writable mmap refused, the opt-in switch of an unchosen VM, what mmap does reported, macOS unchanged). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
20d2fe1db7 |
feat(clone): workspace clones of a folder of repos
devvm --clone in a folder of git repos gives one VM a clone of each repo the user chooses, each at the same path as on the host, so paths between them (file:../pkg, ../Lib/Lib.csproj) work in the VM, and a copy of the folder's own files outside the repos, made once. - Discovery by .git protection's walk (4 folders down, the same skipped folders, 100 repos); each repo checked as --clone checks one; a linked worktree of a repo in the folder isn't a repo of its own; a repo whose folder, or common dir, another VM mounts is refused, naming it, as is one whose name a terminal can't show. A picker in a terminal (every copyable repo ticked, the others shown with why); --repos all|none|LIST answers without one, and the question is refused naming it. A folder that's a repo keeps today's single clone unless --repos is given; one inside another repo's working tree is refused (workspace_inside_repo). The choice is recorded in the VM's state. - A single --clone, or devvm clone on, in a folder another VM mounts is refused too (clone_folder_mounted), at plan time and before the seed's push. - Each repo seeded with its current and default branch (origin/HEAD, else main, else master); a detached HEAD checks out the default. One VM command makes every repo, leaving one an earlier push reached as it is; each repo is checked again just before its push, and its remote chosen once the one before is added. The folder's own repo's clone excludes the other clones (escaped, anchored lines) and the host's info/exclude, at the seed and at devvm clone add. - The folder's own files: walked folder by folder beneath the folder (safefile.Root.OpenDir), no links followed, no hard-linked files, no bare repos, no set-id bits, bounded; refused folders (checkUnsafe) apply. - devvm clone fetch [--json]: every repo's branches into its remote's remote-tracking branches (--refmap=, one refspec), listed by branch name with their repos; nothing new is said only when a repo was fetched from. devvm clone add PATH: one more repo; one whose copy didn't finish is copied again. - rm, devvm clone off and the switch loop over the repos; rm's check reads every repo in one VM command (cloneState), parsed strictly and capped (8 MiB, 10,000 branches in all), counting only worktrees inside the folder, a VM-side folder never made read as every repo gone; a clone missing in the VM is asked about, an unfinished repo checked when it's there; a host repo that changed refuses the check, and one another VM mounts, a single clone's too, gets no host git and is asked about; each repo is checked again before rm's fetch. - The finder opens a workspace clone VM inside one of its repos; --here still makes the repo's own. --repos's dependencies go through needs(), which now takes a first argument too (devvm clone on). - State is additive: clone.workspace, clone.repos, clone.made.files; a 0.1.0 clone reads as one repo at ".". CHANGELOG: an Unreleased section. Messages: flag_needs_flag, repos_value, repos_not_workspace, workspace_repo_unknown, workspace_pick_help, workspace_pick_cannot, workspace_reason_*, workspace_inside_repo, workspace_repos_past, workspace_skipped, workspace_repo_dropped, workspace_detached, copying_repo, uncommitted_not_copied_repos, workspace_ready, workspace_files_failed, workspace_files_skipped, unfetched_commits_in, clone_repo_dirty, clone_repo_gone, clone_repo_changed, clone_repo_mounted, clone_repo_unchecked, clone_folder_mounted, clone_check_repo_changed, fetch_before_delete_repos, no_terminal_fetch_repos, clone_fetch_*, fetching_repo, clone_fetched_*, clone_add_*, clone_added. Tests: TestDefaultBranch, TestBranchPlan, TestIsWorkspace, TestChooseRepos, TestPickRepos, TestFindRepos, TestRepoExcludes, TestWorkspaceFiles, TestCloneChangesAcrossRepos, TestFetchedByBranch, TestCloneRepos, TestV010CloneReadsAsOneRepo, TestCoversRepo, TestParseCloneState, TestCloneStateScript, TestWorktreePathPins, TestOpenDir; the clone_workspace, clone_workspace_repo, subfolder and nested_replaced scripts; fixture_v010_clone (0.1.0's web clone fetched, checked by rm, made a workspace clone by devvm clone add, switched off; its scratch switched on); the e2e clone section's cloneWorkspace. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f8f29e7acb |
docs(site): fonts served from devvm.dev, no third-party requests
devvm.dev and next.devvm.dev loaded Instrument Sans and Martian Mono from Google Fonts, with preconnects to fonts.googleapis.com and fonts.gstatic.com. They were the site's only automatic third-party loads; both fonts are now served from docs/static/fonts/ with their OFL, and a lint:docs check keeps it that way. - Instrument Sans: Instrument/instrument-sans at commit 7fa22308a3d0c94ee2b3cd537a1196b65db34a3e, fonts/webfonts/ InstrumentSans[wdth,wght].woff2 (88,784 B, sha256 aa72922a...826d) and InstrumentSans-Italic[wdth,wght].woff2 (94,888 B, sha256 e958f71f...9ba5), OFL.txt (sha256 9e27a72e...f966). - Martian Mono: evilmartians/mono release v1.1.0 (commit 8ffa86c2), martian-mono-1.1.0-variable.zip (sha256 b8773097...0867), its MartianMonoVF.woff2 (83,044 B, sha256 7cdf8e98...238a, wdth 75-112.5 for the code's font-stretch), the commit's OFL.txt (sha256 ddafd2c3...c256). - head-end.html: @font-face for each with font-display: swap and the same family names, a preload for the upright Instrument Sans, and a comment recording every font's source, pin and full SHA-256s, Departure Mono's included. - TestNoThirdPartyLoads (internal/cli/docgen/site_test.go): lint:docs runs it on the site it builds (DOCS_SITE); it fails on any link, script, img/srcset, iframe, source, video, object, SVG image/use, style attribute, <style> block or stylesheet url()/@import pointing at a host other than hugo.yaml's and next.yaml's baseURL. TestPageLoads covers the scanner. - Branding links each font to its upstream repo and its served license; Contributing's Writing docs covers the fonts and the check. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2865158e02 |
feat(network): learn the hosts a new VM needs, then lock it to them (#22)
--network learn runs a VM on the internet tier while it records the hosts it reaches beyond its allowlist, shown as internet (learning). devvm network lock picks which of them go into the VM's own rules, ticking only reviewed registries on 443 and listing risky hosts apart, then gives the VM the allowlist tier at once. learn is per VM only. The lock command names its docs page in its about. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
3e81767482 |
refactor(cli): each command carries its own docs link, group and samples
A command's metadata moves from hand-kept tables into the command itself: an about (docs page, help group, why no --json) set as its Cobra Annotations. msg.commandDocs, commandGroups and withoutJSON are gone; TestDocLinks reads the links from the generated CLI reference, and help output and the reference are byte-identical. AGENTS.md's cli and vm rows point at new doc.go package comments. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
ae5c9b7221 |
docs(cli): reference pages keep their place when a command is added
Command pages carry no weight, so Hugo sorts the CLI section by title and a new command changes only its own page, _index.md and devvm.md; the built sidebar and index order are unchanged. TestPagesHaveNoWeight guards it, and .gitattributes marks messages_gen.go and the CLI pages as generated. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
81f3feeecf |
docs: each page's social card shows its title and what it covers (#21)
## What this changes Every page on devvm.dev and next.devvm.dev gets its own Open Graph card, which Hugo draws when it builds the site. Each card is the brand card (the pixel logo with the lock, black, the lime bar, devvm.dev) with the page's section in lime capitals, its title, and a short explainer of what the page covers. > [!NOTE] > The six preview cards in `docs/og-preview/` were for review only. `chore(docs): drop the preview social cards` removes them again, so the squashed commit doesn't have them, and the images below still show from the commit that added them. - **The template**, `docs/assets/images/og-template.png`, is `docs/static/images/social-card.png` with the headline and tagline rows filled with the background's exact black. The repo has no SVG or generator for the card: it was a headless Chrome screenshot of the logo SVG and text. The old card has only four colors (`#000000`, `#7fff00`, `#eeeeee`, `#8f93a2`) and no antialiasing, so filling those rows leaves no marks. The logo, `devvm.dev` and the bar match the card pixel for pixel, and the template has those four colors and nothing else. - **The drawing**, `docs/layouts/_partials/og-image.html`, uses `images.Text` with Departure Mono at multiples of 11px (22px for the section label, 66, 55 or 44px for the title, whichever fits it in two lines, and 33px for the explainer). Every line starts on a whole pixel, so the generated cards also have exactly the template's four colors and no antialiasing: they are as crisp as the logo. `og-wrap.html` wraps lines by length, because the font is monospaced. The block is centered between the logo and devvm.dev. The section is the page's section title, *Docs* on a section's own page, and none on the home, branding and taxonomy pages. - **The font:** Departure Mono **v1.500**, the release the site's woff2 comes from (checked: the woff2 in the release zip is byte-identical to `docs/static/fonts/departure-mono/DepartureMono-Regular.woff2`, sha256 `5b4fed1d…`, and so is the LICENSE). That release ships an OTF, not a TTF. Hugo's `images.Text` reads it fine, so `docs/assets/fonts/departure-mono/` has `DepartureMono-Regular.otf` (sha256 `4d53f663155cf8bf7ffc8e688776e719625f7bbb80a8d90073438b249261a2e0`) and its OFL. Source: `gh release download v1.500 -R rektdeckard/departure-mono`, `DepartureMono-1.500.zip`, sha256 `bf3e48059aeef4617ec585bdea81dcc3491c576b3e7a472f52faf40e09ee5c3a`. - **The tags:** `custom/head-end.html` writes `og:image`, `og:image:type`, `og:image:width`/`height`, `og:image:alt` and `twitter:image:alt`. The alt text is `devvm docs: TITLE: EXPLAINER`. `_partials/_funcs/get-page-images.html` replaces Hugo's own, which Hugo's `twitter_cards.html` and `schema.html` call, so `twitter:card` is `summary_large_image` and `twitter:image` and `itemprop=image` are the same card. `params.images` is removed from `hugo.yaml`, so Hextra's `opengraph.html` writes no second `og:image`. In the built site, every one of the 115 HTML pages (the 404 included) has exactly one `og:image`, and each card is different. - **The explainer** is a new front matter key, `explainer`, not `description`. `description` is the page's meta description, `og:description`, the search snippet and its `llms.txt` line. Those want a sentence or two, and only two pages have one. A 4–9 word card line would be a weak search snippet. Every hand-written page has one. The CLI pages get their command's `Short` from `internal/cli/docgen` (`mise run cli-docs` rerun), and the reference's index gets a fixed one. The home page also sets `cardTitle: One VM for every project` (the hero's headline), because its title, `devvm`, would repeat the logo. - **The guard:** `TestExplainers` in `internal/cli/docgen/explainer_test.go` fails when any page under `docs/content` has no `explainer`. It also fails when the explainer takes more than two card lines of 48 characters (33px), or when the title (or `cardTitle`) takes more than two lines of 36 characters (44px). Those are the card's real limits, and they also cover the longest `Short`s. It runs in `mise run test` and in `mise run lint:docs`, next to `TestDocLinks`. `TestFrontMatter` and `TestWrappedLines` cover its parsing. - **Docs:** Contributing › Writing docs describes the cards, the key and the test. The branding page says each page has its own card. `social-card.png` stays as the brand asset. ### Numbers | | Before (main) | After | | --- | --- | --- | | Built site (`hugo -s docs --minify`, apparent size) | 40,194 KB | 42,138 KB (+1.9 MB) | | Cards | 1 static card | 115 PNGs, 14.9–16.6 KB each, 1.84 MB total | | Build time, image cache cold (`--ignoreCache`) | ~1.0 s | 1.4–1.95 s | | Build time, image cache warm | ~1.0 s | ~1.0 s | The cards are smaller than the prototype's estimate (about 16 KB, not 22–34 KB), because they have only four colors. next.devvm.dev: `hugo -s docs --minify --config hugo.yaml,next.yaml` gives `og:image`, `twitter:image` and `itemprop=image` as `https://next.devvm.dev/images/og-template_hu_….png` on every page. ### Examples | Home | Short title | | --- | --- | |  |  | | **Longest title (two lines)** | **CLI page, longest explainer** | |  |  | | **Section index** | **How it works page** | |  |  | ### Every page's card From a local `hugo -s docs --minify` build. "(none)" is a page whose card has no section label or no explainer. The 404 page's card, titled *404 Page not found*, isn't listed. | Section | Page | Title | Explainer | Card | | --- | --- | --- | --- | --- | | (none) | `/branding/` | Branding | devvm's logo, icons, colors and fonts | 15.6 KB | | (none) | `/categories/` | Categories | (none) | 15.0 KB | | Docs | `/docs/backends/` | Backends | The program that runs devvm's VMs | 15.7 KB | | Backends | `/docs/backends/lima/` | Lima | What Lima needs, and how devvm uses it | 15.7 KB | | CLI reference | `/docs/cli/devvm_adopt/` | devvm adopt | Give this folder the VM made for an earlier folder or path | 16.3 KB | | CLI reference | `/docs/cli/devvm_agent_import/` | devvm agent import | Copy the agents' settings and logins from this machine into devvm's store | 16.6 KB | | CLI reference | `/docs/cli/devvm_agent_login/` | devvm agent login | Log an agent in, in this folder's VM, and save the login in devvm's store | 16.6 KB | | CLI reference | `/docs/cli/devvm_agent_save/` | devvm agent save | Copy the agents' settings from this folder's VM into devvm's store | 16.5 KB | | CLI reference | `/docs/cli/devvm_agent/` | devvm agent | Fill devvm's store of the agents' settings and logins that every VM gets | 16.6 KB | | CLI reference | `/docs/cli/devvm_build/` | devvm build | Build an image and the images under it, unless they're built | 16.4 KB | | CLI reference | `/docs/cli/devvm_clone/` | devvm clone | Show or change whether this folder's VM has its own clone of the repo | 16.4 KB | | CLI reference | `/docs/cli/devvm_code/` | devvm code | Open this folder's VM in VS Code over Remote-SSH | 15.9 KB | | CLI reference | `/docs/cli/devvm_completion/` | devvm completion | Print the shell completion script for bash, zsh or fish | 16.3 KB | | CLI reference | `/docs/cli/devvm_desktop/` | devvm desktop | Open this folder's VM's desktop in a VNC viewer | 16.0 KB | | CLI reference | `/docs/cli/devvm_doctor/` | devvm doctor | Check what devvm needs on this machine | 15.8 KB | | CLI reference | `/docs/cli/devvm_gc/` | devvm gc | Delete stale images, unused tools, old files and the Nix cache over its cap | 16.4 KB | | CLI reference | `/docs/cli/devvm_git-protect/` | devvm git-protect | Show or change .git protection for this folder's VM | 16.3 KB | | CLI reference | `/docs/cli/devvm_group_join/` | devvm group join | Put this folder's VM in a group of VMs | 15.9 KB | | CLI reference | `/docs/cli/devvm_group_leave/` | devvm group leave | Take this folder's VM out of its group | 16.0 KB | | CLI reference | `/docs/cli/devvm_group/` | devvm group | Show the group this folder's VM is in | 15.9 KB | | CLI reference | `/docs/cli/devvm_history_export/` | devvm history export | Save this folder's VM's agent history to a .tar.gz | 16.5 KB | | CLI reference | `/docs/cli/devvm_history_import/` | devvm history import | Put an export of agent history into this folder's VM | 16.4 KB | | CLI reference | `/docs/cli/devvm_history/` | devvm history | List the saved exports of agents' history | 16.0 KB | | CLI reference | `/docs/cli/devvm_host/` | devvm host | Get this folder's VM ready for ssh and editors, and show its host name | 16.4 KB | | CLI reference | `/docs/cli/devvm_images_rm/` | devvm images rm | Delete images, by name or by key | 15.9 KB | | CLI reference | `/docs/cli/devvm_images/` | devvm images | List the images and the shared tools | 15.9 KB | | CLI reference | `/docs/cli/devvm_layer_add/` | devvm layer add | Make this folder's VM again with more layers, then open a shell in it | 16.6 KB | | CLI reference | `/docs/cli/devvm_layer_new/` | devvm layer new | Start a layer of your own | 15.8 KB | | CLI reference | `/docs/cli/devvm_layer_rm/` | devvm layer rm | Make this folder's VM again without some of its layers, then open a shell in it | 16.6 KB | | CLI reference | `/docs/cli/devvm_layer/` | devvm layer | Make image layers of your own, or change this folder's VM's layers | 16.6 KB | | CLI reference | `/docs/cli/devvm_limactl/` | devvm limactl | Run Lima's limactl for debugging, which starts VMs unconfined, whatever their tier | 16.6 KB | | CLI reference | `/docs/cli/devvm_link_add/` | devvm link add | Link this folder's VM to a port of another VM | 16.0 KB | | CLI reference | `/docs/cli/devvm_link_publish/` | devvm link publish | Show or add the ports this folder's VM offers to links | 16.3 KB | | CLI reference | `/docs/cli/devvm_link_rm/` | devvm link rm | Remove one of this folder's VM's links | 15.8 KB | | CLI reference | `/docs/cli/devvm_link_unpublish/` | devvm link unpublish | Stop offering ports of this folder's VM to links | 16.1 KB | | CLI reference | `/docs/cli/devvm_link/` | devvm link | List this folder's VM's links to your other VMs | 16.0 KB | | CLI reference | `/docs/cli/devvm_ls/` | devvm ls | List the project VMs | 15.7 KB | | CLI reference | `/docs/cli/devvm_network_allow/` | devvm network allow | Allow hosts for this folder's VM | 15.9 KB | | CLI reference | `/docs/cli/devvm_network_deny/` | devvm network deny | Deny hosts for this folder's VM | 15.9 KB | | CLI reference | `/docs/cli/devvm_network_log/` | devvm network log | Show what this folder's VM connected to and what its proxy blocked | 16.5 KB | | CLI reference | `/docs/cli/devvm_network_rm/` | devvm network rm | Remove rules from this folder's VM | 15.8 KB | | CLI reference | `/docs/cli/devvm_network/` | devvm network | Show or change the network tier of this folder's VM | 16.2 KB | | CLI reference | `/docs/cli/devvm_ports_add/` | devvm ports add | Forward more ports from this folder's VM | 16.0 KB | | CLI reference | `/docs/cli/devvm_ports_rm/` | devvm ports rm | Stop forwarding some ports from this folder's VM | 16.1 KB | | CLI reference | `/docs/cli/devvm_ports/` | devvm ports | Show or change which ports this folder's VM forwards | 16.3 KB | | CLI reference | `/docs/cli/devvm_rebuild/` | devvm rebuild | Build an image again, and delete the old one | 16.0 KB | | CLI reference | `/docs/cli/devvm_restart/` | devvm restart | Restart this folder's VM and open a shell in it | 16.0 KB | | CLI reference | `/docs/cli/devvm_retention/` | devvm retention | Show or change what devvm deletes on its own | 15.9 KB | | CLI reference | `/docs/cli/devvm_rm/` | devvm rm | Delete this folder's VM, or a VM whose folder is gone | 16.1 KB | | CLI reference | `/docs/cli/devvm_secret_rm/` | devvm secret rm | Delete a saved secret | 15.7 KB | | CLI reference | `/docs/cli/devvm_secret_set/` | devvm secret set | Save a secret on this machine | 15.8 KB | | CLI reference | `/docs/cli/devvm_secret_unuse/` | devvm secret unuse | Stop this folder's VM using a secret | 16.0 KB | | CLI reference | `/docs/cli/devvm_secret_use/` | devvm secret use | Let this folder's VM use a secret | 15.8 KB | | CLI reference | `/docs/cli/devvm_secret/` | devvm secret | List the secrets kept on this machine, for VMs to use | 16.2 KB | | CLI reference | `/docs/cli/devvm_setup/` | devvm setup | Choose base's features, and new VMs' size, network tier, coding agents and layers | 16.6 KB | | CLI reference | `/docs/cli/devvm_size/` | devvm size | Show or change this folder's VM's size | 15.9 KB | | CLI reference | `/docs/cli/devvm_space/` | devvm space | Show what devvm keeps on this machine and the space it takes | 16.3 KB | | CLI reference | `/docs/cli/devvm_ssh-agent_add/` | devvm ssh-agent add | Load a key into devvm's own SSH agent | 16.0 KB | | CLI reference | `/docs/cli/devvm_ssh-agent_rm/` | devvm ssh-agent rm | Remove a key from devvm's own SSH agent | 16.0 KB | | CLI reference | `/docs/cli/devvm_ssh-agent/` | devvm ssh-agent | Show or change SSH agent forwarding for this folder's VM | 16.4 KB | | CLI reference | `/docs/cli/devvm_stop/` | devvm stop | Stop this folder's VM | 15.6 KB | | CLI reference | `/docs/cli/devvm_tools_add/` | devvm tools add | Add shared tools to this folder's VM, then open a shell in it | 16.3 KB | | CLI reference | `/docs/cli/devvm_tools_rm/` | devvm tools rm | Take shared tools out of this folder's VM, then open a shell in it | 16.3 KB | | CLI reference | `/docs/cli/devvm_tools_update/` | devvm tools update | Move this folder's VM to the newest shared tools, then open a shell in it | 16.5 KB | | CLI reference | `/docs/cli/devvm_tools/` | devvm tools | Show or choose this folder's VM's shared tools | 15.9 KB | | CLI reference | `/docs/cli/devvm_update/` | devvm update | Bring this folder's VM up to date, then open a shell in it | 16.3 KB | | CLI reference | `/docs/cli/devvm_upgrade/` | devvm upgrade | Install devvm's newest release | 15.8 KB | | CLI reference | `/docs/cli/devvm/` | devvm | Open a shell in this folder's VM, creating it first | 16.1 KB | | Docs | `/docs/cli/` | CLI reference | Every devvm command, with its arguments and flags | 16.1 KB | | Docs | `/docs/contributing/` | Contributing | Build devvm, run its tests and follow its rules | 15.8 KB | | Contributing | `/docs/contributing/maintaining/` | Maintaining | Bump pinned versions, release devvm and run the docs sites | 16.3 KB | | Contributing | `/docs/contributing/testing/` | Testing on other hosts | Run devvm's tests on Linux, x86_64 and other hosts | 16.3 KB | | Getting started | `/docs/getting-started/commands/` | Everyday commands | The commands you use most, in their groups | 16.0 KB | | Getting started | `/docs/getting-started/first-vm/` | Your first VM | Make a project's VM and start an agent in it | 16.0 KB | | Docs | `/docs/getting-started/` | Getting started | From installing devvm to your first VM | 15.9 KB | | Getting started | `/docs/getting-started/install/` | Installing | Install devvm and check what it needs | 15.8 KB | | (none) | `/docs/` | Docs | The guides, in the order you'll need them | 15.6 KB | | How it works | `/docs/internals/backends/` | Backends | What a backend gives devvm, and how VMs are named | 16.1 KB | | How it works | `/docs/internals/design/` | Design notes | Why devvm is built this way, and what's open | 15.9 KB | | How it works | `/docs/internals/desktop/` | The desktop | How devvm desktop serves a VM's desktop | 15.9 KB | | How it works | `/docs/internals/git-protection/` | .git protection | What devvm locks in .git, and when | 15.9 KB | | How it works | `/docs/internals/images/` | Images and caching | How images and shared tools are built and cached | 16.2 KB | | Docs | `/docs/internals/` | How it works | How devvm works, for reviewers and contributors | 15.9 KB | | How it works | `/docs/internals/install/` | Installing and updating | What the install script and devvm doctor check | 16.1 KB | | How it works | `/docs/internals/lima/` | Lima | How devvm sets up, confines and clones Lima's VMs | 16.0 KB | | How it works | `/docs/internals/network/` | Network tiers | How the proxy confines VMs and keeps your secrets | 16.2 KB | | How it works | `/docs/internals/overview/` | Overview | What devvm does at each step of a VM's life | 15.8 KB | | How it works | `/docs/internals/ports/` | Port forwarding | How devvm forwards a VM's ports to this machine | 16.1 KB | | How it works | `/docs/internals/security/` | Security model | What devvm protects, how, and what it doesn't | 16.0 KB | | Staying safe | `/docs/safety/attack-vectors/` | Attack vectors | Common attacks, and what devvm does about each | 15.9 KB | | Staying safe | `/docs/safety/git-protection/` | .git protection | Keep code in the VM out of your .git | 16.0 KB | | Docs | `/docs/safety/` | Staying safe | How devvm keeps untrusted code off your machine | 16.0 KB | | Staying safe | `/docs/safety/network/` | Network tiers | Choose what each VM can reach on the network | 15.9 KB | | Using devvm | `/docs/using/clone/` | Working on a clone | Give a VM its own clone of the repo | 15.9 KB | | Using devvm | `/docs/using/coding-agents/` | Coding agents | Run Claude Code, Codex and opencode in a VM | 16.0 KB | | Using devvm | `/docs/using/command-line/` | The command line | Help, flags, questions, JSON output and completion | 16.3 KB | | Using devvm | `/docs/using/customizing/` | Customizing images | Add your own layers and choose base's features | 16.1 KB | | Using devvm | `/docs/using/desktop/` | A VM's desktop | Add a desktop to a VM and open it | 15.8 KB | | Using devvm | `/docs/using/devcontainer/` | devcontainer.json | Set up a VM from a project's devcontainer.json | 16.1 KB | | Using devvm | `/docs/using/from/` | Starting from a container image | Start base from a Debian, Ubuntu or Alpine image | 16.6 KB | | Using devvm | `/docs/using/images/` | Images and tools | The images VMs are made from, and their tools | 16.1 KB | | Docs | `/docs/using/` | Using devvm | What you change in your VMs as you work | 15.9 KB | | Using devvm | `/docs/using/limits/` | Known limits | What devvm can't do, and where | 15.7 KB | | Using devvm | `/docs/using/links/` | Links between VMs | Let one VM reach a service in another by name | 16.1 KB | | Using devvm | `/docs/using/ports-size/` | Ports and size | Forward a VM's ports and change its size | 15.9 KB | | Using devvm | `/docs/using/settings/` | Settings and files | The files you edit and the files devvm keeps | 16.2 KB | | Using devvm | `/docs/using/space/` | What devvm keeps on this machine | Each file devvm keeps, and how it's cleaned up | 16.5 KB | | Using devvm | `/docs/using/ssh/` | SSH and editors | Reach VMs by name from ssh and VS Code | 15.9 KB | | Using devvm | `/docs/using/toolchains/` | Toolchains | The toolchains VMs get, and the files that choose them | 16.2 KB | | Using devvm | `/docs/using/troubleshooting/` | Troubleshooting | What to do when something fails | 15.9 KB | | Using devvm | `/docs/using/upgrading/` | Upgrading and uninstalling | Upgrade devvm, or remove it and what it keeps | 16.5 KB | | Using devvm | `/docs/using/vms/` | Managing VMs | Open, stop, delete and list your VMs | 15.9 KB | | (none) | `/` | One VM for every project | An isolated sandbox for you or a coding agent | 16.1 KB | | (none) | `/tags/` | Tags | (none) | 14.9 KB | ## How it was tested - `mise run fmt && mise run lint && mise run test` passes on macOS. `mise run lint:docs` passes: markdownlint, Vale, lychee, `TestDocLinks`, `TestCommandLines`, `TestExplainers` and the `--panicOnWarning` build. - I built devvm.dev and next.devvm.dev, checked that every HTML page has exactly one `og:image`, and opened the cards for the home page, a short title, the longest title, the longest CLI explainer, a section index, a How it works page and the 404. I checked each card's color histogram: four colors, so there's no antialiasing and no marks from the template. - No e2e: the change is docs only. ## Checklist - [x] The title is a Conventional Commit, `type(scope): summary`, because it becomes the squashed commit's subject. - [x] `mise run fmt && mise run lint && mise run test` passes. - [x] New behaviour has tests, and every behaviour change updates its page in `docs/content/docs/`. - [x] A changed command follows the cli skill, and `mise run cli-docs` is rerun when its help changed. (No command changed. `cli-docs` was rerun for the generated explainers.) - [x] Nothing here belongs in a private security advisory instead (see SECURITY.md). **Ready to merge:** the previews are removed and main (#25) is merged in. The gate passes on macOS (2362 tests). 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 <[email protected]> |
||
|
|
8d44175601 |
refactor: the Go module is github.com/devvmhq/devvm
Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
5f7289e6f7 |
feat(cli): devvm upgrade, the newest release the way devvm was installed
devvm upgrade [--check] [--to VERSION] [-f/--force] [--json] installs devvm's newest release the way this devvm was installed, asking first (upgrade_confirm, answered by --force). upgrade is a top-level exception in the cli skill: it acts on devvm itself, not this folder's VM, and it's the name other tools give the verb. It skips the layout check, as a layout a newer devvm wrote is a reason to run it. - install.sh's (<prefix>/lib/devvm/<version>/devvm, which <prefix>/bin/devvm links to): SHA256SUMS and its .minisig over HTTPS, the signature checked against the key built in from packaging/minisign.pub (packaging/key.go embeds the folder; no file, no key, and upgrade_no_key), the archive's SHA-256, unpacked into lib/.<v>.new.<pid>, run (--version), renamed to lib/<v>, the link switched atomically (symlink beside, rename over), run again through the link, rolled back on any failure; then older versions pruned as install.sh does (kept: the one that ran, any a running process names, another upgrade's staging folder). - Homebrew's (a Cellar/devvm/ keg): brew upgrade devvm, asked first, through the run log; --to refused. - Anything else: says how it was installed (a checkout build, go install, a copy elsewhere) and fails. - Already latest says so; a newest release older than this devvm is refused even with --force (rollback); --to installs a named one, older asked about (upgrade_confirm_older). --check and --json install nothing. minisign verification is Go's: ed25519 over blake2b.Sum512 for the default prehashed ED signature (legacy Ed refused), the key ID, the global signature over signature||trusted comment, and the trusted comment "devvm <version>" as scripts/release.sh writes it. Verified against a signature minisign 0.12 made. golang.org/x/crypto v0.58.0 added for blake2b only (approved; depguard allows only golang.org/x/crypto/blake2b); MVS raised x/text to v0.43.0 and x/tools to v0.51.0. mise run vuln: no vulnerability reached; the module-level GO-2026-5932 is x/crypto/openpgp, which devvm doesn't import. New: internal/upgrade (Detect, Source: Latest, Check for the release notice to call, Fetch; ParsePublicKey/Verify; Valid/Compare; Upgrader), internal/upgrade/upgradetest (TLS release server, minisign signer; tests only, a structure layer), fetch.Resolve (where a HEAD's redirects end), fetch.Download's size cap (mise's 256 MiB too). Test-build overrides: DEVVM_REPO_URL, DEVVM_RELEASE_KEY, DEVVM_RELEASE_CA, DEVVM_TEST_VERSION; script command release_server [-badsig]. Security review (security-audit skill, guidance mode, a fresh reviewer): - Prerelease order compared suffixes as text (rc.10 < rc.9), which let an older signed prerelease past the rollback refusal: fixed, semver precedence, with table cases. - No cap on the archive download (a host could fill TMPDIR before the checksum failed): fixed, fetch.Download takes a limit. - Two upgrades at once: prune removed another's staging folder: fixed, .<v>.new/old.<pid> folders are kept while that pid runs. - A failed rollback of the link was silent: fixed, upgrade_rollback_failed names the link and the old devvm, and the new folder stays so the link isn't left dangling. - QEMU's guestfwd names devvm with commas doubled, which the in-use check missed: fixed. - Freeze (a host serving the current version as newest forever): no boundary crossed, inherent without signed expiring metadata; documented in internals/install.md. Checked sound: nothing untrusted runs or unpacks before the signature and SHA-256; versions from the redirect and --to pass Valid before any URL or path; tar takes only regular files in its one folder (no links, subfolders, ..), 512 MiB cap, fixed modes; test overrides are read only by test builds. Tests: minisign (real minisign fixture, tampering, legacy, other key), each install kind against the fake TLS server, bad signature, wrong trusted comment, replaced archive (wrong SHA), bad archives, a new devvm that fails before and after the switch, a failed switch (old kept), a failed rollback, downgrade refused and --to, pruning, Homebrew via a brew script, Check, Latest's failures, Compare; CLI test upgrade.txtar. Docs: getting-started/install.md (Upgrading: how, what it checks, an older release, --json), getting-started/commands.md (This machine row, Upgrading devvm, questions, output for scripts), internals/install.md (devvm upgrade), contributing (release_server), the CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2df3c6840c |
feat(agents): devvm agent login, an agent's login in the VM for every VM
devvm agent login codex|opencode logs the agent in from inside this
folder's VM, so this machine never needs Codex or opencode, and devvm's
agent store keeps the login for every VM with the agent. It sits under
devvm agent beside import and save: it fills the store, as they do, and
a bare devvm login would read as a verb on the VM itself.
- Browser login (the default): the agent's own login runs in the VM on
this terminal (codex -c cli_auth_credentials_store="file" login;
opencode auth login --provider openai --method "ChatGPT Pro/Plus
(browser)"), and devvm forwards this machine's localhost:1455, and
1457 (Codex's fallback) when free, on 127.0.0.1 and ::1, to the same
ports on the VM's loopback, only while the login runs: closed when it
ends, fails or is interrupted (AddCleanup), and an interrupt also ends
the agent's login in the VM (its pid kept in ~/.cache/devvm-login.pid),
so its server doesn't linger for the VM's port forwarder. Port 1455
taken on this machine: refused, naming --device-code.
- --device-code: codex login --device-auth, or opencode's headless
ChatGPT login; nothing forwarded.
- --api-key [--provider anthropic|openai|openrouter] [--stdin]: the key
is asked for on this machine (msg.Question answered by --stdin) and
saved in the store, never in the VM: Codex's auth.json becomes
{auth_mode: apikey, OPENAI_API_KEY}, opencode's gets the provider's
{type: api, key} beside the others; the running VM gets its copy with
a placeholder and its proxy the binding at once.
- The proxy's capture (agentlogin's capturers) saves ChatGPT logins;
devvm then confirms what the store saved, with the account's email,
and fails when the login saved nothing new.
- opencode 1.19.5 has no Anthropic OAuth in its core (no Anthropic
plugin among its built-ins), so there's no pasted-code capturer:
Anthropic is an API key. opencode's OpenAI login listens on 1455 only;
Codex 0.166 on 1455, falling back to 1457.
- vmssh: SSH.ForwardLoopback (LoopbackForward: listeners in devvm's own
process, each connection its own ssh -W to the VM's 127.0.0.1, no
master; ErrPortTaken).
- agentlogin: KeyProviders, File.SetKey, File.ChatGPT.
- secrets: Store.SaveKey, LoginSum, ChatGPT (loginsDir shared with
Capture).
- vm: AgentLogin (agentlogin.go), LoginAgents.
- cli: agentlogin.go (--device-code, --api-key, --provider, --stdin,
--here/--parent); usage errors before anything runs.
- assets/guest/sync.sh: cli_auth_credentials_store = "file" first in
the VM's ~/.codex/config.toml on every launch.
- Messages: agent_login_* and agent_key_*; codex_no_key,
codex_no_chatgpt, codex_refresh_failed and opencode_refresh_failed
point at devvm agent login.
- Tests: agent_login.txtar (usage errors, no VM, no agent, device code
argv, browser forward and its end, the agent failing, a login saved
while it runs, port taken, interrupt, API keys, the VM's copy failing,
no terminal, an empty key), unit tests for the forward, SetKey,
ChatGPT, SaveKey, the confirmation and the argv; coverage baselines
raised.
- e2e (network): the real Codex's login in the VM against the run's
fake token endpoint, its callback opened through the forward, the
store's tokens and key, placeholders in the VM, the forward gone; an
interrupted login takes its forward away.
- Docs: Logging in with devvm agent login (using/coding-agents.md),
the Commands page, the questions table, Contributing's e2e, the cli
skill's tree, AGENTS.md; the CLI reference.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
0a28f98f0a |
feat(agents): devvm agent save, a VM's agent settings into devvm's store
devvm agent save [AGENT...] reads the folder's VM's agents' settings,
shows what differs from devvm's agent store and, after a yes, saves them
there for every VM: import's other direction. It always asks, with no
flag that answers (RefusedWith), so without a terminal or with
--no-input it shows the diff and is refused; devvm starts a stopped VM
for it.
What it reads (a fixed list, the agents asked for only): agentFilesOf
(Claude Code's settings.json and CLAUDE.md, Codex's config.toml and
AGENTS.md), agentDirsOf (skills, agents, commands, output-styles,
plugins with marketplaces; prompts, skills), opencode's config folder's
entries but node_modules and lock files, and ~/.claude.json's subset
(claudeTopKeys, reduced by jq in the VM and again on the host, never its
per-project entries). Never a login (.credentials.json, auth.json) or
history. The guest script sends it as a tar stream; a folder that's the
store's own mount (the link to it) is no change.
Every byte from the VM is untrusted, checked on the host (readSent):
- the stream bounded: 128 MiB, the command cancelled past it; its
stderr into the run log, at most 1 MiB
- at most 20,000 entries, a file at most 16 MiB (its header first)
- paths relative, clean, valid UTF-8, only characters a terminal shows
(no control, format, bidi or zero-width), each once, only in the
list, each inside a folder the stream has (nothing below a link):
anything else saves nothing
- only files, folders and links; other kinds left out with a warning
- links never written: one inside its settings folder to a file there,
by relative paths through real folders, at most 8 hops, becomes a
copy; any other is left out, the store's copy kept
- modes normalized: 600, or 700 when executable; no set-id bits
- every file written with state.WriteFileMode; folders replaced in
place (pruneStore through an os.Root), files the VM lacks kept
- every settings file parsed whole (Redact's decode), left out when it
doesn't parse
- placeholders never saved: agentlogin.Restore puts the store's value
back only where the VM's copy (the store's file redacted again, or
for .claude.json the VM's salted claudeVM copy, as every VM gets)
had the same placeholder at the same path and its table and the one
above are unchanged; else the file is left out. A placeholder in any
other file leaves it out; opencode's withheld files, which no VM
gets, are left out.
The diff (data output): each file's lines against the store's, settings
files and .claude.json redacted on both sides so it never prints a
secret, a folder's A/M/D list then each added or changed file's diff, a
mode change line, every character a terminal wouldn't show as \u{HEX},
binary files named only, a file over 1 MiB or 10,000 lines and lines
past 20,000 as counts. Then agent_save_runs: every VM runs the hooks,
MCP servers' commands and plugins saved.
Security review (security-audit skill, guidance mode, an independent
read): nothing reaches outside the store, follows a link, or sends a
store secret to another host. Findings, all fixed here:
- folder files showed only as A/M/D names, so a changed hook or
script went in unseen: their diffs are shown
- invisible Unicode (tag characters, zero-width) passed
msg.Printable into the diff: shownLine escapes every non-graphic
character
- names with bidi or format characters spoofed the diff's headers:
refused in entryName, headers escaped too
- the diff could use GBs of memory on 16 MiB files of newlines: per
file and total caps
- Restore's rewritten JSON/TOML hid a change among reformatted lines:
both sides are diffed as rewritten
- the VM's stderr went into the run log without limit: 1 MiB
- quadratic work over many opencode folders: entries indexed by folder
- an execute-bit change showed no line: a mode line
Found in my own review: the diff printed the store's secrets in
context lines (now redacted), and a VM could replace opencode files
it never got, such as a .env (now left out). With captured logins,
HasPlaceholder also knows the JWT-shaped placeholders (fakeJWT's
devvm-placeholder signature, now jwtMark), so a captured token's
placeholder copied into a settings file is never saved; the save never
writes Codex's or opencode's auth.json or Claude Code's
.credentials.json, which the capture keeps in the logins store.
- agentlogin: Restore, PlaceholderError, HasPlaceholder, ClaudeSubset,
ClaudeTopKeys; Redact and ClaudeCopy share decode/encode
- vm: AgentSave (agentsave.go), readSent, listedPath, resolve,
agentSaveScript (agentsave_read.go), lineDiff, shownLine
(linediff.go); opencodeFolder/opencodeFile from agentDirs/agentFiles
- cli: devvm agent save, with --here/--parent
- messages: agent_save_no_agent, agent_save_none, agent_save_nothing,
agent_save_ask, agent_save_runs, agent_save_refused, nothing_saved,
agent_settings_saved, agent_save_unsafe, agent_save_too_much,
agent_save_link_left_out, agent_save_kind_left_out,
agent_save_unparsed, agent_save_placeholder, agent_save_withheld,
agent_save_not_read, agent_save_failed
- stub: agent-save.tar, the VM's stream
- tests: agentsave_test.go, linediff_test.go, restore_test.go,
testdata/script/agent_save.txtar; e2e project (refused, then saved,
never the login or a link out) and network (MCP header put back,
refused once its URL changed)
- docs: coding agents (saving a VM's settings), commands, attack
vectors, internals network (saving the copies back), contributing,
the cli skill's tree, CLI reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
317bd8f978 |
feat(agents): devvm's agent store, filled by devvm agent import
Every VM gets its agents' settings and logins from devvm's own store, never from the agents' files in the home folder: settings in ~/.config/devvm/agents/<agent>/, logins in ~/.local/share/devvm/logins/<agent>/ (folders 700, files 600, each agent's logins folder kept out of Time Machine), each laid out as in a home folder. The store's settings folders are mounted read-only and linked into the VM's home; its files and logins are copied in, with network policy as placeholders the proxy fills from the store. devvm agent import [AGENT...] [--force] copies the home folder's agent settings and logins into the store once: only agentDirs, agentFiles and secrets.LoginRel's paths, never history; .claude.json reduced to its settings, account state and MCP servers; read through each agent's folder as an os.Root, so no link out of it is followed (a link to a file inside becomes a copy, any other is left out with a warning, and so is a login file that's a link); Claude Code's plugin records renamed to the store's folders. It asks before replacing what the store has (refused without a terminal, naming --force), replaces in place, keeping the mounted folders, and prunes what the home folder no longer has. - paths: Dirs.AgentSettings, Dirs.AgentLogins - secrets: LoginRel, LoginFile(Dirs, kind), SaveLogin, HasLogin, Store.ExcludeFromBackup; Logins, VMLogin, ClaudeCopy, MCPSecrets and the proxy's Get read the store - vm: agentStore, agentMounts/homeSkips/Inventory.Mounts take Dirs, syncer.stageAgents, AgentImport; the guest's links file holds each folder's home path and its mount's (host_home is gone) - structure: callers takes methods (pkg.Type.Name); Dirs.AgentSettings only in vm/agents.go, Dirs.AgentLogins only in secrets/secrets.go - messages: agent_import_none, agent_import_nothing, agent_import_replace, nothing_imported, agent_settings_imported, agent_login_imported, agent_import_link_left_out, agent_login_read_failed, agent_import_failed; the login refresh messages point at devvm agent import - tests: agentimport_test.go, testdata/script/agent.txtar, sync and network scripts through the store, e2e project and network sections - docs: coding agents (devvm's agent store, importing from this machine), README, getting started, safety, internals, contributing Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
c98f91d8ad |
feat(history): devvm history import, and a new VM offers its folder's newest export
devvm history import [FILE] puts an export of agents' history into this folder's VM: FILE, or the newest export devvm saved for the folder (by its .folder file, through vm.Exports.Newest), never another folder's. The file is streamed into the VM as it is, and the VM's GNU tar unpacks it there as the VM's user, so the host never reads it. The VM lists the export's paths as they are first and imports nothing when one is outside the agents' history, absolute or has a .. part (history_import_unsafe). It unpacks into a folder of its own without owners or modes and without the agents' logins, ~/.claude.json (the old VM's placeholders) and every agent's mounted folders and copied files (importSkips), takes out symlinks pointing outside, then copies the history paths into the home without replacing what the VM has. A new VM with an agent offers the folder's newest export: in a terminal it asks, [y/N] (history_import_ask); without one it says how to import later (history_import_later). The import runs once the VM has started, before its setup, and a failed one only warns. Messages: imported, history_not_imported, history_import_unsafe, history_no_export, import_failed, history_import_ask, history_import_later. Tests: TestHistoryImportScript, TestHistoryImportRuns (GNU tar only), history_import.txtar; the stub guest keeps an import as history-in.tgz and takes a history-unsafe switch. e2e's project section: rm, a new VM in the same folder naming the export, devvm history import, the history checked in the VM, and a refused export with a .. path. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
2933b535a9 |
feat(clone): devvm clone on|off switches a VM to or from its own clone
devvm clone [on|off] is a setting: bare (and --json) it shows whether the folder's VM has its own clone of the repo. on and off make the VM again through the shared remake, keeping its home folder and settings, after asking (--force, --no-export, --clean-home as devvm layer add). - on: a mounted VM is made again with nothing of the folder mounted; its branches are seeded as a new --clone VM's, and once the old machine is deleted, .git is checked as a launch does and unlocked. - off: the clone is checked as devvm rm does (unfetched branches offered for fetching into saved/<remote>/*, uncommitted changes asked about, terminal only; --no-clone-check skips it after a warning); the remote goes before the new machine's .git is locked, and is added back if the switch is undone. - The remake records its clone mode (remake.clone), so a remake that didn't finish finishes in it, and undo restores the old mode. - devvm --clone on a mounted VM and layer add/rm/update on a clone VM now name devvm clone on/off. rm's clone check messages name the command; --no-clone-check has one help text (addNoCloneCheckFlag). - teardown removes a clone's remote and .git's locks independently. Tests: TestSetCloneOn, TestSetCloneOff, TestSetCloneUndo, TestSetCloneRefuses, clone_switch.txtar, e2e clone section checks. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
4b9086e0cc |
feat(layer): devvm layer rm makes the folder's VM again without some of its layers, keeping its home and settings
devvm layer rm LAYER... [--force|--no-export|--clean-home] is the shared remake with layers taken out: Lifecycle.RemoveLayers works out the image (removedImage: the VM's other layers in their order, base when none is left), says the layers the VM lacks (lacks_layers) and refuses a name that isn't a layer, then remakeTo. AddLayers and RemoveLayers share remakeLayers, so neither copies the remake. Its Args refuse base, a shared tool's name and a name no layer can have (vm.CheckLayerNames), so one of the user's layers whose script is gone can still be taken out. devvm tools rm of a layer (custom_layer_remove) names devvm layer rm, and parts_flags_ignored and pick_vm_help name it beside devvm layer add. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f4ad9c2c3d |
feat(vm): devvm update makes an outdated VM again from its image's new build, keeping its home and settings
devvm update [--force|--no-export|--clean-home] (internal/cli/update.go) is the shared remake with the VM's own image name: Lifecycle.Update calls toRemake, decides with build.Builds.Outdated (WarnIfOutdated's check, now its owner) whether the chain's keys changed, says vm_current and does nothing when they didn't, else names what changed (vm_changed) and calls remakeTo. --from VMs are judged on the recorded digest and built with build's lookup. The remake's flags are one adder (addRemakeFlags) for devvm layer add and devvm update. vm_outdated names devvm update. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
cab497bc8f |
feat(layer): devvm layer add makes the folder's VM again with more layers, keeping its home and settings
The one remake in vm's Lifecycle (remake.go): the image built first, the agents' history exported and the home folder saved (home.go: the VM's tar stream filtered on the host), the VM stopped and its machine renamed aside (backend.Backend's Rename, limactl rename, vmname.Aside), the new machine made from vm.json, started, its home put back, then the old one deleted. A failure or interrupt before that puts the old VM back; a killed devvm leaves the remake section, which the next devvm or devvm layer add finishes. The VM keeps its ID (design.md). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
ae0fd533fc |
refactor(msg): names mode is the UI's, read once with each stream's style
A msg.M always renders as its text: String, Error, Parts and Segments no
longer read DEVVM_MESSAGES, and Line is gone. internal/ui reads names mode
in newStyle, with each stream's color, and shows messages as names through
the style (message, segments, line, valueParts). ui.New takes the function
it reads the environment with, so tests make a names-mode UI without
t.Setenv. Messages shown as data go through UI.Text or Table.Text (doctor
--json, ls's image cell, setup's network choices); vm.PickRow.Desc is a
msg.M that cli renders. A config.toml value's refusal keeps its message
(state.CorruptError.Msg, Shown), so fail shows its names in names mode.
Tests: ui TestNamesMode; state TestFiles covers Msg and Shown; Go tests
compare NamesOf or Names, and drop t.Setenv("DEVVM_MESSAGES") outside ui,
msg's TestNames and the testscript runner. The structure test lists
DEVVM_MESSAGES in internal/ui/style.go only; ui.UI's method limit is 47
(Text).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
f2a8ddd404 |
refactor: write every file whole through state, and make private folders with state.PrivateDir
internal/state is the one writer of whole files outside the proxy: state.WriteFileMode joins state.WriteFile for another mode (0700 for the QEMU wrapper and Docker's copies of devvm's Linux build), and state.PrivateDir makes a folder the user's alone (700), refusing a file or a symbolic link there, as vmssh's runDir did. - Deleted: both writeOwn (backend's build proxy, Docker's egress), lima's writeFile (the Seatbelt profile, the QEMU wrapper, the start record), vmssh's writeWhole and runDir, Docker's copyFile, the Linux build fetch's temporary file (fetch.Open's body is read whole, its SHA-256 checked, then written with state.WriteFileMode), and Resolve's .tmp-and-rename loop. The host's mise stays fetch.Download's. - os.WriteFile to state.WriteFile: tools (Resolve's and lockVersions' mise.toml, the checked file, the tools build's files), sshagent (two), ubuntu's checksum files, docgen's pages and backendtest's fake tool images. - state.PrivateDir for nine MkdirAll and Chmod pairs (eleven folders): the run log's two, tools' logs, secrets, netpolicy's CA, run, logs and socket folder, lima's run folder and the exports folder. MakePrivate and ~/.ssh keep following a link: where they live is the user's choice. - The proxy's writers are one, writeAtomic: the login files' writeJSON and the Nix cache's size file use it, its temporary files named .<name>.tmp-* as state's are. - forbidigo bans os.WriteFile outside internal/state, internal/proxy, internal/msg/gen, internal/stubtest and tests, with its line in testdata/lint/forbidigo.go. Tests: TestWriteFileMode, TestPrivateDir (a symbolic link to a folder refused, its folder's mode unchanged), TestWriteAtomic; mode checks on the Seatbelt profile and Docker's Linux build copy. Coverage baselines raised: lima, netpolicy, proxy, secrets, ui. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
665b9f3b22 |
feat(group): devvm group, group join NAME and group leave: VMs that reach each other's published ports by name, through links
A group's links are links in each member's state, marked as the group's (a sixth field, ,group), so the link session, the proxy's list and every connection check treat them as any link. Membership is each member's own state (group, group_as), so a VM made again is in none. - internal/vm/groups.go: Groups (Show, Join, Leave), groupLinks (pure: the user's links kept and taking precedence, a link per published port of each other member, one address per member kept across changes), sync/syncVM/change (records, names what each member gains and loses, applies to running members), clashes warned. - All or none: join refused by network policy (group_policy_on/off); devvm network on/off refused for a member (group_policy_mixed). - One group at a time (group_other); names unique in a group (group_name_taken, group_name_host); a member whose hostname is another's name gets no links to it (group_link_name_host). - CheckLink refuses a group's link once the two aren't in one group (ungrouped); leave removes the leaver's own group links first; join again works every member's links out again; link rm refuses a group's link that still applies (link_from_group). - Publish/unpublish, link add/rm and devvm rm reach the group's links. - Docs: using/links.md Groups, the Commands page, safety/network.md, internals/ports.md, the design note's Groups section and threat check; the CLI reference. - Tests: groups_test.go, testdata/script/group.txtar, JSON shape; e2e: three VMs in a group and the all-or-none refusals in the link section on every backend. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
4ea141b918 |
feat(link): devvm link, link add, rm, publish and unpublish, with their state and checks
Links between VMs' commands and state, without anything carrying a connection yet. - state: every VM gets a random ID (KeyID, "id") when CreateVM makes it. - vm: Links (links.go) lists, adds and removes the folder's VM's links (KeyLinks, "links": NAME,PORT,TARGET,TARGET_ID,ADDR entries) and publishes and withdraws its ports (KeyPublish, "publish"). Each target gets one address in 127.77.0.0/16 per client, the lowest free. CheckLink says why a link doesn't apply (gone, replaced, unpublished, policy). - project: Matching (which sshconfig.Alias now uses), IsPath, ForDir and Targets resolve a link's TARGET: a path, a VM's name or a folder name. - cli: link.go, in the Links between VMs group; --json on devvm link and devvm link publish; --as checked with the other flag values. - Messages: no_vm_link, link_failed, link_port_invalid, link_ports_invalid, link_unknown_target, link_ambiguous_target, link_self, link_not_published, link_policy_mismatch, link_name_invalid, link_name_host, link_name_taken, link_target_named, link_exists, link_added, link_trust, link_removed, link_not_found, link_port_taken, published, unpublished, port_not_published. - Docs: the Links between VMs table on the Commands page, the CLI reference, AGENTS.md and the cli skill's tree. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
0b03f334fb |
feat(cli): help in groups, with short texts, examples and each command's docs page
devvm --help lists the commands in groups: Your VM, Change your VM, Images, Disk space and This machine, with help under Cobra's Additional Commands. A group whose commands don't exist yet, such as Links between VMs, stays out of the help. Each command's Long is one to three sentences, and the rules it held are on the command's docs page. Every visible command has an Example, with the most common invocations first, each with a comment. Flag descriptions are shorter. Each help ends with the address of the command's docs page, and the root's also ends with the issue tracker. - internal/cli/help.go: commandGroups, addGroups, addDocs (Cobra's usage template with Docs and Issues sections), examples - internal/msg/docs.go: commandDocs, CommandDoc, CommandDocURL, IssuesURL; TestDocLinks checks commandDocs (user pages only) - docgen: each reference page has a Docs section before See also - docs: commands.md in the help's groups, with new sections on restarting and stopping and on deleting a VM; install.md has doctor's engine, feature values, Docker and CA notes; Contributing describes a command's help - tests: TestExamples, TestHelpGroupsAndDocs, TestAddGroups, TestWithDocs, TestCheckCommandDocs Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
3b1959efd2 |
feat(network): network policy rules and log under devvm network, and network -g for new VMs
devvm network allow|deny|rm RULE... [-g] and devvm network log [-f] [-n N] [--blocked] replace devvm policy and devvm log. Bare devvm network shows the VM's network policy, then its allowlist file by file. devvm network -g shows or saves whether new VMs get network policy (ask, on or off), through the network file devvm setup also writes; --network-policy and --no-network-policy beat it and skip reading it, a saved off makes a VM without the docker-layer and backend warnings, and with ask and no terminal a new VM gets it. The proxy's block messages, devvm-why's, network log --blocked's ALLOW WITH and the VM's setup note name devvm network allow. New messages: net_default_failed, net_ask_global; -g reports with network_default. Docs, the CLI reference, txtars (network_rules, network_log, network), e2e (bare devvm network's first line) and AGENTS.md follow. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
07ca65c098 |
feat(cli): devvm host, the tools noun and devvm history
devvm ssh is devvm host. devvm tools shows this folder's VM's shared tools (TOOL VERSION NEWER BUILT, from the lock as it is, never online); devvm tools add/rm TOOL... add and take out shared tools, each a word of its own (joined with + refused: tools_joined; add takes only shared tools: unknown_tool), and devvm tools update moves the VM to the newest. devvm IMAGE on a VM that exists adds nothing and asks nothing: it fails with vm_lacks_tools, naming the devvm tools add command, or vm_lacks_layer, as only a new VM gets a layer. devvm export is devvm history export [FILE]; devvm history lists the exports in the exports folder (FILE VM FOLDER DATE SIZE), the folder from a <export>.folder file written beside devvm's own exports and deleted with them. gc --exports is gc --history, retention's exports.age/count are history.age/count, and devvm space's row is history. The in-place layer machinery goes: Launch.addLayers and runLayers, dockerLayers' inPlace/set/unset, backend.DockerLayerVM.SetDockerLayer and the Docker backend's SetDockerLayer, with the add_in_place, restart_for_mounts, no_terminal_confirm, keeping, adding and add_layer_failed messages. vm.Tools (tools.go) holds Add, Remove, Update and List; tools.VMs.Show lists a VM's tools; tools.Remove takes names as a list; VMs.Update compares a VM's files as a set. New messages: vm_lacks_tools, vm_lacks_layer, has_tools, tools_joined, history_failed, tools_failed; renamed: unknown_tool, gc_history, gc_history_export, deleted_history, gc_older_than_needs_history. Command files: host.go, tools.go, history.go, refreshtools.go (_refresh-tools); ssh.go, remove.go, update.go, export.go and gc_exports.go gone. Tests: TestImageLacks, TestToolsAdd, TestShow, TestCompleteToolNames; history.txtar, gc_history.txtar, host_code.txtar and the e2e tools, docker layer and host checks updated. Docs, the CLI reference, AGENTS.md and the e2e header follow. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
18eefddc16 |
feat(cli): devvm retention, bare secret and ssh-agent, ssh-agent rm, and setup's network question
- devvm retention [KEY=VALUE...] shows every retention setting (off when
unset) and changes them; KEY=off turns one off, KEY= is refused and
nothing is written. devvm space only shows.
- devvm secret lists the secrets; devvm secret set claude saves the
Claude Code token. No auth or secret ls commands.
- Bare devvm ssh-agent shows the VM's forwarding, then devvm's own
agent's keys once one is added (it starts no agent without one).
devvm ssh-agent rm KEY_FILE takes a key out of devvm's agent, found by
its recorded fingerprint, and out of ~/.config/devvm/agent-keys; the
key file isn't touched, and a key not added is refused.
- devvm setup's flags are --backend and --features LIST|none ('' is
refused). In a terminal it also asks for new VMs' network policy (ask,
on, off), saved in ~/.config/devvm/network (Dirs.Network), which new
VMs read unless --network-policy or --no-network-policy is given.
Messages: features_empty, network_default, network_default_help,
network_default_ask/on/off, agent_key_not_recorded, agent_unload_failed,
agent_key_removed, retention_settings_failed; retention_unreadable,
agent_devvm_risk, no_claude_token and claude_token_invalid name the new
commands. paths: Dirs.Network (the structure test's Dirs limit is 42).
state: ReadNetwork, WriteNetwork, NetworkChoices, NetworkAsk/On/Off,
RetainOff. sshagent: Agent.Remove. Tests: TestNetwork, TestChooseNetSaved,
TestSetupNetworkStartsFromSaved, TestKeysNone, TestRemove, the real-agent
rm check; retention, setup, secret, ssh_agent and nix_cache scripts; e2e
checks for ssh-agent rm and retention.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
7cd15a0862 |
feat(retention): retention settings for what devvm keeps, all off by default
~/.config/devvm/retention holds key=value lines, written by devvm space set KEY=VALUE... (KEY= turns one off; a bad key or value is refused before the file is written; all off removes the file). Every setting is off unless set: - logs.runs: run logs kept (20 when off; ui.KeepRunLogs). - exports.age, exports.count: exports that old deleted, then all but the newest count. - tools.unused-age: current shared tool images no VM's state lists, counted from when retention first found them so (an <image>.idle record in the share, dropped when a VM lists it again). - orphans.age: what devvm keeps for VMs their backend no longer has (vm.Leftovers, as gc --orphans), once their state hasn't changed for that long. Ages as state.ParseAge (30d, 2w, 12h). Not the backends' caches (gc --caches only), and never a VM, an image, or a tool any VM's state lists. devvm's commands apply the settings at their start at most once a day (data/retention.run; again at once after a clock that went back), under a lock so two devvms never apply them at once (a dead one's lock is taken over after 10 minutes), skipping the tools while a build holds the share's lock; it says what it deleted in one line on stderr (retention_deleted). orphans.age needs the backends asked, so only devvm gc --retention applies it; gc --retention applies all of them at once. space, gc, completion and devvm's internal commands don't apply them on their own. A bad line names the file and the line, and then none applies (retention_unreadable). devvm space shows each setting beside its row (RETAIN), with what it would free now. Not done here: logs.network.size and logs.network.files, which override the proxy's log rotation defaults: rotation is another task's (the proxy rotates its logs), not on this branch; space set refuses them until it is. Messages: retention_deleted, retention_off, retention_busy, retention_unreadable, retention_failed, retention_bad, retention_saved. Docs: using/settings.md (the file, each setting, all off), the What devvm keeps page (what each setting does, RETAIN), using/images.md's Cleaning up, the CLI reference. Review (deletes only what it's told to): no file or an empty one deletes nothing (txtar, unit); a VM, an image and a tool any VM's state lists are never retention's (Idle builds on NoVM: a stopped VM's and a leftover state's tools stay until orphans.age deletes that state); two runs at once (lockRetention); a clock that jumps (retainDue, Idle and the age checks skip a negative age); the one-line report on every deletion. Tests: TestRetention (parser, set, off, bad lines), TestIdle, TestExportsToRetire, TestRetainDueAndLock; retention.txtar (refusals, space set and RETAIN, the automatic run once a day and again after a day, gc --retention with tools, a VM's tool kept). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
bfc925e043 |
feat(space): devvm space shows what devvm keeps and the space it takes
devvm space [--json] lists each kind of thing devvm keeps, on every backend, with its count, size (allocated blocks, as du), whether devvm makes it again (remade, only copy, log, state, leftover), what devvm gc frees of it now and what frees the rest, then a total: VMs and images per backend, shared tool builds per backend and C library, exports, network and run logs, devvm's own mise, the copies of devvm's files, the leftover state of VMs their backend no longer has, and the rest of devvm's state. The backends' own caches come apart and outside the total: Lima's download cache, smolvm's caches on macOS (pack disks, image disks, archives, registry; never its machines' folders) and Docker's labelled volumes that aren't one VM's own. backend.UsageReporter (optional): Lima, smolvm and Docker say what their VMs and caches take. Each backend gets 30 s; one that doesn't answer is named when a VM's state uses it (space_backend_unknown), and its VMs are never counted as leftovers. Each tool build now leaves <image>.target beside it (libc, format), so listings tell a Lima, smolvm and Docker build of a version apart; tools.Listed has Target, from the record or the target it's current for; Share.Delete deletes the record too. Messages: reading_space, space_failed, space_backend_unknown, space_caches_note. Stubs: docker volume ls; smolvm machine ls fails with smolvm-ls-fails. Docs: the What devvm keeps page leads with devvm space; commands table; images' Cleaning up; CLI reference. Review: space runs only listings (limactl list, smolvm machine ls and data-dir, docker info, container ls/inspect --size, system df, volume ls), each bounded by ctx with a timeout; the txtar checks no call creates, deletes, starts, stops or edits. Backend caches aren't in the total. Sizes checked against du on the e2e sandbox data and the user's caches (Lima 9.1G, smolvm pack disks 20G, both match du -sh). APFS clones count for both, as the page says. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
e2e3c70d81 |
feat(desktop): a desktop feature and devvm desktop, over VNC, on every backend
The desktop feature (assets/features/desktop.sh, not chosen until you choose it, about 370 MB) installs Xfce and TigerVNC's Xvnc from base's package snapshot, and devvm-desktop, which starts Xvnc on display :1 on a socket of the VM user's own (/run/devvm-desktop/vnc.sock, 0600 in a 0700 folder), with no TCP port (-rfbport -1, -nolisten tcp) and no password of its own, the clipboard on or off as asked (vncconfig on a running one), then an Xfce session in a D-Bus session of its own. Nothing starts it at boot: devvm desktop does, on every backend. devvm desktop gets the VM ready as devvm ssh does, refuses a VM without the feature (desktop_no_feature), starts its desktop (desktop_start_failed), and serves it on 127.0.0.1 alone until Ctrl+C or the VM stops (desktop_vm_stopped), on the VM's own port (desktop_port, among netpolicy.UsedPorts, so no forwarder or new VM takes it), showing the address and password (desktop_ready) and opening vnc://127.0.0.1:PORT in Screen Sharing on macOS (--no-open; desktop_open_failed). --clipboard shares the clipboard both ways for that run. internal/desktop's Relay is the guarantee, not the VM's server: it speaks RFB 3.3/3.7/3.8 as a server, offers VNC authentication alone, checks the answer against the VM's password (8 characters of 31, about 40 bits, crypto/rand, kept in the VM's state as desktop_password, never sent to the VM) one check at a time with a second's wait after a wrong one, and only then opens an ssh -W channel to the VM's socket through devvm's ssh config (pinned host key, no session, agent or forwarding), closed by its input first so the VM's sshd ends its side. Without --clipboard it drops every ClientCutText (extended ones too) and ends a connection on a message type it can't size. At most 8 connections. Also: vm.Desktop (Open, serve, listener, dial), vm.ready (devvm ssh's launch without the Include prompt), Env.OpenURL; build's chosen features leave desktop out until it's chosen; messages desktop_failed, desktop_no_feature, desktop_start_failed, desktop_ready, desktop_open_failed, desktop_vm_stopped, with doc links. Tests: internal/desktop (passwords, Response, wrong passwords refused with no dial, 3.3/3.7/3.8, not a viewer, the clipboard dropped or carried, an unknown message ending the connection, a VM server asking for a password), internal/vm (the password kept and remade, the listener's port kept and replaced, ssh's arguments), internal/build (desktop off until chosen), testdata/script/desktop.txtar (no VM, no feature, a stopped VM started, the forward asked for with the clipboard off and on, the same port and password, Screen Sharing opened or failing, the VM stopping, the start failing), setup.txtar, docgen; tests/e2e.sh's desktop section (Lima, with network policy) and checks in the smolvm and Docker sections; TestE2EDesktop. Docs: using/desktop.md (new), customizing.md's features, commands.md, internals/desktop.md (new), design.md's note on the desktop, contributing/testing.md's manual Screen Sharing check, the CLI reference. Review (security-audit skill, guidance mode, local IPC and loopback listener classes), against the review's list: - another local user or process reaching the port: 127.0.0.1 alone, without address reuse; VNC authentication checked on the host before any ssh, constant-time, about 1 guess a second globally (thousands of years); the password in the VM's state (0600 file, 0700 folder), shown only on stdout with the address, never in open's arguments or the run log (e2e: no run log, no host process's arguments); - never in an image or the VM: the VM's server has no password; e2e greps the VM's files for it (found the first time only in the VM's journal, from the check's own sudo command line, now fed on its input); - the server on no address but loopback on each backend, even if root changes it: Xvnc has no TCP listener (e2e on each backend), the relay is the only way in and lives on the host; root's own server without a password (e2e, Lima) still gets no viewer without devvm's password; - clipboard off really off: the relay drops the viewer's clipboard whatever the server accepts (e2e: root's server records a key event but never the clipboard); the VM's clipboard to the viewer can't be filtered without decoding screen updates, documented, Screen Sharing's setting; - nothing from the VM toward the host: a local ssh -W channel, which ssh's client asks for; the VM reaches neither the relay's port nor anything new (e2e: with network policy, no direct connection out, nor to the port); a VM that reaches host loopback (no policy, Docker Desktop) meets the password like anyone; - network policy unchanged: no policy file or allowlist changes; the self-check passes with the desktop running (e2e). Left as documented residuals: the VM's clipboard sent by a changed server; a local process or VM keeping the relay's 8 slots busy or failing checks (availability only). Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
4bbd35a24b |
refactor(ui): make the UI an instance only cli holds
internal/ui has no package state: ui.UI holds the streams, terminal flags, run log, status line, cleanup stack and interrupt flag, and its functions are methods. ui.Main makes the run's UI on devvm's own streams, owns signals, recovers Die and runs the cleanups; ui.New makes one on other streams. cmd/devvm passes it to cli.Execute, and every cli command gets it through its constructor. Only cmd/devvm and internal/cli import internal/ui (a depguard rule). Each other package defines the small UI interface it needs, which its constructor takes, filling fields tests set: - gitprotect.New, secrets.NewStore, from.NewLookup: a warn func - ubuntu.New: LoggedCmd, Note - netpolicy.NewProxy: Note, Warn, Ask, Confirm, StdinIsTerminal; its log lines drop control characters themselves (oneLine) - sshagent.New: Info, Note, Warn, LogWriter - tools.New: Info, Warn, LogNote, Status, LoggedCmd, AddCleanup - lima.New, smolvm.New: Info, Warn, LoggedCmd (their Runner's Run), WithSteps, AddCleanup, Interrupted; lima LogNote and ubuntu's too - backends.Registry: lima's and smolvm's - vm.NewEnv: all of the above, Say, Stdout, Stderr; Env has Stdout, LogNote, LogWriter, LoggedCmd, AddCleanup, Interrupted fields - build.Builder: Terminal and LogNote fields - sshconfig.New: its caller sets what it prints and asks ui's tests build their own UI over buffers and run in parallel; other packages' tests use small fakes; cli's unit tests a UI over buffers. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
fb2d591b09 |
feat(limactl): devvm limactl runs Lima on devvm's own Lima home
devvm limactl ARGS... runs limactl in devvm's place (exec), with LIMA_HOME set to devvm's Lima home whatever the environment says, from devvm's data folder (as devvm's own limactl commands run, away from lima.REJECTED.yaml in a project folder). Every argument passes through, flags and --help included; input, terminal and exit code are limactl's. The code lives in the lima package (lima.Limactl); the cli command is a thin wrapper, like _qemu. - Messages: limactl_failed (new); lima_missing when limactl isn't on PATH; script_failed now suggests devvm limactl shell --start and drops its lima_home field. - Tests: testdata/script/limactl.txtar (Lima home, LIMA_HOME ignored, data folder as cwd, arguments and --help passed, stdin, exit code, default home, no Lima); build.txtar, build tests and e2e updated for script_failed; e2e images checks devvm limactl list and its exit code. - Docs: lima.md "Running limactl", commands.md row, images.md's failed build hint; CLI reference regenerated. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
06780fee5d |
feat(ssh): devvm ssh and devvm code, VS Code's Machine settings kept
devvm ssh gets this folder's VM ready for ssh and editors, as a launch does without its shell, then names the host they reach it by; devvm code does the same, then opens the folder in VS Code over Remote-SSH. - vm: launch (from open: .git and set-id checks, a stopped VM's size, ports and agent forwarding, the user's agent checked, run with its self-check) and setUpVM (from setUp: sync, ssh config, a --clone VM's clone) shared by launches, SSH and Code; reach requires the backend's ssh, then offers the Include line (EnsureInclude). Code runs code --remote ssh-remote+HOST DIR in devvm's place with the environment devvm started with (Env.Environ), so the editor keeps the user's SSH_AUTH_SOCK. - sshconfig: Host (the alias among every backend's project VMs), with the listing shared with Write. - cli: ssh and code commands; CLI reference regenerated. - Messages: ssh_host_info, no_code_command (linked to ssh.md), ssh_failed, code_failed. - Tests: ssh_code.txtar (no VM, usage, a stopped VM started and set up without a shell, the Include line shown not added, a pending size waiting, code's arguments and agent, two folders named alike, no code on PATH, a direct route stopping the VM); guest.txtar's VS Code Machine settings case; a stub code. e2e: devvm ssh on a stopped VM and ssh reaching it, the Machine settings set and set again, devvm code with a stub code; network: devvm ssh's self-check, passing and stopping a VM started outside devvm. - Docs: ssh.md (devvm ssh and devvm code, VS Code), commands.md, security.md, clone.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
44e256d51a |
feat(stop): devvm stop stops this folder's VM and its proxy
devvm stop needs a finished VM made for this folder (no_vm, vm_other_folder, vm_unfinished). It stops the VM (Backend.Stop, the "stopping" step), says stopped, or already_stopped for a VM that was, then stops its network policy proxy at once instead of waiting for it to notice the hostagent is gone. With the VM stopped, .git is checked and locked as on a launch that finds it stopped, and on Linux set-id files are named (not for a --clone VM); the ssh config is rewritten, so the VM's entry goes. Messages: stopped, already_stopped, stop_vm_failed; git_protect_running now says to run devvm stop first. Tests: testdata/script/stop.txtar (no VM, usage, a running network policy VM and its proxy, locks after stop on macOS, the ssh config entry, already stopped, a folder made again). e2e: project's stop (status, ssh entry; on macOS a submodule git folder reported and locked by devvm stop), network's stop (the proxy gone at once, both back on the next launch). Docs: commands.md (Stopping a VM), git-protection.md, network.md, ssh.md, contributing.md; the CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
5304e9a2b7 |
feat(export): devvm export saves a VM's agent history
devvm export [FILE] saves this folder's VM's agents' history (the same paths and login excludes as rm's export) to FILE, relative to the current folder, or to a new <vm>-<date>-<time>.tar.gz in the exports folder. A stopped VM is started for it. It needs a finished VM made for this folder. The export is now written to a temporary file beside its target (mode 600) and renamed into place once complete, for rm's export too: a failed export leaves no file and an existing FILE as it was. Messages: history_not_exported (logged) and export_failed (reason) for devvm export; rm's is now rm_export_failed. Tests: TestExport (default folder, a new folder for FILE, a failed export keeping FILE); testdata/script/export.txtar (no VM, usage, a stopped VM started, the script, a relative FILE, a failure keeping FILE and the VM); e2e's project section exports a stopped agent VM's history to a file, without its logins. Docs: coding-agents.md#history, commands.md, the CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
b03293b7d7 |
feat(setup): devvm setup chooses base's features and the default backend
devvm setup asks which features base gets, starting from the current
choice (every feature until there's one; kept without a terminal), or
takes them from --features LIST without asking ('' for none), saved in
the features' run order. A name that isn't a feature is no_feature and
saves nothing. --backend NAME saves the default backend new VMs get
(~/.config/devvm/backend, read by the registry), checked against the
backends devvm has; alone, it leaves the features as they are.
A changed choice prints base_will_rebuild, and gc_old_hint once any
image record exists. base_features and base_features_none name devvm
setup. --features completes feature names, setup's --backend backend
names.
- build: PickFeatures, SetFeatures (the first build's choice goes
through PickFeatures)
- state: AnyImage
- messages: no_feature, base_will_rebuild, gc_old_hint,
default_backend, setup_failed
- tests: setup.txtar, completion.txtar; TestPickFeatures,
TestSetFeatures, TestAnyImage
- docs: customizing.md (choosing features), backends.md (choosing a
backend), the CLI reference
Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
||
|
|
77aa2d6dc0 |
feat(layer): devvm layer new starts a layer of your own
devvm layer new NAME writes ~/.config/devvm/layers/NAME.sh, a starter script, and NAME.policy next to it unless that exists. Names that aren't layer-like are layer_name_invalid; base and the shared tools' layer_name_reserved; an existing script layer_exists. The script is linked into place whole, never over one that appeared. - internal/build/layer.go: NewLayer, its templates, createNew - internal/cli/layer.go: devvm layer (help alone), devvm layer new NAME - messages: layer_name_invalid, layer_name_reserved, layer_exists, layer_created, layer_new_failed; doc links to customizing - testdata/script/layer.txtar: from images.bats' layer new case - e2e images: the fixture layer starts from devvm layer new - docs: customizing.md gets your own layers (with the postgres example); commands.md, images.md, the index; CLI reference Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
c9998037a0 |
feat(gc): devvm gc deletes stale images and unused tool images
devvm gc deletes the images that devvm images lists as stale or unfinished, on every backend, together with their records. It also deletes the tool images it lists as unused, with their hashes. It lists everything first and asks when run in a terminal. It holds the share's lock for the whole run. VMs are never deleted. On Linux hosts, a stale image that overlays use stays, with image_in_use. - tools: Listed.File, Unused (List's unused rows) and Delete (tool image names only); Garbage and Tools.All go. - build: DeleteKey. cli: listImages takes a builder and keeps each backend's. - devvm images: images_stale_note and images_unused on stderr. - Messages: gc_failed, nothing_to_clean, gc_images, gc_image, gc_unfinished, gc_tools, gc_confirm, nothing_deleted, deleted_tools; script_failed and tools_not_images_rm name devvm gc. - Tests: gc.txtar (stale, unfinished, corrupt and key-less images, a project VM named like an image, tools in use, current and unused), TestDeleteStaleKeepsImagesInUse, TestUnusedAndDelete, TestConfigTools. - e2e: a gc section. Docs: images.md (cleaning up), commands.md, contributing.md, the CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
f5cca0ff02 |
feat(images): devvm images and images rm
devvm images lists the images on every backend (IMAGE, FROM, DIGEST, KEY, STATE current/stale/unfinished, SIZE, BACKEND), then the shared tool images by the name images have them by (NAME, TOOL, VERSION, SIZE, VMS, STATE current/in use/unused/not built/not installed). Listing never resolves the tools lock. devvm images rm IMAGE|KEY... deletes images by name (with --from, on that base) or by key, resolving every one first; shared tools are refused. - backend.Backend gets ImageSize (Lima: du of the instance folder); platform.DiskUsage counts blocks, hard links once. - build: Listing, Delete, Image.Digest; ubuntu.ReleaseDate. - tools: List, ReadLock (uses Lock.Version); vm: ToolsInUse, BackendUsed exported. - Messages: reading_images, images_failed, images_rm_failed, deleted_image, no_image_named, no_image_named_from, tools_not_images_rm. - Tests: testdata/script/images.txtar (images.bats' three images cases and images rm), Go tests for Listing, Delete, List, compareVersions, DiskUsage, ImageSize, ReleaseDate, humanSize; e2e images section lists base and a layer, deletes by name and an unfinished build by key. - Docs: images.md (Listing images, Deleting images), commands.md, the CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
bc164bcbe3 |
feat(git-protect): devvm git-protect on, strict and off
devvm git-protect shows a folder's VM's .git protection (on, strict, off, or clone for a --clone VM) and changes it while the VM is stopped. On and strict lock .git as it is now, reporting what a lock can't cover as a new VM does; strict also sets diff.ignoreSubmodules=all in the locked .git/config, which on and off take out; off unlocks. Locks need macOS. - gitprotect: Mode, Set, ignoreSubmodules; NewVM and Check share protect (new, on, check); strict counts as on for launches and rm. - Messages: no_vm_git_protect, git_protect_failed, git_protect_running, git_protect_on_needs_macos, git_protect_clone, git_config_failed, git_locked, git_locked_strict, git_lock_later, git_unlocked; git_protect_flag_ignored names devvm git-protect off. - Tests: TestSet, TestSetStrictFails, TestSetLinuxAndNoGit; testdata/script/git_protect.txtar (project.bats strict and git-protect-waits cases). e2e project: waits for stop, strict, off/on, refused off macOS. - Docs: git-protection.md (turning it on or off, strict), commands.md, CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
cfae579fec |
feat(size): devvm size, --cpus/--memory/--disk, and -g for new VMs
devvm size shows this folder's VM's CPUs, memory and disk (cpus=4 memory=8GiB disk=100GiB), with a note when a change waits for its next start; --cpus, --memory and --disk change them, at once for a stopped VM, from its next start for a running one. Disks only grow; more than this machine has is refused. -g/--global shows (cpus=, memory=, disk= lines) or changes the size new VMs get (~/.config/devvm/size), keeping what it leaves unset. A change checks the backend's features first. - vm: Env.ShowSize, Env.SetSize, SizeText, pendingSize (also used by applySize), defaultSize (also used by up), folderVM (shared by ports, ssh-agent and size) - messages: vm_size, size_pending, size_defaults, no_vm_size, size_failed; size_flags_ignored names devvm size - tests: size.txtar (show, set, running vs stopped, -g, a hand-edited size file, refusals), TestSetSize, TestSizeText; the limactl stub's edit applies --cpus/--memory/--disk; e2e project: a new VM gets its size, devvm size shows it, a running VM's new size waits for restart then applies, a smaller disk is refused - docs: images.md Size and Disk use, commands.md rows, CLI reference Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
8312d764ad |
feat(ports): devvm ports, add and rm, and -g for new VMs
devvm ports shows which ports this folder's VM forwards (all, none or a list), with a note when a change waits for its next start; devvm ports all|none|LIST, add LIST and rm LIST change it, at once for a stopped VM, from its next start for a running one. -g/--global shows or changes what new VMs forward (~/.config/devvm/ports). A change checks the backend's port forwarding first. - vm: AddPorts, RemovePorts, PortsChange, Env.Ports, Env.SetPorts, defaultPorts (also used by up), portsVM - messages: ports_list_needed, ports_rm_all, port_not_listed, ports_all_already, ports_now, ports_pending, ports_default, no_vm_ports, ports_failed; ports_flag_ignored names devvm ports - tests: ports.txtar (show, set, add, rm, -g, running vs stopped, usage, completion), TestAddRemovePorts; e2e project: a running VM's new ports wait for restart, then only the listed ports reach the host - docs: images.md Ports, commands.md rows, CLI reference Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
fd479df9d8 |
feat(ssh-agent): devvm ssh-agent and --ssh-agent, with devvm's own agent
SSH agent forwarding per VM: off by default, on (your agent, --ssh-agent for a new VM) or devvm (devvm's own agent, holding only keys added to it). devvm ssh-agent [on|devvm|off] shows or changes it from the VM's next start; devvm ssh-agent add KEY_FILE [--confirm] [--lifetime D] loads a key into devvm's agent and records it with its pinned fingerprint (agent-keys); devvm ssh-agent keys lists them. Keys are loaded again on launch (after a reboot or their lifetime), only while the file holds the pinned key and isn't in a folder a VM mounts. - internal/sshagent: Mode/Key, Agent (Ensure, Add, Keys), its messages. - vm: --ssh-agent on create, applyAgent and checkAgent on relaunch, ssh_agent_flag_ignored, devvm's agent socket at start, SSH_AUTH_SOCK per mode for devvm's own connections, SetSSHAgent/SSHAgent. - sshconfig: ForwardAgent from the VM's state; devvm mode forwards and names devvm's socket (IdentityAgent). - ssh_remote_hint names devvm ssh-agent on; skipped with --ssh-agent. - Tests: sshagent table tests (the five bats cases) plus one with real OpenSSH tools and a throwaway agent; vm tests; ssh_agent.txtar with ssh-agent/ssh-add/ssh-keygen stubs; e2e project section "SSH agents". The test task and e2e unset SSH_AUTH_SOCK. - Docs: ssh.md agent forwarding and devvm's own agent, commands, security, contributing; CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |
||
|
|
ab20aab59d |
feat(secret): devvm secret and devvm auth, tokens kept on this machine
devvm secret set claude|github [--stdin] saves a token in the macOS Keychain (through security -i on stdin, never in arguments) or in an owner-only file elsewhere; devvm auth claude does the same for claude. secret rm deletes one, secret ls (and devvm secret) lists every secret, whether it's saved and the VMs using it, and secret use|unuse binds one to the folder's VM. Saving, deleting, binding and unbinding rewrite the running proxies' bindings at once, keeping their logins' bindings as the VM's start wrote them. get stays hidden, for the proxies. - secrets: Token (whitespace dropped; empty, quotes, backslashes, control characters and non-setup claude tokens refused), Save, Delete, Bind, FromImage, RefreshFiles; platform: KeychainSet, KeychainDelete. - netpolicy: Proxy.RefreshSecrets. vm: SecretSave, SecretRm, Secrets, SecretUse. ui: Secret (no echo at a terminal, the terminal restored on interrupt) and Line. - Messages: claude_token_howto, github_token_howto, token_prompt, no_token, token_quotes, not_setup_token, keychain_save_failed, secret_saved, secret_saved_keychain, secret_removed, secret_used, secret_unused, secret_with_image, secret_unuse_copied, secret_failed; no_claude_token, claude_token_invalid and no_github_token name devvm auth claude and devvm secret set github. - Tests: secret.txtar (set/rm/ls, use/unuse, auth, refused tokens, the value never in argv), Go tests for Token, Save/Delete, Bind, RefreshFiles, RefreshSecrets, the Keychain calls through the security stub (now with -i and delete-generic-password), ui.Secret, vm secrets. - e2e network: secret set/get/use/ls/unuse/rm with a fake GitHub token; the VM gets its own GH_TOKEN placeholder, the proxy puts the token in for api.github.com. - Docs: network.md (saving and binding tokens), coding-agents.md (Claude Code login), security.md, commands.md, contributing.md; CLI reference. Co-Authored-By: Claude Opus 5.5 <[email protected]> |