Skip to content

Change --engine short flag from -a to -e across all commands#3759

Merged
pelikhan merged 2 commits into
mainfrom
copilot/fix-cli-engine-flag-naming
Nov 12, 2025
Merged

Change --engine short flag from -a to -e across all commands#3759
pelikhan merged 2 commits into
mainfrom
copilot/fix-cli-engine-flag-naming

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 12, 2025

The --engine flag used the non-intuitive short form -a across compile, run, add, update, and trial commands. Additionally, descriptions were inconsistent—some included "custom" engine option, others omitted it.

Changes

  • Changed short flag from -a to -e in all 5 commands (compile, run, add, update, trial)
  • Standardized description to "Override AI engine (claude, codex, copilot, custom)" across all commands

Breaking Change

Users currently using -a will get:

Error: unknown shorthand flag: 'a' in -a

Migration: Use -e or long form --engine instead.

Files Modified

  • cmd/gh-aw/main.go - compile, run commands
  • pkg/cli/add_command.go - add command
  • pkg/cli/update_command.go - update command
  • pkg/cli/trial_command.go - trial command
Original prompt

This section details on the original issue you should resolve

<issue_title>[cli-consistency] Inconsistent and non-intuitive short flag for --engine</issue_title>
<issue_description>## Issue Description

Commands: Multiple commands
Type: Inconsistent flag naming pattern
Priority: Low

Current Situation

The CLI uses inconsistent naming for the engine override flag across different commands:

Commands with -a, --engine flag:

  1. compile command (main.go, line 334):

    compileCmd.Flags().StringP("engine", "a", "", "Override AI engine (claude, codex, copilot)")
  2. run command (main.go, line 356):

    runCmd.Flags().StringP("engine", "a", "", "Override AI engine (claude, codex, copilot, custom)")
  3. add command (pkg/cli/add_command.go, line 102):

    cmd.Flags().StringP("engine", "a", "", "Override AI engine (claude, codex, copilot, custom)")
  4. update command (pkg/cli/update_command.go, line 62):

    cmd.Flags().StringP("engine", "a", "", "Override AI engine (claude, codex, copilot)")
  5. trial command (source code review shows it has --engine flag)

Issue

The short flag -a for --engine is non-standard and potentially confusing:

  • The letter 'a' doesn't obviously relate to "engine" or "AI"
  • Most CLI tools use -e for engine-related flags
  • The letter 'a' might be confusing as it could stand for many things

Additionally, some commands say "claude, codex, copilot" while others add "custom" at the end, creating inconsistency in the flag descriptions.

Suggested Fix

Option 1: Change the short flag from -a to -e for "engine":

.StringP("engine", "e", "", "Override AI engine ...")

Option 2: Keep -a but standardize the description text across all commands to be identical.

Note: Changing from -a to -e would be a breaking change for existing users, so it may need deprecation handling or should be documented as a known quirk.

Affected Commands

  • compile
  • run
  • add
  • update
  • trial

AI generated by CLI Consistency Checker</issue_description>

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


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Change short flag from -a to -e in compile, run, add, update, and trial commands
- Standardize description to "Override AI engine (claude, codex, copilot, custom)" across all commands
- The -e flag is more intuitive as it relates to "engine"
- This is a breaking change for users using the -a flag

Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix inconsistent short flag for CLI engine override Change --engine short flag from -a to -e across all commands Nov 12, 2025
Copilot AI requested a review from pelikhan November 12, 2025 19:28
@pelikhan pelikhan marked this pull request as ready for review November 12, 2025 21:57
Copilot AI review requested due to automatic review settings November 12, 2025 21:57
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR standardizes the --engine flag across all CLI commands by changing its short form from the non-intuitive -a to the more logical -e, and ensures consistent description text across all commands.

Key Changes

  • Changed short flag from -a to -e for the --engine flag in 5 commands (compile, run, add, update, trial)
  • Standardized flag description to "Override AI engine (claude, codex, copilot, custom)" across all commands
  • This is a breaking change requiring users to migrate from -a to -e or use the long form --engine

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
cmd/gh-aw/main.go Updated --engine short flag from -a to -e for both compile and run commands; standardized descriptions to include "custom" option
pkg/cli/add_command.go Updated --engine short flag from -a to -e in add command
pkg/cli/update_command.go Updated --engine short flag from -a to -e and added "custom" to description in update command
pkg/cli/trial_command.go Updated --engine short flag from -a to -e in trial command

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@pelikhan pelikhan merged commit 8c270ad into main Nov 12, 2025
83 of 87 checks passed
@pelikhan pelikhan deleted the copilot/fix-cli-engine-flag-naming branch November 12, 2025 22:00
github-actions Bot added a commit that referenced this pull request Nov 13, 2025
- Add --json flag documentation to compile command for machine-readable validation output (PR #3799)
- Update --engine flag to show new -e short form (changed from -a in PR #3759)
- Add example usage of --json flag with compile command

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
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.

[cli-consistency] Inconsistent and non-intuitive short flag for --engine

3 participants