Skip to content

coder update: Add --yes flag to skip interactive prompts #21441

@jovermier

Description

@jovermier

Summary

When updating a workspace with coder update, there's no way to skip interactive prompts even when not using --always-prompt. This makes it difficult to automate workspace updates in scripts or CI/CD pipelines.

Expected Behavior

The coder update command should have a --yes or --auto-approve flag (similar to coder start --yes) that:

  • Accepts default values for all parameters
  • Skips interactive prompts like IDE selection
  • Allows non-interactive workspace updates

Actual Behavior

The coder update command always prompts for parameter values even when --always-prompt is not specified. The --yes flag exists for coder start but not for coder update.

Use Case

This is needed for:

  • Automating workspace updates in scripts
  • CI/CD pipelines that need to update workspaces
  • Consistent deployments across environments

Workaround

Currently the only way to skip prompts is to pipe input:

echo "y" | coder update workspace-name

But this doesn't work for multi-step prompts (like IDE selection where you need to select options and then confirm).

Suggested Solution

Add a --yes flag to coder update that:

  1. Uses default values for all parameters
  2. Skips IDE selection prompt (uses default IDE set in template)
  3. Behaves consistently with coder start --yes

Alternatively, document the proper way to non-interactively update a workspace with parameter values.

Environment

  • Coder CLI version: 2.13.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions