Skip to content

Architecture

Cruise is built with Go and Bubble Tea, following the Elm architecture pattern.

LayerTechnology
TUI frameworkBubble Tea
StylingLip Gloss
Runtime APIDocker SDK (more planned)
ConfigTOML via internal parser
ScanningTrivy / Grype (optional)
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 utilities

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 { ... }