Skip to content

feat(cli): add coder open vscode #11191

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

Merged
merged 18 commits into from
Jan 2, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
gen
  • Loading branch information
mafredri committed Jan 2, 2024
commit 0d647bdc06867cae60ee924a97564c45acc92dcd
1 change: 1 addition & 0 deletions cli/testdata/coder_--help.golden
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ SUBCOMMANDS:
login Authenticate with Coder deployment
logout Unauthenticate your local session
netcheck Print network debug information for DERP and STUN
open Open a workspace
ping Ping a workspace
port-forward Forward ports from a workspace to the local machine. For
reverse port forwarding, use "coder ssh -R".
Expand Down
12 changes: 12 additions & 0 deletions cli/testdata/coder_open_--help.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
coder v0.0.0-devel

USAGE:
coder open

Open a workspace

SUBCOMMANDS:
vscode Open a workspace in VS Code Desktop

———
Run `coder --help` for a list of global options.
16 changes: 16 additions & 0 deletions cli/testdata/coder_open_vscode_--help.golden
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
coder v0.0.0-devel

USAGE:
coder open vscode [flags] <workspace> [<directory in workspace>]

Open a workspace in VS Code Desktop

OPTIONS:
--generate-token bool, $CODER_OPEN_VSCODE_GENERATE_TOKEN
Generate an auth token and include it in the vscode:// URI. This is
for automagical configuration of VS Code Desktop and not needed if
already configured. This flag does not need to be specified when
running this command on a local machine unless automatic open fails.

———
Run `coder --help` for a list of global options.
1 change: 1 addition & 0 deletions docs/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
| [<code>login</code>](./cli/login.md) | Authenticate with Coder deployment |
| [<code>logout</code>](./cli/logout.md) | Unauthenticate your local session |
| [<code>netcheck</code>](./cli/netcheck.md) | Print network debug information for DERP and STUN |
| [<code>open</code>](./cli/open.md) | Open a workspace |
| [<code>ping</code>](./cli/ping.md) | Ping a workspace |
| [<code>port-forward</code>](./cli/port-forward.md) | Forward ports from a workspace to the local machine. For reverse port forwarding, use "coder ssh -R". |
| [<code>provisionerd</code>](./cli/provisionerd.md) | Manage provisioner daemons |
Expand Down
17 changes: 17 additions & 0 deletions docs/cli/open.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions docs/cli/open_vscode.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions docs/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -705,6 +705,16 @@
"description": "Print network debug information for DERP and STUN",
"path": "cli/netcheck.md"
},
{
"title": "open",
"description": "Open a workspace",
"path": "cli/open.md"
},
{
"title": "open vscode",
"description": "Open a workspace in VS Code Desktop",
"path": "cli/open_vscode.md"
},
{
"title": "ping",
"description": "Ping a workspace",
Expand Down