Add Go daemon-driven VM control plane

Replace the shell-only user workflow with `banger` and `bangerd`: Cobra commands, XDG/SQLite-backed state, managed VM and image lifecycle, and a Bubble Tea TUI for browsing and operating VMs.\n\nKeep Firecracker orchestration behind the daemon so VM specs become persistent objects, and add repo entrypoints for building, installing, and documenting the new flow while still delegating rootfs customization to the existing shell tooling.\n\nHarden the control plane around real usage by reclaiming Firecracker API sockets for the user, restarting stale daemons after rebuilds, and returning the correct `vm.create` payload so the CLI and TUI creation flow work reliably.\n\nValidation: `go test ./...`, `make build`, and a host-side smoke test with `./banger vm create --name codex-smoke`.
This commit is contained in:
Thales Maciel 2026-03-16 12:52:54 -03:00
parent 3cf33d1e0a
commit ea72ea26fe
No known key found for this signature in database
GPG key ID: 33112E6833C34679
22 changed files with 5480 additions and 0 deletions

View file

@ -24,6 +24,39 @@ Minimal Firecracker launcher.
./run.sh
```
## Experimental Go Control Plane
There is now an XDG-based Go daemon + CLI prototype alongside the shell scripts.
It keeps persistent VM/image state in SQLite under your XDG state directory and
talks over a Unix socket under your XDG runtime directory.
Build it with:
```
make build
```
Or directly with Go:
```
go build -o ./banger ./cmd/banger
go build -o ./bangerd ./cmd/bangerd
```
Basic usage:
```
./banger daemon status
./banger tui
./banger vm list
./banger vm create --name calm-otter --disk-size 16G
./banger vm set calm-otter --memory 2048 --vcpu 4
./banger image list
```
Notes:
- `banger` auto-starts the per-user daemon when needed.
- `banger tui` launches a terminal UI for browsing, creating, editing, and operating VMs.
- VM configs are persistent by default.
- RAM, vCPU, and work-disk size edits are stopped-only.
- The Go image build path currently delegates guest customization to `customize.sh`.
## Run Options
```
./run.sh --name calm-otter --vcpu 4 --ram 2048 --overlay-size 12G