Skip to content

Comments

fix: make CLI flag values case-insensitive#413

Open
notgitika wants to merge 1 commit intoaws:mainfrom
notgitika:fix/case-insensitive-flags
Open

fix: make CLI flag values case-insensitive#413
notgitika wants to merge 1 commit intoaws:mainfrom
notgitika:fix/case-insensitive-flags

Conversation

@notgitika
Copy link
Contributor

Description

CLI flag values like --framework strands fail because Zod enum validation is case-sensitive. This adds a matchEnumValue() utility that case-insensitively maps user input to the canonical enum value before validation, so strands, Strands, and STRANDS all work.

Normalization is applied to --framework, --language, --model-provider, and --build in both agentcore create and agentcore add agent/add mcp-tool commands.

Related Issue

Closes #261

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

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.

@notgitika notgitika requested a review from a team February 23, 2026 22:39
@github-actions github-actions bot added the size/s PR size: S label Feb 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/s PR size: S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CLI flag values should be case-insensitive

1 participant