Skip to content

Add auth select command to replace use#675

Merged
mcncl merged 4 commits intomainfrom
SUP-6291/auth_select
Mar 3, 2026
Merged

Add auth select command to replace use#675
mcncl merged 4 commits intomainfrom
SUP-6291/auth_select

Conversation

@mcncl
Copy link
Contributor

@mcncl mcncl commented Mar 2, 2026

Description

As we migrate to a cleaner bk <thing> <action> format we should consider that the use command doesn't follow this.

Changes

  • adds a select subcommand to the auth command family
    • use is bk auth select
  • adds testing for using the new command
  • continues support for bk auth select [org-slug]
  • aliases bk auth select to bk auth use to maintain a similar command
  • "hides" use from the root so that --help don't output it as an option

Testing

  • Tests have run locally (with go test ./...)
  • Code is formatted (with go fmt ./...)

We're looking to moving towards a clearer, more familiar approach to using the CLI, via `bk <thing> <action>`. Currently `bk use` doesn't follow that convention and could be under our `auth` command via a clearer `auth select`.
@mcncl mcncl requested a review from a team as a code owner March 2, 2026 23:50
mcncl added 2 commits March 3, 2026 10:50
Folks might want to continue to use `use` for switching, so making that an option
We don't need this test file as it's implemented in `switch_test.go`
@mcncl mcncl force-pushed the SUP-6291/auth_select branch from a41a30e to f65e15c Compare March 2, 2026 23:51
@scadu
Copy link
Contributor

scadu commented Mar 3, 2026

Guess I better wait with marking #678 as ready for review as I got bk use wired up to use the Keychain flow.

@mcncl
Copy link
Contributor Author

mcncl commented Mar 3, 2026

@scadu the use command will still work, it's just hidden

@mcncl mcncl merged commit 563c940 into main Mar 3, 2026
1 check passed
@mcncl mcncl deleted the SUP-6291/auth_select branch March 3, 2026 10:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants