Skip to content

[cli-consistency] CLI Consistency Issues - 2026-03-06 #19866

@github-actions

Description

@github-actions

Summary

Automated CLI consistency inspection found 8 inconsistencies in command help text that should be addressed for better user experience and documentation clarity.

Breakdown by Severity

  • High: 1 (Broken documentation link)
  • Medium: 4 (Misleading text / conflicting conventions)
  • Low: 3 (Minor inconsistencies)

Inspection Details

  • Total Commands Inspected: 28 (all top-level and subcommands run with --help)
  • Commands with Issues: 7
  • Date: 2026-03-06
  • Method: Executed all CLI commands with --help flags and analyzed actual output; cross-referenced source code and docs/src/content/docs/setup/cli.md

Findings Summary

No issues found in these areas:

  • Flag naming consistency across commands
  • Example formatting for most commands
  • Short descriptions (generally clear and consistent)
  • --verbose, --json, --repo, --engine, --dir, --output flag consistency
  • MCP subcommands, pr transfer, audit, logs, run, enable, disable, add, update, health, checks, completion

⚠️ Issues found:

  • Broken documentation URL (project new)
  • Misleading step annotation in fix command
  • Example alignment inconsistencies (compile, status)
  • Conflicting --repo flag semantics (trial)
  • Auto-generated cobra help text (--help, --version global flags)
  • secrets bootstrap non-standard section ordering
  • version command lacks examples
Detailed Findings

1. Broken Documentation URL in project new

Command Affected: gh aw project new
Priority: High
Type: Broken link / wrong domain

Current Output (from running ./gh-aw project new --help):

Authentication Requirements:
  The default GITHUB_TOKEN cannot create projects. You must use additional authentication.
  See https://github.github.com/gh-aw/reference/auth/.
```

**Issue**: The URL `https://github.github.com/gh-aw/reference/auth/` contains a doubled `github.github.com` domain. This is almost certainly a typo and will result in a 404 for users following the link.

**Suggested Fix**: Correct the domain to the actual docs URL. Based on `docs/src/content/docs/setup/cli.md` patterns, it is likely `(github.github.io/redacted) or the GitHub repository URL format.

**Source file**: `pkg/cli/project_command.go` line 68

---

#### 2. Missing `(with --write flag)` annotation for Step 5 in `fix` command

**Command Affected**: `gh aw fix`
**Priority**: Medium
**Type**: Misleading help text

**Current Output** (from running `./gh-aw fix --help`):
```
The command will:
  1. Scan workflow files for deprecated fields
  2. Apply relevant codemods to fix issues
  3. Report what was changed in each file
  4. Write updated files back to disk (with --write flag)
  5. Delete deprecated .github/aw/schemas/agentic-workflow.json file if it exists
  6. Delete old template files from pkg/cli/templates/ (with --write flag)
  7. Delete old workflow-specific .agent.md files from .github/agents/ (with --write flag)
```

**Issue**: Step 5 does **not** include the `(with --write flag)` annotation, but the source code (`pkg/cli/fix_command.go` lines 205–222) shows the deletion IS gated on the `write` flag, identical to steps 6 and 7. The omission implies step 5 always deletes the file, which is incorrect.

**Suggested Fix**: Add `(with --write flag)` to step 5:
```
  5. Delete deprecated .github/aw/schemas/agentic-workflow.json file if it exists (with --write flag)
```

**Source file**: `pkg/cli/fix_command.go` line 50

---

#### 3. Inconsistent Example Alignment in `compile` command

**Command Affected**: `gh aw compile`
**Priority**: Medium
**Type**: Formatting inconsistency

**Current Output** (from running `./gh-aw compile --help`):
```
  gh aw compile                    # Compile all Markdown files
  gh aw compile ci-doctor    # Compile a specific workflow
  gh aw compile ci-doctor daily-plan  # Compile multiple workflows
  gh aw compile workflow.md        # Compile by file path
```

**Issue**: The comment `#` columns are misaligned. Lines 1 and 4 align their comments to column ~37, but lines 2 and 3 align comments only to column ~28 and ~31 respectively. This is visually inconsistent.

**Suggested Fix**: Align all `#` comment delimiters in the examples section to a consistent column.

---

#### 4. Inconsistent Example Alignment in `status` command

**Command Affected**: `gh aw status`
**Priority**: Medium
**Type**: Formatting inconsistency

**Current Output** (from running `./gh-aw status --help`):
```
  gh aw status                          # Show all workflow status
  gh aw status ci-                       # Show workflows with 'ci-' in name
```

**Issue**: `gh aw status ci-` has extra trailing spaces between the command and the `#` comment, making it appear one character past the alignment of the first example.

**Suggested Fix**: Align the `#` delimiter:
```
  gh aw status                          # Show all workflow status
  gh aw status ci-                      # Show workflows with 'ci-' in name
```

---

#### 5. `--repo` Flag Semantics Conflict in `trial` command

**Command Affected**: `gh aw trial`
**Priority**: Medium
**Type**: Inconsistent flag semantics

**Current Output** (from running `./gh-aw trial --help`):
```
      --repo string   Alias for --host-repo
```

**Issue**: In all other commands (`run`, `logs`, `status`, `disable`, `enable`, `checks`, `health`, etc.) `--repo` means "Target repository ([HOST/]owner/repo format). Defaults to current repository". In `trial`, it means "Alias for --host-repo" (the ephemeral trial repository, not the production target). Users familiar with `--repo` from other commands will expect it to refer to the logical repository to test against, not the trial host.

**Suggested Fix**: Either rename the flag to avoid collision, or update the description to be explicit about the difference:
```
      --repo string   Alias for --host-repo (the trial host repo, not the logical target; use --logical-repo for the simulated target)
```

---

#### 6. Global Flags Say "for gh" Instead of "for gh aw"

**Commands Affected**: All commands (global flags)
**Priority**: Low
**Type**: Auto-generated cobra text mismatch

**Current Output** (from running `./gh-aw --help`):
```
  -h, --help      help for gh
      --version   version for gh
```

**Issue**: The cobra-generated descriptions say "for gh" when users interact with the tool as `gh aw`. This can be confusing since `gh` is the parent GitHub CLI. The root command `Use` is set to `gh aw` but cobra uses only the first word.

**Suggested Fix**: Override the default cobra help/version descriptions by setting custom descriptions on the root command, e.g.:
```
  -h, --help      Show help for gh aw
      --version   Show version for gh aw
```

---

#### 7. `secrets bootstrap` — Examples Section Placed After Usage

**Command Affected**: `gh aw secrets bootstrap`
**Priority**: Low
**Type**: Inconsistent help section ordering

**Current Output** (from running `./gh-aw secrets bootstrap --help`):
```
Analyzes all workflows...

This command:
- ...

Only required secrets are prompted for...

Usage:
  gh aw secrets bootstrap [flags]

Examples:
  gh aw secrets bootstrap          # ...
```

**Issue**: For `secrets bootstrap`, the `Examples` section appears **after** `Usage`. Every other command in the CLI places `Examples` **before** `Usage`. This is the only command with this ordering.

**Suggested Fix**: Move the `Examples` block before the `Usage` block in the cobra command definition.

---

#### 8. `version` Command Has No Examples or Meaningful Description

**Command Affected**: `gh aw version`
**Priority**: Low
**Type**: Missing documentation

**Current Output** (from running `./gh-aw version --help`):
```
Show gh aw extension version information

Usage:
  gh aw version [flags]

Flags:
  -h, --help   help for version

Global Flags:
  ...
```

**Issue**: The `version` command has no `Examples` section, no `Long` description, and no detail about what the version output looks like or what flags are available. All other commands have at least one example. The only content is a short description.

**Suggested Fix**: Add a `Long` description and examples:
```
Show gh aw extension version information, including the build SHA.

Examples:
  gh aw version            # Show current version
  gh aw version --verbose  # Show detailed build information

Generated by CLI Consistency Checker ·

  • expires on Mar 8, 2026, 1:31 PM UTC

Metadata

Metadata

Labels

automationclicookieIssue Monster Loves Cookies!documentationImprovements or additions to documentation

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions