refactor(cli): unify naming for credentials, confirmation flags, and dry-run flags#702
Closed
jesseturner21 wants to merge 4 commits intomainfrom
Closed
refactor(cli): unify naming for credentials, confirmation flags, and dry-run flags#702jesseturner21 wants to merge 4 commits intomainfrom
jesseturner21 wants to merge 4 commits intomainfrom
Conversation
The CLI command was 'add identity', the config key was 'credentials', and the resource types were ApiKeyCredentialProvider / OAuthCredentialProvider. Three different names for the same concept. This unifies everything under 'credential' — CLI commands, resource type, labels, validation, and docs. The old 'identity' command name is preserved as a hidden alias for backward compatibility. Constraint: Must maintain backward compat for existing scripts using 'agentcore add identity' Rejected: Keep 'identity' as primary | 'credential' is already the config term and more precise Confidence: high Scope-risk: moderate
deploy uses -y, --yes while remove uses --force. These mean the same thing (skip interactive confirmation) but used different names. Now -y/--yes is the primary flag everywhere. --force is preserved as an alias on remove commands for backward compatibility. Constraint: Must not break existing scripts using --force on remove Rejected: Use --force everywhere | --yes is the conventional flag name for confirmation skip Confidence: high Scope-risk: narrow
deploy uses --plan while create and remove use --dry-run. Same concept, different names. Now --dry-run is the primary flag on deploy. --plan is preserved as an alias for backward compatibility. Output message updated from 'Plan complete' to 'Dry run complete'. Constraint: Must not break existing scripts using --plan on deploy Rejected: Use --plan everywhere | --dry-run is the standard convention Confidence: high Scope-risk: narrow
The article was 'an' for the old 'identity' label but 'credential' takes 'a'. This fixes help text like "Remove an credential" → "Remove a credential". Confidence: high Scope-risk: narrow
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
add identity→add credential, resource type, labels, validation, and docs. Oldidentitycommand preserved as hidden alias for backward compat.removecommands now use-y, --yes(matchingdeploy).--forcepreserved as alias for backward compat.deploynow uses--dry-runas primary flag (matchingcreateandremove all).--planpreserved as alias for backward compat.Each change is a separate commit for clean review.
Testing
npm test)npm run build)npm install <tarball>npx agentcore add --helpshowscredential(notidentity)npx agentcore deploy --helpshows--dry-runas primary,--planas aliasnpx agentcore remove --helpshows-y, --yesas primary,--forceas aliasnpx agentcore add identity --helpstill works (alias)npx agentcore remove agent --forcestill works (alias for --yes)npx agentcore deploy --planstill works (alias for --dry-run)Test plan
npm test— all 3076 tests passnpm run build— clean buildidentity,--force,--plan