Repository navigation
Add service-token duplicate command - #1525
Merged
Merged
Conversation
Co-authored-by: Mike Coutermarsh <[email protected]>
Contributor
There was a problem hiding this comment.
Risk: medium. Approved. Cursor Bugbot completed with no findings that need human review; Cursor Security Agent was not running on this PR. The change is a bounded CLI wrapper around the existing service-token duplicate API, with a command test covering the request and secret output.
Sent by Cursor Approval Agent: cli-reviewer
nickvanw
approved these changes
Nov 14, 2026
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.


Add
pscale service-token duplicate <id> --name <name>, which copies a service token and prints the new id and secret the same wayservice-token createdoes.Decisions, testing, and risks
POST /v1/organizations/:organization/service-tokens/:id/duplicatewith body{"name":"<name>"}. The response is printed with the same secret formatter asservice-token create.--nameis required.--orgstays the existing required persistent flag onservice-token. No other flags.TestServiceToken_DuplicateCmdininternal/cmd/token/create_test.gorunsservice-token duplicate, checks the duplicate request (method, path, bearer auth, name body), and checks the printed id and secret.