Architecture
Cruise is built with Go and Bubble Tea, following the Elm architecture pattern.
| Layer | Technology |
|---|---|
| TUI framework | Bubble Tea |
| Styling | Lip Gloss |
| Runtime API | Docker SDK (more planned) |
| Config | TOML via internal parser |
| Scanning | Trivy / Grype (optional) |
Directory Structure
Section titled “Directory Structure”cruise/├── cmd/ # CLI entrypoints├── internal/│ ├── ui/ # Bubble Tea models and views│ ├── runtime/ # Runtime interface + Docker impl│ ├── config/ # Config parsing and defaults│ └── scanner/ # Vulnerability scanner adapters└── pkg/ # Shared utilitiesBubble Tea Model Pattern
Section titled “Bubble Tea Model Pattern”Each page in Cruise is a self-contained Bubble Tea model implementing Init, Update, and View:
type ContainerPage struct { containers []runtime.Container selected int // ...}
func (m ContainerPage) Init() tea.Cmd { ... }func (m ContainerPage) Update(msg tea.Msg) (tea.Model, tea.Cmd) { ... }func (m ContainerPage) View() string { ... }