Skip to content

Commit 654af8d

Browse files
authored
fix: resolve 11 CLI help text consistency issues (#26047)
1 parent e2355b0 commit 654af8d

9 files changed

Lines changed: 17 additions & 33 deletions

File tree

cmd/gh-aw/main.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,11 +86,12 @@ var rootCmd = &cobra.Command{
8686
8787
Common Tasks:
8888
gh aw init # Set up a new repository
89+
gh aw add-wizard # Add workflows with interactive guided setup
8990
gh aw new my-workflow # Create your first workflow
9091
gh aw compile # Compile all workflows
9192
gh aw run my-workflow # Execute a workflow
9293
gh aw logs my-workflow # View execution logs
93-
gh aw audit <run-id> # Debug a failed run
94+
gh aw audit <run-id-or-url> # Debug a failed run
9495
9596
For detailed help on any command, use:
9697
gh aw [command] --help`,
@@ -163,19 +164,19 @@ Examples:
163164
}
164165

165166
var removeCmd = &cobra.Command{
166-
Use: "remove [pattern]",
167-
Short: "Remove agentic workflow files matching the given pattern",
168-
Long: `Remove agentic workflow files matching the given workflow-id pattern.
167+
Use: "remove [filter]",
168+
Short: "Remove agentic workflow files matching the given filter",
169+
Long: `Remove agentic workflow files matching the given filter.
169170
170171
The workflow-id is the basename of the Markdown file without the .md extension.
171-
You can provide a workflow-id prefix to remove multiple workflows, or a specific workflow-id.
172+
You can provide a substring to match multiple workflows, or a specific workflow-id.
172173
173174
By default, this command also removes orphaned include files that are no longer referenced
174175
by any workflow. Use --keep-orphans to skip this cleanup.
175176
176177
Examples:
177178
` + string(constants.CLIExtensionPrefix) + ` remove my-workflow # Remove specific workflow
178-
` + string(constants.CLIExtensionPrefix) + ` remove test- # Remove all workflows starting with 'test-'
179+
` + string(constants.CLIExtensionPrefix) + ` remove test- # Remove all workflows containing 'test-' in name
179180
` + string(constants.CLIExtensionPrefix) + ` remove old- --keep-orphans # Remove workflows but keep orphaned includes
180181
` + string(constants.CLIExtensionPrefix) + ` remove my-workflow --dir .github/workflows/shared # Remove from custom directory`,
181182
RunE: func(cmd *cobra.Command, args []string) error {

docs/src/content/docs/setup/cli.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,13 @@ The `gh aw` CLI extension enables developers to create, manage, and execute AI-p
1414
| [`gh aw init`](#init) | Set up your repository for agentic workflows |
1515
| [`gh aw add-wizard`](#add-wizard) | Add workflows with interactive guided setup |
1616
| [`gh aw add`](#add) | Add workflows from other repositories (non-interactive) |
17+
| [`gh aw new`](#new) | Create a new workflow from scratch |
1718
| [`gh aw compile`](#compile) | Convert markdown to GitHub Actions YAML |
1819
| [`gh aw list`](#list) | Quick listing of all workflows |
1920
| [`gh aw run`](#run) | Execute workflows immediately in GitHub Actions |
2021
| [`gh aw status`](#status) | Check current state of all workflows |
22+
| [`gh aw logs`](#logs) | Download and analyze workflow logs |
23+
| [`gh aw audit`](#audit) | Debug a failed workflow run |
2124

2225
## Installation
2326

pkg/cli/audit.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,6 @@ When a job URL is provided:
4545
- If no step number, finds and extracts the first failing step's output
4646
- Saves job logs to the output directory
4747
48-
This command:
49-
- Downloads artifacts and logs for the specified run ID
50-
- Detects errors and warnings in the logs
51-
- Analyzes MCP tool usage statistics
52-
- Extracts missing tool reports
53-
- Generates a concise Markdown report
54-
5548
Examples:
5649
` + string(constants.CLIExtensionPrefix) + ` audit 1234567890 # Audit run with ID 1234567890
5750
` + string(constants.CLIExtensionPrefix) + ` audit https://github.com/owner/repo/actions/runs/1234567890 # Audit from run URL

pkg/cli/list_workflows_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Examples:
7272
addJSONFlag(cmd)
7373
cmd.Flags().String("label", "", "Filter workflows by label")
7474
cmd.Flags().String("path", ".github/workflows", "Path to workflows directory in the remote repository (used with --repo)")
75-
cmd.Flags().StringP("dir", "d", "", "Local workflow directory (overrides default .github/workflows; ignored when --repo is set)")
75+
cmd.Flags().StringP("dir", "d", "", "Workflow directory (default: .github/workflows; ignored when --repo is set)")
7676

7777
// Register completions for list command
7878
cmd.ValidArgsFunction = CompleteWorkflowNames

pkg/cli/logs_command.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,8 @@ Examples:
5757
# Date filtering
5858
` + string(constants.CLIExtensionPrefix) + ` logs --start-date 2024-01-01 # Download all runs after date
5959
` + string(constants.CLIExtensionPrefix) + ` logs --end-date 2024-01-31 # Download all runs before date
60-
` + string(constants.CLIExtensionPrefix) + ` logs --start-date -1w # Download all runs from last week
61-
` + string(constants.CLIExtensionPrefix) + ` logs --start-date -1w -c 5 # Download all runs from last week, show up to 5
60+
` + string(constants.CLIExtensionPrefix) + ` logs --start-date -1w # Download up to 10 runs from last week
61+
` + string(constants.CLIExtensionPrefix) + ` logs --start-date -1w -c 5 # Download up to 5 runs from last week
6262
` + string(constants.CLIExtensionPrefix) + ` logs --end-date -1d # Download all runs until yesterday
6363
` + string(constants.CLIExtensionPrefix) + ` logs --start-date -1mo # Download all runs from last month
6464
@@ -208,7 +208,7 @@ Examples:
208208
addJSONFlag(logsCmd)
209209
logsCmd.Flags().Int("timeout", 0, "Download timeout in minutes (0 = no timeout)")
210210
logsCmd.Flags().String("summary-file", "summary.json", "Path to write the summary JSON file relative to output directory (use empty string to disable)")
211-
logsCmd.Flags().Bool("train", false, "Train drain3 log template weights from downloaded runs and write drain3_weights.json to the output directory")
211+
logsCmd.Flags().Bool("train", false, "Train Drain3 (log template mining) weights from downloaded runs and write drain3_weights.json to the output directory")
212212
logsCmd.Flags().String("format", "", "Output format for cross-run audit report: markdown, pretty (generates security audit report instead of default metrics table)")
213213
logsCmd.Flags().Int("last", 0, "Alias for --count: number of recent runs to download")
214214
logsCmd.Flags().StringSlice("artifacts", nil, "Artifact sets to download (default: all). Valid sets: "+strings.Join(ValidArtifactSetNames(), ", "))

pkg/cli/remove_command.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func RemoveWorkflows(pattern string, keepOrphans bool, workflowDir string) error
5959
fmt.Fprintf(os.Stderr, " %s\n", name)
6060
}
6161
}
62-
fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("\nUsage: %s remove <pattern>", string(constants.CLIExtensionPrefix))))
62+
fmt.Fprintln(os.Stderr, console.FormatInfoMessage(fmt.Sprintf("\nUsage: %s remove <filter>", string(constants.CLIExtensionPrefix))))
6363
return nil
6464
}
6565

pkg/cli/tokens_bootstrap.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ func newSecretsBootstrapSubcommand() *cobra.Command {
2424
are required, check which ones are already configured, and interactively
2525
prompt for any missing required secrets.
2626
27-
This command:
28-
- Discovers all workflow files in .github/workflows/
29-
- Analyzes required secrets for each workflow's engine
30-
- Checks which secrets already exist in the repository
31-
- Interactively prompts for missing required secrets (unless --non-interactive)
32-
3327
Only required secrets are prompted for. Optional secrets are not shown.
3428
3529
For full details, including precedence rules, see the GitHub Tokens

pkg/cli/trial_command.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Workflows from different repositories:
3030
` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/daily-plan myorg/myrepo/custom-workflow
3131
3232
Repository mode examples:
33-
` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --host-repo myorg/myrepo # Run directly in myorg/myrepo (no simulation)
33+
` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --host-repo myorg/myrepo # Use myorg/myrepo as host for trial execution
3434
` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --logical-repo myorg/myrepo # Simulate running against myorg/myrepo
3535
` + string(constants.CLIExtensionPrefix) + ` trial githubnext/agentics/my-workflow --clone-repo myorg/myrepo # Clone myorg/myrepo contents into host
3636
@@ -127,7 +127,7 @@ Trial results are saved both locally (in trials/ directory) and in the host repo
127127
cmd.Flags().Bool("force-delete-host-repo-before", false, "Force delete the host repository before creation if it already exists")
128128
cmd.Flags().BoolP("yes", "y", false, "Skip confirmation prompts")
129129
cmd.Flags().Bool("dry-run", false, "Show what would be done without making any changes")
130-
cmd.Flags().Int("timeout", 30, "Execution timeout in minutes (e.g., 30 for 30 minutes)")
130+
cmd.Flags().Int("timeout", 30, "Execution timeout in minutes")
131131
cmd.Flags().String("trigger-context", "", "Trigger context URL (e.g., GitHub issue URL) for issue-triggered workflows")
132132
cmd.Flags().Int("repeat", 0, "Number of additional times to run after the initial execution (e.g., --repeat 3 runs 4 times total)")
133133
cmd.Flags().Bool("auto-merge-prs", false, "Auto-merge any pull requests created during trial execution")

pkg/cli/upgrade_command.go

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,6 @@ Use --audit to check dependency health without performing upgrades. This include
5151
5252
The --audit flag skips the normal upgrade process.
5353
54-
The upgrade process ensures:
55-
- Dispatcher agent is current (.github/agents/agentic-workflows.agent.md)
56-
- All workflows use the latest syntax and configuration options
57-
- Deprecated fields are automatically migrated across all workflows
58-
- GitHub Actions are pinned to the latest versions
59-
- All workflows are compiled and lock files are up-to-date
60-
6154
This command always upgrades all Markdown files in .github/workflows.
6255
6356
Examples:

0 commit comments

Comments
 (0)