Skip to content

fix(cli): correct inaccurate --help text across all commands#695

Merged
notgitika merged 3 commits intoaws:mainfrom
aidandaly24:fix/help-text-audit
Mar 27, 2026
Merged

fix(cli): correct inaccurate --help text across all commands#695
notgitika merged 3 commits intoaws:mainfrom
aidandaly24:fix/help-text-audit

Conversation

@aidandaly24
Copy link
Copy Markdown
Contributor

@aidandaly24 aidandaly24 commented Mar 27, 2026

Description

Comprehensive audit and fix of --help text across all CLI commands and primitives. Every --help output was compared against source code (Zod schemas, Commander registrations, TUI option arrays) and corrected where inaccurate.

Fixes include:

  • Agent name constraints: "max 64 chars" → "max 48 chars", added "underscores" to allowed characters (schema enforces ^[a-zA-Z][a-zA-Z0-9_]{0,47}$)
  • Project name constraint: "max 36 chars" → "max 23 chars" (schema enforces .max(23))
  • Removed CrewAI from all framework lists (code exists but is not user-accessible)
  • Fixed "Remove a agent" → "Remove an agent" grammar via article override
  • Added missing resource types (evaluator, online-eval) to status --type filter
  • Removed phantom edit command from COMMAND_DESCRIPTIONS
  • Removed false --agent-arn claim from evals description
  • Added [non-interactive] markers to ~53 options missing them across EvaluatorPrimitive, GatewayPrimitive, GatewayTargetPrimitive, and PolicyEnginePrimitive
  • Improved gateway and gateway-target help descriptions for clarity (better top-level descriptions, "(for X type)" labels, logical option ordering)
  • Added [non-interactive] markers to new upstream options: dev --tool/--input/-H, invoke -H, fetch access --name/--type/--target/--json
  • Added missing import command to COMMAND_DESCRIPTIONS in copy.ts
  • Updated AGENTS.md to match current CLI reality

Related Issue

N/A — discovered via systematic help text audit

Documentation PR

N/A

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update
  • Other (please describe):

Testing

How have you tested the change?

  • I ran npm run test:unit and npm run test:integ
  • I ran npm run typecheck
  • I ran npm run lint
  • If I modified src/assets/, I ran npm run test:update-snapshots and committed the updated snapshots

All 3073 unit tests pass (rebased on latest upstream/main). The only failures are 2 pre-existing PTY environment issues in tui-harness/proof-of-concept.test.ts (unrelated posix_spawnp error) and 1 flaky AddGatewayJwtConfig test (passes in isolation, unrelated to our changes).

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the
terms of your choice.

@aidandaly24 aidandaly24 requested a review from a team March 27, 2026 04:10
@github-actions github-actions bot added the size/m PR size: M label Mar 27, 2026
Audit and fix help text for all CLI commands and primitives:

- Fix agent name constraints: "max 64 chars" → "max 48 chars",
  add "underscores" to allowed characters
- Fix project name constraint: "max 36 chars" → "max 23 chars"
- Remove CrewAI from framework lists (not user-accessible)
- Fix "Remove a agent" → "Remove an agent" grammar
- Add missing resource types (evaluator, online-eval) to status --type
- Remove phantom 'edit' command from COMMAND_DESCRIPTIONS
- Remove false --agent-arn claim from evals description
- Add [non-interactive] markers to all options missing them in
  EvaluatorPrimitive, GatewayPrimitive, GatewayTargetPrimitive,
  and PolicyEnginePrimitive
- Improve gateway and gateway-target help descriptions for clarity
- Update AGENTS.md to match current CLI reality

Constraint: Help text and Zod schemas are defined in separate files with no shared constant
Confidence: high
Scope-risk: narrow
Not-tested: Interactive TUI mode (only CLI --help verified)
Fix help text for options added in upstream PRs aws#652, aws#653, aws#657, aws#620:

- dev: add [non-interactive] to --tool, --input, -H/--header
- invoke: add [non-interactive] to -H/--header
- fetch access: add [non-interactive] to --name, --type, --target, --json
- copy.ts: add missing 'import' command description

Confidence: high
Scope-risk: narrow
@aidandaly24 aidandaly24 force-pushed the fix/help-text-audit branch from ee402d7 to 58b0886 Compare March 27, 2026 04:41
@github-actions github-actions bot added size/m PR size: M and removed size/m PR size: M labels Mar 27, 2026
notgitika
notgitika previously approved these changes Mar 27, 2026
Copy link
Copy Markdown
Contributor

@notgitika notgitika left a comment

Choose a reason for hiding this comment

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

Left a comment. This PR looks good, thanks for cleaning it up.
If you can address this comment in this PR itself, it would be awesome adn we could close the issue out. Or could be a fast-follow

- Add Global Options section documenting -h/--help and --version
- Add missing 'import' command to CLI Commands list
- Update 'fetch access' description to include agent support

Confidence: high
Scope-risk: narrow
Copy link
Copy Markdown
Contributor

@notgitika notgitika left a comment

Choose a reason for hiding this comment

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

LGTM

@notgitika notgitika merged commit 9783cf7 into aws:main Mar 27, 2026
17 of 19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/m PR size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants