Skip to content

Commit 9d257f4

Browse files
Improve CLI UX by limiting banner to root command
1 parent da40706 commit 9d257f4

1 file changed

Lines changed: 19 additions & 8 deletions

File tree

cmd/root.go

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,32 @@ import (
1010
var rootCmd = &cobra.Command{
1111
Use: "codewise",
1212
Short: "CLI that helps you scaffold, encode, validate, and automate DevOps workflows easily.",
13-
Long: `Codewise CLI v1.1.0
13+
Long: `Codewise CLI
1414
15-
This CLI helps you with common DevOps tasks like:
16-
- JSON/YAML conversions
17-
- Base64 encoding/decoding
18-
- Dockerfile and Kubernetes manifest generation
19-
- Project scaffolding and GitHub Actions template rendering
15+
A powerful platform-style CLI for DevOps workflows including:
16+
17+
• Environment-aware deployments
18+
• Kubernetes orchestration
19+
• Helm automation
20+
• Docker tooling
21+
• Template generation
22+
• Encoding utilities
2023
`,
24+
Run: func(cmd *cobra.Command, args []string) {
25+
26+
// Banner ONLY when no subcommand is provided
27+
PrintBanner()
28+
29+
_ = cmd.Help()
30+
},
2131
Version: "v1.1.0",
2232
}
2333

2434
// Execute runs the root command.
2535
func Execute() {
26-
PrintBanner()
36+
2737
if err := rootCmd.Execute(); err != nil {
28-
fmt.Println("", err)
38+
fmt.Println("error:", err)
2939
os.Exit(1)
3040
}
3141
}
@@ -40,5 +50,6 @@ func PrintBanner() {
4050
\____\___/ \__,_|\___/|_.__/ \__, |
4151
|___/
4252
Codewise CLI - Simplify your DevOps
53+
4354
`)
4455
}

0 commit comments

Comments
 (0)