From 0ae5831ea8e1bf800a48fea86f28b7ac3918abe5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:21:37 +0000 Subject: [PATCH 1/3] Initial plan From 9d6e539259a78f355edb2ee9b137364104733f7e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:36:10 +0000 Subject: [PATCH 2/3] fix(cli): address CLI consistency issues from 2026-03-23 inspection Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/8458c5da-b45d-4184-a7e3-aaf9dc3901c6 --- cmd/gh-aw/main.go | 4 ++-- docs/src/content/docs/setup/cli.md | 10 +++++----- pkg/cli/fix_command.go | 2 +- pkg/cli/tokens_bootstrap.go | 6 +++--- pkg/cli/trial_command.go | 2 +- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/gh-aw/main.go b/cmd/gh-aw/main.go index 7c392de0fa6..8a0f5d2541b 100644 --- a/cmd/gh-aw/main.go +++ b/cmd/gh-aw/main.go @@ -745,10 +745,10 @@ Use "` + string(constants.CLIExtensionPrefix) + ` help all" to show help for all compileCmd.GroupID = "development" validateCmd.GroupID = "development" mcpCmd.GroupID = "development" - statusCmd.GroupID = "development" - listCmd.GroupID = "development" fixCmd.GroupID = "development" domainsCmd.GroupID = "development" + statusCmd.GroupID = "analysis" + listCmd.GroupID = "analysis" // Execution Commands runCmd.GroupID = "execution" diff --git a/docs/src/content/docs/setup/cli.md b/docs/src/content/docs/setup/cli.md index 5b5a3876afd..45a12dd1432 100644 --- a/docs/src/content/docs/setup/cli.md +++ b/docs/src/content/docs/setup/cli.md @@ -151,7 +151,7 @@ gh aw add-wizard https://github.com/org/repo/blob/main/workflows/my-workflow.md gh aw add-wizard githubnext/agentics/ci-doctor --skip-secret # Skip secret prompt ``` -**Options:** `--skip-secret` (bypass the API key prompt when the secret is already configured at org or repo level) +**Options:** `--skip-secret`, `--dir/-d`, `--engine/-e`, `--no-gitattributes`, `--no-stop-after`, `--stop-after` #### `add` @@ -164,7 +164,7 @@ gh aw add ci-doctor --dir shared # Organize in subdirectory gh aw add ci-doctor --create-pull-request # Create PR instead of commit ``` -**Options:** `--dir`, `--create-pull-request`, `--no-gitattributes` +**Options:** `--dir/-d`, `--create-pull-request`, `--no-gitattributes`, `--append`, `--disable-security-scanner`, `--engine/-e`, `--force/-f`, `--name/-n`, `--no-stop-after`, `--stop-after` #### `new` @@ -296,7 +296,7 @@ gh aw trial ./workflow.md --host-repo owner/repo # Run directly in repository gh aw trial ./workflow.md --dry-run # Preview without executing ``` -**Options:** `-e`, `--engine`, `--repeat`, `--delete-host-repo-after`, `--logical-repo`, `--clone-repo`, `--trigger-context`, `--host-repo`, `--dry-run` +**Options:** `-e/--engine`, `--repeat`, `--delete-host-repo-after`, `--logical-repo/-l`, `--clone-repo`, `--trigger-context`, `--host-repo`, `--dry-run`, `--append`, `--auto-merge-prs`, `--disable-security-scanner`, `--force-delete-host-repo-before`, `--timeout`, `--yes/-y` **Secret Handling:** API keys required for the selected engine are automatically checked. If missing from the target repository, they are prompted for interactively and uploaded. @@ -313,7 +313,7 @@ gh aw run workflow --push --ref main # Push to specific branch gh aw run workflow --json # Output triggered workflow results as JSON ``` -**Options:** `--repeat`, `--push` (see [--push flag](#the---push-flag)), `--ref`, `--enable-if-needed`, `--json/-j` +**Options:** `--repeat`, `--push` (see [--push flag](#the---push-flag)), `--ref`, `--enable-if-needed`, `--json/-j`, `--auto-merge-prs`, `--dry-run`, `--engine/-e`, `--raw-field/-F`, `--repo/-r` When `--json` is set, a JSON array of triggered workflow results is written to stdout. @@ -494,7 +494,7 @@ gh aw upgrade --audit # Run dependency health audit gh aw upgrade --audit --json # Dependency audit in JSON format ``` -**Options:** `--dir`, `--no-fix`, `--no-actions`, `--create-pull-request`, `--audit`, `--json` +**Options:** `--dir/-d`, `--no-fix`, `--no-actions`, `--no-compile`, `--create-pull-request`, `--audit`, `--json/-j` ### Advanced diff --git a/pkg/cli/fix_command.go b/pkg/cli/fix_command.go index 3caad204c91..3ccc5ba12c5 100644 --- a/pkg/cli/fix_command.go +++ b/pkg/cli/fix_command.go @@ -51,7 +51,7 @@ Without --write (dry-run mode), no files are modified. With --write, the command all steps and additionally: 4. Write updated files back to disk 5. Delete deprecated .github/aw/schemas/agentic-workflow.json file if it exists - 6. Delete old template files from pkg/cli/templates/ if present + 6. Delete old template files from previous versions if present 7. Delete old workflow-specific .agent.md files from .github/agents/ if present ` + WorkflowIDExplanation + ` diff --git a/pkg/cli/tokens_bootstrap.go b/pkg/cli/tokens_bootstrap.go index d346302d5ab..248a3f72607 100644 --- a/pkg/cli/tokens_bootstrap.go +++ b/pkg/cli/tokens_bootstrap.go @@ -20,9 +20,9 @@ func newSecretsBootstrapSubcommand() *cobra.Command { cmd := &cobra.Command{ Use: "bootstrap", Short: "Analyze workflows and set up required secrets", - Long: `Analyzes all workflows in the repository to determine which secrets -are required, checks which ones are already configured, and interactively -prompts for any missing required secrets. + Long: `Analyze all workflows in the repository to determine which secrets +are required, check which ones are already configured, and interactively +prompt for any missing required secrets. This command: - Discovers all workflow files in .github/workflows/ diff --git a/pkg/cli/trial_command.go b/pkg/cli/trial_command.go index 97141023d7f..8d58f60bbb7 100644 --- a/pkg/cli/trial_command.go +++ b/pkg/cli/trial_command.go @@ -177,7 +177,7 @@ Trial results are saved both locally (in trials/ directory) and in the host repo } // Add flags - cmd.Flags().StringP("logical-repo", "s", "", "The repo we're simulating the execution for, as if the workflow was installed in that repo (defaults to current repository)") + cmd.Flags().StringP("logical-repo", "l", "", "The repo we're simulating the execution for, as if the workflow was installed in that repo (defaults to current repository)") cmd.Flags().String("clone-repo", "", "Alternative to --logical-repo: clone the contents of the specified repo into the host repo instead of using logical repository simulation") cmd.Flags().String("host-repo", "", "Custom host repository slug (defaults to '/gh-aw-trial'). Use '.' for current repository") From a4e85e47ab60f066a80906d97a1dcff3c887eff0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 23 Mar 2026 17:06:39 +0000 Subject: [PATCH 3/3] fix: update command group tests and add missing --repo/-r to add docs Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> Agent-Logs-Url: https://github.com/github/gh-aw/sessions/e5789aee-d767-4b10-a9b4-52f24063994f --- cmd/gh-aw/command_groups_test.go | 3 ++- docs/src/content/docs/setup/cli.md | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cmd/gh-aw/command_groups_test.go b/cmd/gh-aw/command_groups_test.go index 5d840fb7f33..10e3e5dd7b3 100644 --- a/cmd/gh-aw/command_groups_test.go +++ b/cmd/gh-aw/command_groups_test.go @@ -27,7 +27,6 @@ func TestCommandGroupAssignments(t *testing.T) { // Development Commands {name: "compile command in development group", commandName: "compile", expectedGroup: "development", shouldHaveGroup: true}, {name: "mcp command in development group", commandName: "mcp", expectedGroup: "development", shouldHaveGroup: true}, - {name: "status command in development group", commandName: "status", expectedGroup: "development", shouldHaveGroup: true}, {name: "fix command in development group", commandName: "fix", expectedGroup: "development", shouldHaveGroup: true}, // Execution Commands @@ -39,6 +38,8 @@ func TestCommandGroupAssignments(t *testing.T) { // Analysis Commands {name: "logs command in analysis group", commandName: "logs", expectedGroup: "analysis", shouldHaveGroup: true}, {name: "audit command in analysis group", commandName: "audit", expectedGroup: "analysis", shouldHaveGroup: true}, + {name: "status command in analysis group", commandName: "status", expectedGroup: "analysis", shouldHaveGroup: true}, + {name: "list command in analysis group", commandName: "list", expectedGroup: "analysis", shouldHaveGroup: true}, // Utilities {name: "mcp-server command in utilities group", commandName: "mcp-server", expectedGroup: "utilities", shouldHaveGroup: true}, diff --git a/docs/src/content/docs/setup/cli.md b/docs/src/content/docs/setup/cli.md index 45a12dd1432..d715c397c93 100644 --- a/docs/src/content/docs/setup/cli.md +++ b/docs/src/content/docs/setup/cli.md @@ -164,7 +164,7 @@ gh aw add ci-doctor --dir shared # Organize in subdirectory gh aw add ci-doctor --create-pull-request # Create PR instead of commit ``` -**Options:** `--dir/-d`, `--create-pull-request`, `--no-gitattributes`, `--append`, `--disable-security-scanner`, `--engine/-e`, `--force/-f`, `--name/-n`, `--no-stop-after`, `--stop-after` +**Options:** `--dir/-d`, `--repo/-r`, `--create-pull-request`, `--no-gitattributes`, `--append`, `--disable-security-scanner`, `--engine/-e`, `--force/-f`, `--name/-n`, `--no-stop-after`, `--stop-after` #### `new`