feat: bootstrap cli entrypoint with bubble tea and toml config

This commit is contained in:
2026-04-28 20:49:07 +02:00
parent 914b3b9eff
commit f738833aa8
10 changed files with 338 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
package app
import (
"context"
"os"
tea "github.com/charmbracelet/bubbletea"
"parasocial/internal/config"
"parasocial/internal/tui"
)
// Run loads the application configuration and starts the terminal UI.
func Run(ctx context.Context) error {
cfg, err := config.LoadDefault()
if err != nil {
return err
}
program := tea.NewProgram(
tui.New(cfg.Streamers),
tea.WithContext(ctx),
tea.WithInput(os.Stdin),
tea.WithOutput(os.Stdout),
)
_, err = program.Run()
return err
}