Sitelet https://web.archive.org/web/20220320195154/https://github.com/cli/cli/issues/4985
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create functionality to allow this command gh cs open to open the codespace in the browser. #4985

Open
startakovsky opened this issue Jan 3, 2022 · 5 comments

Comments

@startakovsky
Copy link

@startakovsky startakovsky commented Jan 3, 2022

It would be consistent with codespaces and the github CLI at large to add a command to the gh cs that allows the end user to open the codespace environment in the browser, such as open ==> gh cs open.

It would be just like gh cs code where it shows a dropdown of the choices of codespaces, and then instead of opening vs-code it would open up the OS's default browser which, if it's authenticated with github.com will proceed to the primary value proposition of Code Spaces: allow the end-users to easily embark on a cloud development experience without the hassle of clicking around github.com, in the comfort of their terminal.

@startakovsky startakovsky changed the title gh cs open should open the codespace in the browser. Create functionality to allow this command gh cs open to open the codespace in the browser. Jan 3, 2022
@mislav
Copy link
Member

@mislav mislav commented Jan 6, 2022

Thanks for the suggestion!

We already have the gh cs code command to open VS Code app on your computer. I understand that you are proposing to open the VS Code environment in one's web browser, correct? Would this feature then better be expressed as a flag for the existing code command, e.g. gh cs code --web?

@startakovsky
Copy link
Author

@startakovsky startakovsky commented Jan 8, 2022 •

Yeah . . . gh codespace code or gh codespace code --web captures it.

As an alternative. . . I went back and took a screenshot of the language when clicking on a codespace in the browser and it seems they use the verbiage open in vs-code, which kind of implies that what's happening in this screenshot is that we're opening the codespaces in the browser. So . . . one idea to consider is to remove gh cs code entirely and have gh cs open and gh cs open --web.

Whatever your team chooses I am stoked and flattered that you actually replied to my suggestion!! Thanks!

image

@mislav
Copy link
Member

@mislav mislav commented Jan 14, 2022

If someone wants to add a gh cs code --web flag with the described behavior, be our guest please! 👍

codeCmd.Flags().StringVarP(&codespace, "codespace", "c", "", "Name of the codespace")
codeCmd.Flags().BoolVar(&useInsiders, "insiders", false, "Use the insiders version of Visual Studio Code")

@isenkasa
Copy link

@isenkasa isenkasa commented Jan 17, 2022

I would like to attempt to add this feature. Can I be assigned to this issue?

@mislav
Copy link
Member

@mislav mislav commented Jan 17, 2022

@isenkasa Sure thing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants