Files
parasocial/internal/app/app.go
ruinivist e8e6e55892 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`.
2026-05-31 23:15:17 +00:00

22 lines
498 B
Go

// app.go owns process-level application bootstrap before handing control to the TUI.
package app
import (
"context"
"parasocial/internal/config"
"parasocial/internal/tui"
)
// Run loads configuration and starts the terminal UI.
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})
}