You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Browse filesBrowse the repository at this point in the historyBrowse files
authored
fix(cli): address 16 CLI consistency issues from 2026-07-20 audit (#46854)
* Initial plan
* fix(cli): address CLI consistency issues from 2026-07-20 audit
- TG-1: Add missing article 'the' before 'workflow_dispatch trigger' in trial help
- TG-2: Fix phrasing 'created as private and kept' → 'created as a private repository and retained' in trial help
- TG-3: Capitalize 'Markdown' as proper noun in cli.md
- TG-4: Fix tense inconsistency in checks command ('are blocking' → 'blocked')
- TG-5: Add 'Requires a clean working directory' to --push flag help text
- FN-1: Add --delete-host-repo-before flag; keep --force-delete-host-repo-before as deprecated
- FN-2: Add --no-remove-orphans flag for remove command; keep --keep-orphans as deprecated
- FN-3: Remove uppercase -F shorthand from --raw-field; update example to --raw-field
- DM-3: Add [HOST/] prefix to doctor --repo flag description
- DM-4: Update root help 'View execution logs' → 'Download and analyze execution logs'
- DM-5: Fix 'pinned Actions' → 'pinned actions' in cli.md
- DM-6: Fix 'from The Agentics collection' → 'from the Agentics collection' in cli.md
- DM-7: Add note about default action-bump behavior to update command Long description
- ID-1: Standardize --evals flag to positive phrasing in audit command
- ID-2: Expand run --approve description to mention strict-mode behavior
- ID-3: Fix new --force description to 'Overwrite existing workflow files without confirmation'
- Update all related tests and docs
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* fix(cli): improve trial command variable naming clarity
Rename forceDeleteHostRepo variable to legacyForceDelete for clarity
when merging the deprecated --force-delete-host-repo-before and new
--delete-host-repo-before flags, making the intent more explicit.
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
* fix(cli): address PR review follow-up
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
* test(cli): clarify Windows cleanup retry loop
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
* test(cli): name Windows cleanup retry settings
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: gh-aw-bot <259018956+gh-aw-bot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
runCmd.Flags().Bool("push", false, "Commit and push workflow files (including transitive imports) before running. Refuses to proceed when unrelated files are already staged.")
799
804
runCmd.Flags().Bool("dry-run", false, "Preview workflow execution without triggering runs on GitHub Actions")
800
805
runCmd.Flags().BoolP("json", "j", false, "Output results in JSON format")
801
-
runCmd.Flags().Bool("approve", false, "Approve safe update manifest changes when --push triggers an automatic recompile step")
806
+
runCmd.Flags().Bool("approve", false, "Approve safe update manifest changes when --push triggers an automatic recompile step. When strict mode is active (the default), the recompile step enforces safe update checking; pass this flag to approve those changes.")
assert.Equal(t, "Approve safe update manifest changes when --push triggers an automatic recompile step", runApprove.Usage, "run --approve should explain the --push-triggered recompile behavior")
24
+
assert.Equal(t, "Approve safe update manifest changes when --push triggers an automatic recompile step. When strict mode is active (the default), the recompile step enforces safe update checking; pass this flag to approve those changes.", runApprove.Usage, "run --approve should explain the --push-triggered recompile behavior with strict mode context")
25
+
assert.Equal(t, "Commit and push workflow files (including transitive imports) before running. Refuses to proceed when unrelated files are already staged.", runPush.Usage, "run --push should describe the staged-files precondition precisely")
26
+
assert.Equal(t, "F", runRawField.Shorthand, "run --raw-field should keep the legacy -F shorthand for compatibility")
27
+
assert.Equal(t, "use --raw-field instead", runRawField.ShorthandDeprecated, "run -F shorthand should be marked deprecated")
Copy file name to clipboardExpand all lines: docs/src/content/docs/setup/cli.md
+10-10Lines changed: 10 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ sidebar:
5
5
order: 200
6
6
---
7
7
8
-
The `gh aw` CLI extension enables developers to create, manage, and execute AI-powered workflows directly from the command line. It transforms natural language markdown files into GitHub Actions.
8
+
The `gh aw` CLI extension enables developers to create, manage, and execute AI-powered workflows directly from the command line. It transforms natural language Markdown files into GitHub Actions.
9
9
10
10
## Most Common Commands
11
11
@@ -133,7 +133,7 @@ Use `gh aw version` to print the current version.
133
133
134
134
### The `--push` Flag
135
135
136
-
`gh aw run --push`stages all changes, commits them, and pushes before dispatching the workflow. It requires a clean working directory.
136
+
`gh aw run --push`stages workflow files (including transitive imports), commits them, and pushes before dispatching the workflow. It refuses to proceed when unrelated files are already staged.
137
137
138
138
For `init`, `update`, and `upgrade`, use `--create-pull-request` instead.
139
139
@@ -178,7 +178,7 @@ When the Copilot engine is selected, the wizard prompts the user to choose an au
178
178
179
179
#### `add`
180
180
181
-
Add workflows from The Agentics collection or other repositories to `.github/workflows`. For remote workflows, this command follows frontmatter [`redirect`](/gh-aw/reference/frontmatter/#redirect-redirect) declarations before installation.
181
+
Add workflows from the Agentics collection or other repositories to `.github/workflows`. For remote workflows, this command follows frontmatter [`redirect`](/gh-aw/reference/frontmatter/#redirect-redirect) declarations before installation.
182
182
183
183
```bash wrap
184
184
gh aw add githubnext/agentics/ci-doctor # Add single workflow
@@ -341,7 +341,7 @@ Unlike `gh aw upgrade`, `gh aw compile` does not run codemods unless you pass `-
341
341
342
342
**Dependabot Integration (`--dependabot`):** Generates dependency manifests and `.github/dependabot.yml` by analyzing runtime tools across all workflows. See [Dependabot Support reference](/gh-aw/reference/dependabot/).
343
343
344
-
**Strict Mode (`--strict`):** Enforces security best practices: no write permissions (use [safe-outputs](/gh-aw/reference/safe-outputs/)), explicit `network` config, no wildcard domains, pinned Actions, no deprecated fields. See [Strict Mode reference](/gh-aw/reference/frontmatter/#strict-mode-strict).
344
+
**Strict Mode (`--strict`):** Enforces security best practices: no write permissions (use [safe-outputs](/gh-aw/reference/safe-outputs/)), explicit `network` config, no wildcard domains, pinned actions, no deprecated fields. See [Strict Mode reference](/gh-aw/reference/frontmatter/#strict-mode-strict).
345
345
346
346
**Shared Workflows:** Workflows without an `on` field are detected as shared components. Validated with relaxed schema and skip compilation. See [Imports reference](/gh-aw/reference/imports/).
347
347
@@ -392,7 +392,7 @@ gh aw trial ./workflow.md --host-repo owner/repo # Run directly in repository
392
392
gh aw trial ./workflow.md --dry-run # Preview without executing
**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.
398
398
@@ -410,7 +410,7 @@ gh aw run workflow --dry-run # Preview without triggering workflo
410
410
gh aw run workflow --json # Output triggered workflow results as JSON
When `--json` is set, a JSON array of triggered workflow results is written to stdout.
416
416
@@ -698,12 +698,12 @@ gh aw disable ci-doctor --repo owner/repo # Disable in specific repository
698
698
Remove workflows (both `.md` and `.lock.yml`). Accepts a workflow ID (basename without `.md`) or a substring pattern matching multiple workflows. By default, also removes orphaned include files no longer referenced by any workflow.
699
699
700
700
```bash wrap
701
-
gh aw remove my-workflow # Remove specific workflow
702
-
gh aw remove test- # Remove all workflows containing 'test-' in their name
703
-
gh aw remove my-workflow --keep-orphans # Remove but keep orphaned include files
701
+
gh aw remove my-workflow # Remove specific workflow
702
+
gh aw remove test- # Remove all workflows containing 'test-' in their name
703
+
gh aw remove my-workflow --no-remove-orphans # Remove but keep orphaned include files
cmd.Flags().Bool("stdin", false, "Read workflow run IDs or URLs from stdin (one per line) instead of positional arguments")
112
112
cmd.Flags().String("experiment", "", "Filter to runs that include this experiment name")
113
113
cmd.Flags().String("variant", "", "Filter to runs with a specific variant value (requires --experiment)")
114
-
cmd.Flags().Bool("evals", false, "Skip runs that do not contain evals results (evals.jsonl); automatically downloads the usage artifact (which includes evals) when --artifacts is narrowed")
114
+
cmd.Flags().Bool("evals", false, "Filter to runs containing evals results (evals.jsonl); automatically downloads the usage artifact (which includes evals) when --artifacts is narrowed")
0 commit comments