diff --git a/cli/netcheck.go b/cli/netcheck.go index 4215c4dbf09b1..bd52a2c87f718 100644 --- a/cli/netcheck.go +++ b/cli/netcheck.go @@ -17,9 +17,8 @@ func (r *RootCmd) netcheck() *clibase.Cmd { client := new(codersdk.Client) cmd := &clibase.Cmd{ - Use: "netcheck", - Short: "Print network debug information for DERP and STUN", - Hidden: true, + Use: "netcheck", + Short: "Print network debug information for DERP and STUN", Middleware: clibase.Chain( r.InitClient(client), ), diff --git a/cli/root.go b/cli/root.go index 09cfb2b5342a0..c5843f97f5337 100644 --- a/cli/root.go +++ b/cli/root.go @@ -79,13 +79,14 @@ func (r *RootCmd) Core() []*clibase.Cmd { r.dotfiles(), r.login(), r.logout(), + r.netcheck(), r.portForward(), r.publickey(), r.resetPassword(), r.state(), r.templates(), - r.users(), r.tokens(), + r.users(), r.version(defaultVersionInfo), // Workspace Commands @@ -107,7 +108,6 @@ func (r *RootCmd) Core() []*clibase.Cmd { // Hidden r.gitssh(), - r.netcheck(), r.vscodeSSH(), r.workspaceAgent(), r.expCmd(), diff --git a/cli/testdata/coder_--help.golden b/cli/testdata/coder_--help.golden index 280dbce4ab6c5..7ef7d52f0b746 100644 --- a/cli/testdata/coder_--help.golden +++ b/cli/testdata/coder_--help.golden @@ -19,6 +19,7 @@ Coder v0.0.0-devel — A tool for provisioning self-hosted development environme list List workspaces login Authenticate with Coder deployment logout Unauthenticate your local session + netcheck Print network debug information for DERP and STUN ping Ping a workspace port-forward Forward ports from machine to a workspace publickey Output your Coder public key used for Git operations diff --git a/cli/testdata/coder_netcheck_--help.golden b/cli/testdata/coder_netcheck_--help.golden new file mode 100644 index 0000000000000..c502f6b8da90b --- /dev/null +++ b/cli/testdata/coder_netcheck_--help.golden @@ -0,0 +1,6 @@ +Usage: coder netcheck + +Print network debug information for DERP and STUN + +--- +Run `coder --help` for a list of global options. diff --git a/docs/cli.md b/docs/cli.md index 847017841d67f..26e57b23455ad 100644 --- a/docs/cli.md +++ b/docs/cli.md @@ -35,6 +35,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr | [list](./cli/list.md) | List workspaces | | [login](./cli/login.md) | Authenticate with Coder deployment | | [logout](./cli/logout.md) | Unauthenticate your local session | +| [netcheck](./cli/netcheck.md) | Print network debug information for DERP and STUN | | [ping](./cli/ping.md) | Ping a workspace | | [port-forward](./cli/port-forward.md) | Forward ports from machine to a workspace | | [provisionerd](./cli/provisionerd.md) | Manage provisioner daemons | diff --git a/docs/cli/netcheck.md b/docs/cli/netcheck.md new file mode 100644 index 0000000000000..0d70bc3a76642 --- /dev/null +++ b/docs/cli/netcheck.md @@ -0,0 +1,11 @@ + + +# netcheck + +Print network debug information for DERP and STUN + +## Usage + +```console +coder netcheck +``` diff --git a/docs/manifest.json b/docs/manifest.json index 2299e59b39ab8..8170f77d286ff 100644 --- a/docs/manifest.json +++ b/docs/manifest.json @@ -592,6 +592,11 @@ "description": "Unauthenticate your local session", "path": "cli/logout.md" }, + { + "title": "netcheck", + "description": "Print network debug information for DERP and STUN", + "path": "cli/netcheck.md" + }, { "title": "ping", "description": "Ping a workspace",