fix(cli): describe Git and CLI commands in root help

The Git and CLI groups listed command names on one line with no
summaries, so finding the command for a task meant opening each one's
help. Give them a row and summary like every other group.
This commit is contained in:
Willie
2026-11-16 14:14:09 +08:00
parent ffbddb608a
commit d8bac85fac
2 changed files with 14 additions and 2 deletions
+13 -2
View File
@@ -242,8 +242,19 @@ func printUsage() {
{"trash", "Restore something you uninstalled"},
{"log", "See what ran"},
}},
helpGroup{title: "Git", rows: []helpRow{{"commit · push · pull", ""}}},
helpGroup{title: "CLI", rows: []helpRow{{"upgrade · updates · hub · tui · completion · version", ""}}},
helpGroup{title: "Git", rows: []helpRow{
{"commit", "Commit source changes without pushing"},
{"push", "Commit and push the source to its remote"},
{"pull", "Pull the source and sync every Target"},
}},
helpGroup{title: "CLI", rows: []helpRow{
{"upgrade", "Upgrade the CLI and the built-in skill"},
{"updates", "Turn automatic update checks on or off"},
{"hub", "Manage saved hubs for search"},
{"tui", "Turn the full-screen UI on or off"},
{"completion", "Generate shell completion scripts"},
{"version", "Show the installed version"},
}},
helpGroup{title: "Common options", rows: []helpRow{
{"-p, --project", "Use this project's config"},
{"-g, --global", "Use the global config"},
+1
View File
@@ -17,6 +17,7 @@ func TestHelp_ShowsUsage(t *testing.T) {
result.AssertOutputContains(t, "skillshare")
result.AssertOutputContains(t, "Skills and agents")
result.AssertOutputContains(t, "Common options")
result.AssertOutputContains(t, "Pull the source and sync every Target")
}
func TestHelp_ShortFlag(t *testing.T) {