Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 1, 2026

Several parent commands (remove, secrets, mcp, pr, campaign) had minimal help text with few examples, making it unclear what the commands do and how to use them effectively.

Changes

Enhanced parent command help text:

  • remove: Added orphaned include file cleanup explanation + 3rd example with --keep-orphans
  • secrets: Added subcommand descriptions, AI/GitHub token context, 3 examples covering set/bootstrap/validation workflows
  • mcp: Added subcommand descriptions (list/inspect/add), 4 examples showing common MCP operations
  • pr: Added trial repository migration context, 3 examples with different repository scenarios
  • campaign: Added subcommand descriptions (status/new/validate), expanded to 5 examples covering all operations

Before (secrets):

Use this command to set secrets for workflows and check which recommended
token secrets are configured for your repository.

After:

This command provides tools for managing secrets required by agentic workflows, including
AI API keys (Anthropic, OpenAI, GitHub Copilot) and GitHub tokens for workflow execution.

Available subcommands:
  • set       - Create or update individual secrets
  • bootstrap - Validate and configure all required secrets for workflows

Examples:
  gh aw secrets set MY_SECRET --value "secret123"
  gh aw secrets bootstrap
  gh aw init --tokens --engine copilot

All commands now have ≥3 examples and clear context about their purpose and available subcommands.

Original prompt

This section details on the original issue you should resolve

<issue_title>[plan] Audit command documentation and help text</issue_title>
<issue_description>## Objective

Review all CLI command help text to ensure it is clear, comprehensive, and follows consistent formatting patterns.

Context

The gh-aw CLI has 16+ commands across different categories. Each command should have:

  • Clear short description
  • Comprehensive long description with context
  • Usage examples
  • Flag documentation
  • Cross-references to related commands

Commands to Review

Setup Commands:

  • init - Repository initialization
  • new - Create new workflow
  • add - Add workflow from template
  • remove - Remove workflow files
  • update - Update workflow configuration
  • secrets - Manage secrets

Development Commands:

  • compile - Compile workflows to YAML
  • mcp - MCP server management
  • status - Show workflow status
  • mcp-server - MCP server operations
  • fix - Apply codemods

Execution Commands:

  • run - Execute workflows
  • enable - Enable workflows
  • disable - Disable workflows
  • trial - Trial mode execution

Analysis Commands:

  • logs - View execution logs
  • audit - Debug workflow runs
  • campaign - Campaign analysis

Utilities:

  • pr - PR operations
  • version - Show version

Approach

  1. Review each command's help text in cmd/gh-aw/main.go and pkg/cli/*_command.go
  2. Check for:
    • Clear, concise short descriptions
    • Comprehensive long descriptions with context
    • At least 3 usage examples per command
    • Consistent formatting (see existing patterns)
    • Proper use of WorkflowIDExplanation constant where applicable
  3. Compare against best practices from popular CLIs (gh, git, docker)
  4. Update help text to match quality standards

Files to Review

  • cmd/gh-aw/main.go - Root command and inline commands (new, remove, enable, disable, run, version)
  • pkg/cli/init_command.go
  • pkg/cli/add_command.go
  • pkg/cli/update_command.go
  • pkg/cli/compile_command.go
  • pkg/cli/status_command.go
  • pkg/cli/logs_command.go
  • pkg/cli/trial_command.go
  • pkg/cli/secrets_command.go
  • pkg/cli/fix_command.go
  • And others in pkg/cli/

Acceptance Criteria

  • All commands have clear, concise short descriptions (under 80 chars)
  • All commands have comprehensive long descriptions with context
  • Each command has at least 3 practical usage examples
  • Help text follows consistent formatting patterns
  • WorkflowIDExplanation is used consistently where workflows are referenced
  • Commands cross-reference related commands where helpful
  • Help text tested manually with gh aw [command] --help
    Related to [plan] Review and document existing CLI commands #8492

AI generated by Plan Command for discussion #8482

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

- Add third example to remove command with --keep-orphans flag
- Enhance secrets command with subcommand descriptions and examples
- Improve mcp command with subcommand listing and practical examples
- Enhance pr command with use case context and examples
- Improve campaign command with subcommand descriptions and examples

All commands now have at least 3 examples and comprehensive context
explaining their purpose and usage patterns.

Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Copilot AI changed the title [WIP] Audit command documentation and help text Enhance CLI help text with examples and subcommand context Jan 1, 2026
Copilot AI requested a review from mnkiefer January 1, 2026 22:08
@pelikhan pelikhan marked this pull request as ready for review January 1, 2026 22:11
@pelikhan pelikhan merged commit 72b476f into main Jan 1, 2026
170 checks passed
@pelikhan pelikhan deleted the copilot/audit-cli-command-docs branch January 1, 2026 22:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[plan] Audit command documentation and help text

3 participants