Files
correx/apps/tui-go/cmd/preview/main.go
T
kami f922b855eb feat: add Go/Bubble Tea TUI rewrite (apps/tui-go)
Reimplement the TUI in Go using Bubble Tea, replacing the Kotlin/Tamboui
app. Same WebSocket protocol, soft-rounded layout with blue accent theme.
2026-05-30 00:00:35 +04:00

31 lines
589 B
Go

// Command preview prints a single static TUI frame for screenshotting.
// Usage: preview <kind> [cols] [rows]
package main
import (
"fmt"
"os"
"strconv"
"github.com/charmbracelet/lipgloss"
"github.com/correx/tui-go/internal/app"
"github.com/muesli/termenv"
)
func main() {
lipgloss.SetColorProfile(termenv.TrueColor)
kind := "idle"
if len(os.Args) > 1 {
kind = os.Args[1]
}
cols, rows := 140, 36
if len(os.Args) > 2 {
cols, _ = strconv.Atoi(os.Args[2])
}
if len(os.Args) > 3 {
rows, _ = strconv.Atoi(os.Args[3])
}
fmt.Print(app.PreviewFrame(kind, cols, rows))
}