buildbuddy-io / buildbuddy

BuildBuddy is an open source Bazel build event viewer, result store, remote cache, and remote build execution platform.

Home Page:https://buildbuddy.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[CLI] `bb login` should say it's going to open a webpage before doing so

brentleyjones opened this issue · comments

Is your feature request related to a problem? Please describe.

Currently bb login immediately opens a web page. This is jarring. gh auth login waits for the user to press Enter before opening the webpage:

$ gh auth login
? What account do you want to log into? GitHub.com
? What is your preferred protocol for Git operations on this host? SSH
? Upload your SSH public key to your GitHub account? /Users/brentley.jones/.ssh/id_ed25519.pub
? Title for your SSH key: GitHub CLI
? How would you like to authenticate GitHub CLI? Login with a web browser

! First copy your one-time code: XXXX-XXXX
Press Enter to open github.com in your browser...

Describe the solution you'd like

Something this this output:

$ bb login
We need your personal API key. Please log in to https://app.buildbuddy.io/settings/cli-login and copy your API key, creating one if needed.
Press Enter to open https://app.buildbuddy.io/settings/cli-login in your browser...

I think letting the user know and trigger the open with Enter makes a lot of sense. It's a great UX improvement and makes the CLI more predictable.

I am adding initial support for it in #6472. I will add the full message in a different PR so that folks could comment on the exact content to be displayed.

Great suggestion!

Closing since Son fixed this with #6472