From fa037e748bb2ba65f75ba104e18d460a8fbcd49b Mon Sep 17 00:00:00 2001 From: Adam Mathes Date: Thu, 12 Feb 2026 20:42:09 -0800 Subject: Implement Bubble Tea Terminal UI (TUI) - Added Bubble Tea, Lipgloss, and Bubbles dependencies - Implemented TUI package in tui/ for browsing feeds and items - Added --tui flag to main command - Verified build and existing tests --- main.go | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'main.go') diff --git a/main.go b/main.go index 0ddc39c..432e4d3 100644 --- a/main.go +++ b/main.go @@ -2,6 +2,7 @@ package main import ( "fmt" + "log" "time" "adammathes.com/neko/config" @@ -9,6 +10,7 @@ import ( "adammathes.com/neko/exporter" "adammathes.com/neko/models" "adammathes.com/neko/models/feed" + "adammathes.com/neko/tui" "adammathes.com/neko/vlog" "adammathes.com/neko/web" flag "github.com/ogier/pflag" @@ -17,7 +19,7 @@ import ( var Version, Build string func main() { - var help, update, verbose, proxyImages bool + var help, update, verbose, proxyImages, tuiMode bool var configFile, dbfile, newFeed, export, password string var port, minutes int @@ -35,6 +37,7 @@ func main() { flag.IntVarP(&port, "http", "s", 0, "HTTP port to serve on") flag.IntVarP(&minutes, "minutes", "m", 0, "minutes between crawling feeds") flag.BoolVarP(&proxyImages, "imageproxy", "i", false, "rewrite and proxy all image requests for privacy (experimental)") + flag.BoolVarP(&tuiMode, "tui", "t", false, "launch terminal UI") flag.BoolVarP(&verbose, "verbose", "v", false, "verbose output") // passwords on command line are bad, you should use the config file @@ -92,6 +95,13 @@ func main() { return } + if tuiMode { + if err := tui.Run(); err != nil { + log.Fatal(err) + } + return + } + go backgroundCrawl(config.Config.CrawlMinutes) vlog.Printf("starting web server at 127.0.0.1:%d\n", config.Config.Port) -- cgit v1.2.3