# create

Create a workspace

## Usage [#usage]

```console
coder create [flags] [workspace]
```

## Description [#description]

```console
  - Create a workspace for another user (if you have permission):

     $ coder create <username>/<workspace_name>
```

## Options [#options]

### -t, --template [#-t---template]

|             |                                     |
| ----------- | ----------------------------------- |
| Type        | <code>string</code>                 |
| Environment | <code>$CODER\_TEMPLATE\_NAME</code> |

Specify a template name.

### --template-version [#--template-version]

|             |                                        |
| ----------- | -------------------------------------- |
| Type        | <code>string</code>                    |
| Environment | <code>$CODER\_TEMPLATE\_VERSION</code> |

Specify a template version name.

### --preset [#--preset]

|             |                                   |
| ----------- | --------------------------------- |
| Type        | <code>string</code>               |
| Environment | <code>$CODER\_PRESET\_NAME</code> |

Specify the name of a template version preset. Use 'none' to explicitly indicate that no preset should be used.

### --start-at [#--start-at]

|             |                                           |
| ----------- | ----------------------------------------- |
| Type        | <code>string</code>                       |
| Environment | <code>$CODER\_WORKSPACE\_START\_AT</code> |

Specify the workspace autostart schedule. Check coder schedule start --help for the syntax.

### --stop-after [#--stop-after]

|             |                                             |
| ----------- | ------------------------------------------- |
| Type        | <code>duration</code>                       |
| Environment | <code>$CODER\_WORKSPACE\_STOP\_AFTER</code> |

Specify a duration after which the workspace should shut down (e.g. 8h).

### --automatic-updates [#--automatic-updates]

|             |                                                    |
| ----------- | -------------------------------------------------- |
| Type        | <code>string</code>                                |
| Environment | <code>$CODER\_WORKSPACE\_AUTOMATIC\_UPDATES</code> |
| Default     | <code>never</code>                                 |

Specify automatic updates setting for the workspace (accepts 'always' or 'never').

### --copy-parameters-from [#--copy-parameters-from]

|             |                                                        |
| ----------- | ------------------------------------------------------ |
| Type        | <code>string</code>                                    |
| Environment | <code>$CODER\_WORKSPACE\_COPY\_PARAMETERS\_FROM</code> |

Specify the source workspace name to copy parameters from.

### --no-wait [#--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 [#-y---yes]

|      |                   |
| ---- | ----------------- |
| Type | <code>bool</code> |

Bypass confirmation prompts.

### --build-option [#--build-option]

|             |                                    |
| ----------- | ---------------------------------- |
| Type        | <code>string-array</code>          |
| Environment | <code>$CODER\_BUILD\_OPTION</code> |

Build option value in the format "name=value".

### --build-options [#--build-options]

|      |                   |
| ---- | ----------------- |
| Type | <code>bool</code> |

Prompt for one-time build options defined with ephemeral parameters.

### --ephemeral-parameter [#--ephemeral-parameter]

|             |                                           |
| ----------- | ----------------------------------------- |
| Type        | <code>string-array</code>                 |
| Environment | <code>$CODER\_EPHEMERAL\_PARAMETER</code> |

Set the value of ephemeral parameters defined in the template. The format is "name=value".

### --prompt-ephemeral-parameters [#--prompt-ephemeral-parameters]

|             |                                                    |
| ----------- | -------------------------------------------------- |
| Type        | <code>bool</code>                                  |
| Environment | <code>$CODER\_PROMPT\_EPHEMERAL\_PARAMETERS</code> |

Prompt to set values of ephemeral parameters defined in the template. If a value has been set via --ephemeral-parameter, it will not be prompted for.

### --parameter [#--parameter]

|             |                                      |
| ----------- | ------------------------------------ |
| Type        | <code>string-array</code>            |
| Environment | <code>$CODER\_RICH\_PARAMETER</code> |

Rich parameter value in the format "name=value".

### --rich-parameter-file [#--rich-parameter-file]

|             |                                            |
| ----------- | ------------------------------------------ |
| Type        | <code>string</code>                        |
| Environment | <code>$CODER\_RICH\_PARAMETER\_FILE</code> |

Specify a file path with values for rich parameters defined in the template. The file should be in YAML format, containing key-value pairs for the parameters.

### --parameter-default [#--parameter-default]

|             |                                               |
| ----------- | --------------------------------------------- |
| Type        | <code>string-array</code>                     |
| Environment | <code>$CODER\_RICH\_PARAMETER\_DEFAULT</code> |

Rich parameter default values in the format "name=value".

### --use-parameter-defaults [#--use-parameter-defaults]

|             |                                                          |
| ----------- | -------------------------------------------------------- |
| Type        | <code>bool</code>                                        |
| Environment | <code>$CODER\_WORKSPACE\_USE\_PARAMETER\_DEFAULTS</code> |

Automatically accept parameter defaults when no value is provided.

### --always-prompt [#--always-prompt]

|      |                   |
| ---- | ----------------- |
| Type | <code>bool</code> |

Always prompt all parameters. Does not pull parameter values from existing workspace.

### -O, --org [#-o---org]

|             |                                   |
| ----------- | --------------------------------- |
| Type        | <code>string</code>               |
| Environment | <code>$CODER\_ORGANIZATION</code> |

Select which organization (uuid or name) to use.
