feat: add one shot commands to the coder ssh command (#17779)

Closes #2154

> [!WARNING]  
> The tests in this PR were co-authored by AI
This commit is contained in:
brettkolodny
2025-05-16 10:09:46 -04:00
committed by GitHub
parent cb0f778baf
commit 2cd3f999a6
7 changed files with 195 additions and 41 deletions
+1 -1
View File
@@ -46,7 +46,7 @@ SUBCOMMANDS:
show Display details of a workspace's resources and agents
speedtest Run upload and download tests from your machine to a
workspace
ssh Start a shell into a workspace
ssh Start a shell into a workspace or run a command
start Start a workspace
stat Show resource usage for the current workspace.
state Manually manage Terraform state to fix broken workspaces
+7 -2
View File
@@ -1,13 +1,18 @@
coder v0.0.0-devel
USAGE:
coder ssh [flags] <workspace>
coder ssh [flags] <workspace> [command]
Start a shell into a workspace
Start a shell into a workspace or run a command
This command does not have full parity with the standard SSH command. For
users who need the full functionality of SSH, create an ssh configuration with
`coder config-ssh`.
- Use `--` to separate and pass flags directly to the command executed via
SSH.:
$ coder ssh <workspace> -- ls -la
OPTIONS:
--disable-autostart bool, $CODER_SSH_DISABLE_AUTOSTART (default: false)