feat: add daemon mode flag

Adds a `-daemon` flag to run the application in the background without
the interactive terminal UI. It outputs log lines to standard output
instead of utilizing `charmbracelet/bubbletea`.
This commit is contained in:
ruinivist
2026-05-31 23:15:17 +00:00
parent 0ae1b094c5
commit e8e6e55892
4 changed files with 85 additions and 2 deletions
+4 -1
View File
@@ -9,10 +9,13 @@ import (
)
// Run loads configuration and starts the terminal UI.
func Run(ctx context.Context) error {
func Run(ctx context.Context, daemon bool) error {
cfg, err := config.LoadDefault()
if err != nil {
return err
}
if daemon {
return tui.RunDaemon(ctx, tui.Options{Streamers: cfg.Streamers})
}
return tui.Run(ctx, tui.Options{Streamers: cfg.Streamers})
}