banger/internal/cli
Thales Maciel aaf49fc1b1
vm run: add -d/--detach + transparent tooling bootstrap
The mise tooling bootstrap was failing silently when --nat wasn't
set: the VM came up, the user landed in ssh, and tools were missing
with no obvious cause. Two coupled fixes:

* `-d`/`--detach`: create + prep + bootstrap, exit without attaching
  to ssh. Reconnect later with `banger vm ssh <name>`. Rejects the
  ambiguous combos `-d --rm` and `-d -- <cmd>`.

* NAT precondition: when the workspace has a .mise.toml or
  .tool-versions, vm run now refuses before VM creation if --nat
  isn't set. Error message points at --nat or --no-bootstrap.

* `--no-bootstrap`: explicit opt-out for users who want a vanilla
  VM with their workspace and no tooling install.

Detached bootstrap runs synchronously (foreground tee'd to the log
file) so the CLI only returns once installs finish. Interactive
mode keeps today's nohup'd background behaviour so the ssh session
starts promptly.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 14:51:16 -03:00
..
style cli: maturity polish — color, error translation, tabwriter consistency 2026-04-26 22:27:07 -03:00
aliases_test.go remove vm session feature 2026-04-20 12:47:58 -03:00
banger.go doctor: collapse healthy output to one line, add --verbose 2026-05-01 14:18:09 -03:00
bangerd.go update: docs + publish script for the self-update feature 2026-04-29 12:43:46 -03:00
bangerd_test.go test: cover absolutizePaths, lastID, runCheckMigrations 2026-05-01 12:08:19 -03:00
cli_test.go vm run: add -d/--detach + transparent tooling bootstrap 2026-05-01 14:51:16 -03:00
commands_daemon.go daemon: split owner daemon from root helper 2026-04-26 12:43:17 -03:00
commands_image.go Merge model,cli,docs polish for v0.1.0 2026-04-28 17:36:47 -03:00
commands_internal.go cli + daemon: move test seams off package globals onto injected structs 2026-04-19 19:03:55 -03:00
commands_kernel.go cli,docs: trivial polish for v0.1.0 2026-04-28 17:31:54 -03:00
commands_ssh_config.go cli: rewrite help text for AI-driven discovery 2026-04-26 15:02:08 -03:00
commands_system.go update: VMs survive banger update and rollback 2026-05-01 12:08:08 -03:00
commands_update.go update: VMs survive banger update and rollback 2026-05-01 12:08:08 -03:00
commands_update_test.go update: refresh install.toml commit + built_at from new binary 2026-04-29 14:38:59 -03:00
commands_vm.go vm run: add -d/--detach + transparent tooling bootstrap 2026-05-01 14:51:16 -03:00
completion.go cli,docs: trivial polish for v0.1.0 2026-04-28 17:31:54 -03:00
completion_test.go remove vm session feature 2026-04-20 12:47:58 -03:00
daemon_lifecycle.go cli: wait for the daemon socket to answer ping after install/restart 2026-04-26 21:22:31 -03:00
daemon_lifecycle_test.go update: VMs survive banger update and rollback 2026-05-01 12:08:08 -03:00
deps.go seams: move the last four package globals onto instance fields 2026-04-22 12:07:14 -03:00
errors.go cli: maturity polish — color, error translation, tabwriter consistency 2026-04-26 22:27:07 -03:00
errors_test.go cli: maturity polish — color, error translation, tabwriter consistency 2026-04-26 22:27:07 -03:00
formatters_test.go cli,docs: trivial polish for v0.1.0 2026-04-28 17:31:54 -03:00
known_hosts.go daemon: split owner daemon from root helper 2026-04-26 12:43:17 -03:00
make_bundle_test.go banger internal make-bundle: build image bundles from flat rootfs tars 2026-04-17 15:17:50 -03:00
printers.go doctor: collapse healthy output to one line, add --verbose 2026-05-01 14:18:09 -03:00
printers_test.go doctor: collapse healthy output to one line, add --verbose 2026-05-01 14:18:09 -03:00
prune_test.go cli + daemon: move test seams off package globals onto injected structs 2026-04-19 19:03:55 -03:00
ssh.go smoke: five more scenarios + fix exit-code propagation bug the new ones caught 2026-04-22 19:37:07 -03:00
vm_create.go cli: maturity polish — color, error translation, tabwriter consistency 2026-04-26 22:27:07 -03:00
vm_exec.go feat(vm): add vm exec command with workspace dirty detection 2026-04-26 23:53:45 -03:00
vm_run.go vm run: add -d/--detach + transparent tooling bootstrap 2026-05-01 14:51:16 -03:00
vm_run_test.go vm run: add -d/--detach + transparent tooling bootstrap 2026-05-01 14:51:16 -03:00
vm_spec_test.go vm defaults: host-aware sizing + spec line on spawn + doctor check 2026-04-19 13:06:51 -03:00
workspace_preview.go noteUntrackedSkipped: fix subdir underreport + be best-effort everywhere 2026-04-22 12:42:33 -03:00
workspace_preview_test.go noteUntrackedSkipped: fix subdir underreport + be best-effort everywhere 2026-04-22 12:42:33 -03:00