grokkit/cmd/root.go
Greg Gauthier 98eb5505a5 chore(headers): add last modified timestamps to source files
Implemented automatic addition of "// Last modified: [timestamp]" headers across command and internal files for better tracking. Updated prompts in agent and edit commands to enforce header format. Added logic to prepend header if missing in generated content. Fixed minor issues like missing newlines at end of files.
2026-02-28 22:47:30 +00:00

36 lines
842 B
Go

// Last modified: 2026-02-28 22:43:53 GMT
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)
rootCmd.AddCommand(agentCmd)
chatCmd.Flags().StringP("model", "m", "", "Grok model to use (overrides config)")
}