diff --git a/cmd/doctor.go b/cmd/doctor.go new file mode 100644 index 0000000..f8904f5 --- /dev/null +++ b/cmd/doctor.go @@ -0,0 +1,24 @@ +package cmd + +import ( + "fmt" + "runtime" + + "github.com/spf13/cobra" +) + +var doctorCmd = &cobra.Command{ + Use: "doctor", + Short: "Check Codewise CLI environment", + Run: func(cmd *cobra.Command, args []string) { + fmt.Println("Codewise CLI Doctor") + fmt.Println("-------------------") + fmt.Println("Go version:", runtime.Version()) + fmt.Println("OS/Arch:", runtime.GOOS, runtime.GOARCH) + fmt.Println("Codewise version:", rootCmd.Version) + }, +} + +func init() { + rootCmd.AddCommand(doctorCmd) +}