grokkit/cmd/root.go
Greg Gauthier 363733c2e6 feat(chat): add interactive TUI with Bubble Tea and streaming
- Replace basic CLI chat with Bubble Tea-based TUI featuring viewport, textarea, colored history, and streaming replies.
- Add StreamSilent method to client for TUI integration without live printing.
- Introduce model flag for chat command.
- Update dependencies to include charmbracelet libraries.
2026-02-28 21:53:35 +00:00

35 lines
771 B
Go

package cmd
import (
"os"
"github.com/spf13/cobra"
"gmgauthier.com/grokkit/config"
)
var rootCmd = &cobra.Command{
Use: "grokkit",
Short: "Personal Grok / xAI command-line toolkit",
Long: `A fast, native Go CLI for Grok. Chat, edit files, and supercharge your git workflow.`,
PersistentPreRun: func(cmd *cobra.Command, args []string) {
config.Load()
},
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
os.Exit(1)
}
}
func init() {
rootCmd.AddCommand(chatCmd)
rootCmd.AddCommand(editCmd)
rootCmd.AddCommand(reviewCmd)
rootCmd.AddCommand(commitMsgCmd)
rootCmd.AddCommand(commitCmd)
rootCmd.AddCommand(prDescribeCmd)
rootCmd.AddCommand(historyCmd)
chatCmd.Flags().StringP("model", "m", "", "Grok model to use (overrides config)")
}