add commands to start tui and web

This commit is contained in:
Robin Olsen
2026-03-18 15:00:15 +01:00
parent ed018b5396
commit 720be210c3

View File

@@ -104,6 +104,8 @@ func init() {
RootCmd.AddGroup(&cobra.Group{ID: "other", Title: "Additional Commands"})
RootCmd.SetHelpCommandGroupID("other")
RootCmd.AddCommand(replCmd)
RootCmd.AddCommand(tuiCmd)
RootCmd.AddCommand(webCmd)
}
@@ -117,6 +119,26 @@ var replCmd = &cobra.Command{
},
}
var tuiCmd = &cobra.Command{
Use: "tui",
GroupID: "other",
Short: "Start the interactive TUI interface",
Long: `Start the interactive Terminal User Interface (TUI) for managing your projects and issues in an interactive terminal environment.`,
RunE: func(cmd *cobra.Command, args []string) error {
return tui.New().Run(cmd.Context(), App.Config)
},
}
var webCmd = &cobra.Command{
Use: "web",
GroupID: "other",
Short: "Start the interactive web interface",
Long: `Start the interactive web interface for managing your projects and issues in a web browser.`,
RunE: func(cmd *cobra.Command, args []string) error {
return web.New().Run(cmd.Context(), App.Config)
},
}
func initializeApp(ctx context.Context) (*app.App, func(), error) {
return app.New(ctx, tasks.BaseConfig().WithAutoInit(true))
}