feat(cli): add --no-wait flag to coder create (#22867)

Adds a `--no-wait` flag (CODER_CREATE_NO_WAIT) to the create command,
matching the existing pattern in `coder start`. When set, the `coder
create` command returns immediately after the workspace creation API
call succeeds instead of streaming build logs until completion.

This enables fire-and-forget workspace creation in CI/automation
contexts (e.g., GitHub Actions), where waiting for the build to finish
is unnecessary. Combined with other existing flags, users can create a
workspace with no interactivity, assuming the user is already
authenticated.
This commit is contained in:
Zach
2026-03-16 11:54:30 -06:00
committed by GitHub
parent abf59ee7a6
commit 3f76f312e4
6 changed files with 116 additions and 0 deletions
+9
View File
@@ -92,6 +92,15 @@ Specify the source workspace name to copy parameters from.
Automatically accept parameter defaults when no value is provided.
### --no-wait
| | |
|-------------|------------------------------------|
| Type | <code>bool</code> |
| Environment | <code>$CODER_CREATE_NO_WAIT</code> |
Return immediately after creating the workspace. The build will run in the background.
### -y, --yes
| | |
+9
View File
@@ -92,6 +92,15 @@ Specify the source workspace name to copy parameters from.
Automatically accept parameter defaults when no value is provided.
### --no-wait
| | |
|-------------|------------------------------------|
| Type | <code>bool</code> |
| Environment | <code>$CODER_CREATE_NO_WAIT</code> |
Return immediately after creating the workspace. The build will run in the background.
### -y, --yes
| | |