Implements the CLI spec'd in docs/tx9-cli-design.md as a single Go binary at the repo root, embedding provision/, guest/, docker/ and box.env as the image build context (built locally on first create, tagged tx9-box:<cli-version>). Command surface: create (generated names + getting-started checklist), list (label-derived state + version drift), enter/ssh, start/stop, open, doctor (in-box hb doctor + host port probe), backup/export (quiesce -> tar -> validate -> gpg AES256 -> verify -> .tx9), import (validate-before-create, stage-then-promote, arrives quiesced + gateway-disabled + fresh token), upgrade (box recreate or CLI self-update from GitHub Releases), delete (typed-name confirm), prune. Contracts carried from the verified boxd prototype: agent/executor split topology with per-box network + DNS aliases, IPv6-disable sysctl, BOXD_EXECUTOR_TOKEN override precedence, boot-window retry, the 12-rule member-by-member archive validator, per-box flock fail-fast locking, and the gateway single-writer gate. Also: release workflow (tag push -> cross-compiled GitHub Release + checksums), scripts/install.sh for the tx9.davis7.sh/install redirect, make check now includes gofmt/vet/build/test via go-check. E2E-verified on this machine: create -> list -> stop/start -> upgrade -> encrypted backup -> import (fresh token, markers re-armed, wrong passphrase fails clean, collision fails clean) -> delete with zero residue.
Showing the changes to assets.go (1 of 55 files). Show all
Unified · Split
| @@ -0,0 +1,18 @@ | ||
| 1 | +// Package main embeds the Docker build context (provision/, guest/, | |
| 2 | +// docker/Dockerfile + entrypoints, box.env) so tx9 ships a self-contained | |
| 3 | +// binary with no repo checkout required (decision 1, tx9-cli-design.md). | |
| 4 | +// | |
| 5 | +// This lives at the module root — not under internal/ — because go:embed | |
| 6 | +// patterns are resolved relative to the source file's directory and cannot | |
| 7 | +// reach outside it; provision/, guest/, and docker/ are siblings of this | |
| 8 | +// file, not of internal/assets. Since this file must share its directory | |
| 9 | +// with main.go (package main), and Go forbids importing a package literally | |
| 10 | +// named "main", internal/assets cannot import BuildContext directly. Instead | |
| 11 | +// main.go passes BuildContext down through internal/cli into internal/assets | |
| 12 | +// functions that accept an fs.FS parameter. | |
| 13 | +package main | |
| 14 | + | |
| 15 | +import "embed" | |
| 16 | + | |
| 17 | +//go:embed provision guest docker/Dockerfile docker/entrypoint.sh docker/executor-entrypoint.sh box.env | |
| 18 | +var BuildContext embed.FS | |