Skip to content

Commit e7e7d13

Browse files
Namanclaude
authored andcommitted
fix: --help on subcommands no longer triggers auth error
- Skip auth check when --help, -h, or help is in args - Add init and ask to auth-exempt command list - Remove stale completion exemption (command was deleted) - Fix home screen alphabetical order (me was misplaced after templates) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 5b91bb7 commit e7e7d13

1 file changed

Lines changed: 9 additions & 2 deletions

File tree

cmd/root/root.go

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ func NewApp() *cli.App {
6565
// Store the output format in metadata
6666
c.App.Metadata[output.FormatKey] = output.DetectFormat(c)
6767

68+
// Skip auth for --help / -h on any command
69+
for _, a := range c.Args().Slice() {
70+
if a == "--help" || a == "-h" || a == "help" {
71+
return nil
72+
}
73+
}
74+
6875
apiURL := c.String("api-url")
6976
if apiURL != "" && apiURL != api.DefaultBaseURL {
7077
parsed, err := url.Parse(apiURL)
@@ -74,7 +81,7 @@ func NewApp() *cli.App {
7481
}
7582

7683
cmd := c.Args().First()
77-
if cmd == "" || cmd == "login" || cmd == "logout" || cmd == "version" {
84+
if cmd == "" || cmd == "login" || cmd == "logout" || cmd == "version" || cmd == "ask" || cmd == "init" {
7885
return nil
7986
}
8087

@@ -137,14 +144,14 @@ func NewApp() *cli.App {
137144
fmt.Println(" environments Manage project environments")
138145
fmt.Println(" init Link this directory to a CreateOS project")
139146
fmt.Println(" logout Sign out from CreateOS")
147+
fmt.Println(" me Manage your account and OAuth consents")
140148
fmt.Println(" oauth-clients Manage OAuth clients")
141149
fmt.Println(" open Open project URL or dashboard in browser")
142150
fmt.Println(" projects Manage projects")
143151
fmt.Println(" scale Adjust replicas and resources")
144152
fmt.Println(" skills Manage skills")
145153
fmt.Println(" status Show project health and deployment status")
146154
fmt.Println(" templates Browse and scaffold from project templates")
147-
fmt.Println(" me Manage your account and OAuth consents")
148155
fmt.Println(" vms Manage VM terminal instances")
149156
fmt.Println(" whoami Show the currently authenticated user")
150157
} else {

0 commit comments

Comments
 (0)