-
Notifications
You must be signed in to change notification settings - Fork 35
Description
Issue Description
Commands: Multiple commands (compile, add, update)
Type: Flag naming inconsistency
Priority: High
Current State
The codebase has inconsistent flag names for specifying the workflow directory:
compile command (cmd/gh-aw/main.go, lines 460-462):
compileCmd.Flags().String("dir", "", "Workflow directory (default: .github/workflows)")
compileCmd.Flags().String("workflows-dir", "", "Deprecated: use --dir instead")
_ = compileCmd.Flags().MarkDeprecated("workflows-dir", "use --dir instead")add command (pkg/cli/add_command.go, line 64):
workflowDir, _ := cmd.Flags().GetString("dir")update command (pkg/cli/update_command.go, line 70):
workflowDir, _ := cmd.Flags().GetString("dir")Issue
While the deprecation is properly handled in the compile command, the help text and documentation could be confusing to users who see both --dir and the deprecated --workflows-dir mentioned.
Additionally, the --dir flag description says "Workflow directory" but this is less descriptive than it could be. Users might expect it to work with any directory, but it's specifically for the workflows directory.
Suggested Fix
- Keep the current deprecation - The deprecation handling is correct
- Improve the --dir flag description for clarity:
compileCmd.Flags().String("dir", "", "Workflows directory (default: .github/workflows)")- Document the deprecation in the Long help text:
The --dir flag specifies the workflows directory (default: .github/workflows).
Note: --workflows-dir is deprecated, use --dir instead.
This makes the migration path clear while maintaining backward compatibility.
AI generated by CLI Consistency Checker