Skip to content

Conversation

@jasonwbarnett
Copy link

Summary

Closes #21245

Add two new flags to the coder create command to support non-interactive automation scenarios like GitHub Actions.

Changes

--no-wait flag

Returns immediately after triggering workspace creation. The workspace build continues in the background. This is consistent with the existing --no-wait flag on coder start.

--no-prompt flag

Disables all interactive prompts. The command will:

  • Use default values for parameters that have defaults
  • Fail with a clear error message if:
    • Workspace name is not provided
    • Template name is not provided
    • Required parameters without defaults are missing
    • Preset selection is needed but no default preset exists

Usage Examples

# Create workspace without waiting for build to complete
coder create my-workspace --template my-template -y --no-wait

# Create workspace non-interactively (fails if any prompting would be needed)
coder create my-workspace --template my-template --no-prompt -y

# Combine both for fully non-interactive, async creation (ideal for CI/CD)
coder create my-workspace --template my-template --no-prompt --no-wait -y

Test plan

  • Added unit tests for --no-wait flag
  • Added unit tests for --no-prompt flag with missing workspace name
  • Added unit tests for --no-prompt flag with missing template name
  • Added unit tests for --no-prompt flag success case
  • All existing tests pass

🤖 Generated with Claude Code

Add two new flags to the `coder create` command:

1. `--no-wait`: Returns immediately after triggering workspace creation,
   without waiting for the build to complete. The workspace build will
   continue in the background.

2. `--no-prompt`: Disables all interactive prompts. Parameters with
   default values will use those defaults. Required parameters without
   defaults, missing workspace name, or missing template name will cause
   the command to fail with an appropriate error message.

These flags enable non-interactive automation scenarios where the CLI
should fail fast if any required input is missing, rather than hanging
while waiting for user input.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@cdr-bot cdr-bot bot added the community Pull Requests and issues created by the community. label Dec 12, 2025
@github-actions
Copy link


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


Jason Barnett seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

community Pull Requests and issues created by the community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(cli): add --no-wait and --no-prompt flags to coder create command

1 participant