feat(tokens): add -o/--org flag to tokens create readonly#4875
Closed
asib wants to merge 1 commit intosuperfly:masterfrom
Closed
feat(tokens): add -o/--org flag to tokens create readonly#4875asib wants to merge 1 commit intosuperfly:masterfrom
tokens create readonly#4875asib wants to merge 1 commit intosuperfly:masterfrom
Conversation
Allows non-interactive use of `fly tokens create readonly`. The underlying org resolver already reads the flag value; it just wasn't registered on this subcommand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
4 tasks
Contributor
Author
|
Superseded by #4876 (re-opened from a branch in this repo so preflight CI has access to secrets). |
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
-o/--orgflag tofly tokens create readonlyso it can be used non-interactively (e.g. in CI).OrgFromEnvVarOrFirstArgOrSelect) already readsflag.GetOrg(ctx)and only falls back to the interactive picker when empty — the flag just wasn't registered on this subcommand. The siblingtokens create organdtokens create litefs-cloudalready register it.Before:
fly tokens create readonlyalways opened the org picker, so it couldn't be scripted (besides via theFLY_ORGenv var).After:
fly tokens create readonly -o my-orgworks.Test plan
fly tokens create readonly -o <slug>returns a token without promptingfly tokens create readonly(no flag, noFLY_ORG) still falls back to the interactive pickerFLY_ORG=<slug> fly tokens create readonlystill works (env-var path unchanged)fly tokens create readonly --helpshows-o, --orgin the flag list🤖 Generated with Claude Code