/ go / internal / cli / version.go
version.go
 1  package cli
 2  
 3  import (
 4  	"fmt"
 5  
 6  	"github.com/spf13/cobra"
 7  	"github.com/TransformerOS/kamaji-go/internal/style"
 8  	"github.com/TransformerOS/kamaji-go/internal/version"
 9  )
10  
11  var versionCmd = &cobra.Command{
12  	Use:   "version",
13  	Short: "Show version information",
14  	Run:   runVersion,
15  }
16  
17  func init() {
18  	rootCmd.AddCommand(versionCmd)
19  	versionCmd.Flags().BoolP("full", "f", false, "Show full ASCII art banner")
20  }
21  
22  func runVersion(cmd *cobra.Command, args []string) {
23  	full, _ := cmd.Flags().GetBool("full")
24  	
25  	if full {
26  		fmt.Print(style.GetFullBanner())
27  	} else {
28  		fmt.Printf("%s\n", style.Fire("🔥 Kamaji "+version.GetFullVersion()))
29  		fmt.Printf("%s\n", style.DimText("   The AI assistant with multi-agent capabilities"))
30  		fmt.Printf("%s\n", style.Info("   Use --full flag to see ASCII art"))
31  	}
32  }