mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
feat(cli): promote tasks commands from experimental to GA (#20916)
## Overview This change promotes the tasks CLI commands from `coder exp task` to `coder task`, marking them as generally available (GA). ## Migration Users will need to update their scripts from: ```shell coder exp task create "my task" ``` To: ```shell coder task create "my task" ``` --- 🤖 This change was written by Claude Sonnet 4.5 Thinking using [mux](https://github.com/coder/mux) and reviewed by a human 🏄🏻♂️
This commit is contained in:
Generated
+1
@@ -36,6 +36,7 @@ Coder — A tool for provisioning self-hosted development environments with Terr
|
||||
| [<code>publickey</code>](./publickey.md) | Output your Coder public key used for Git operations |
|
||||
| [<code>reset-password</code>](./reset-password.md) | Directly connect to the database to reset a user's password |
|
||||
| [<code>state</code>](./state.md) | Manually manage Terraform state to fix broken workspaces |
|
||||
| [<code>task</code>](./task.md) | Manage tasks |
|
||||
| [<code>templates</code>](./templates.md) | Manage templates |
|
||||
| [<code>tokens</code>](./tokens.md) | Manage personal access tokens |
|
||||
| [<code>users</code>](./users.md) | Manage users |
|
||||
|
||||
Generated
+25
@@ -0,0 +1,25 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task
|
||||
|
||||
Manage tasks
|
||||
|
||||
Aliases:
|
||||
|
||||
* tasks
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task
|
||||
```
|
||||
|
||||
## Subcommands
|
||||
|
||||
| Name | Purpose |
|
||||
|-----------------------------------------|----------------------------|
|
||||
| [<code>create</code>](./task_create.md) | Create a task |
|
||||
| [<code>delete</code>](./task_delete.md) | Delete tasks |
|
||||
| [<code>list</code>](./task_list.md) | List tasks |
|
||||
| [<code>logs</code>](./task_logs.md) | Show a task's logs |
|
||||
| [<code>send</code>](./task_send.md) | Send input to a task |
|
||||
| [<code>status</code>](./task_status.md) | Show the status of a task. |
|
||||
Generated
+100
@@ -0,0 +1,100 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task create
|
||||
|
||||
Create a task
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task create [flags] [input]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
- Create a task with direct input:
|
||||
|
||||
$ coder task create "Add authentication to the user service"
|
||||
|
||||
- Create a task with stdin input:
|
||||
|
||||
$ echo "Add authentication to the user service" | coder task create
|
||||
|
||||
- Create a task with a specific name:
|
||||
|
||||
$ coder task create --name task1 "Add authentication to the user service"
|
||||
|
||||
- Create a task from a specific template / preset:
|
||||
|
||||
$ coder task create --template backend-dev --preset "My Preset" "Add authentication to the user service"
|
||||
|
||||
- Create a task for another user (requires appropriate permissions):
|
||||
|
||||
$ coder task create --owner user@example.com "Add authentication to the user service"
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### --name
|
||||
|
||||
| | |
|
||||
|------|---------------------|
|
||||
| Type | <code>string</code> |
|
||||
|
||||
Specify the name of the task. If you do not specify one, a name will be generated for you.
|
||||
|
||||
### --owner
|
||||
|
||||
| | |
|
||||
|---------|---------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Default | <code>me</code> |
|
||||
|
||||
Specify the owner of the task. Defaults to the current user.
|
||||
|
||||
### --template
|
||||
|
||||
| | |
|
||||
|-------------|----------------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_TASK_TEMPLATE_NAME</code> |
|
||||
|
||||
### --template-version
|
||||
|
||||
| | |
|
||||
|-------------|-------------------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_TASK_TEMPLATE_VERSION</code> |
|
||||
|
||||
### --preset
|
||||
|
||||
| | |
|
||||
|-------------|--------------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_TASK_PRESET_NAME</code> |
|
||||
| Default | <code>none</code> |
|
||||
|
||||
### --stdin
|
||||
|
||||
| | |
|
||||
|------|-------------------|
|
||||
| Type | <code>bool</code> |
|
||||
|
||||
Reads from stdin for the task input.
|
||||
|
||||
### -q, --quiet
|
||||
|
||||
| | |
|
||||
|------|-------------------|
|
||||
| Type | <code>bool</code> |
|
||||
|
||||
Only display the created task's ID.
|
||||
|
||||
### -O, --org
|
||||
|
||||
| | |
|
||||
|-------------|----------------------------------|
|
||||
| Type | <code>string</code> |
|
||||
| Environment | <code>$CODER_ORGANIZATION</code> |
|
||||
|
||||
Select which organization (uuid or name) to use.
|
||||
Generated
+40
@@ -0,0 +1,40 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task delete
|
||||
|
||||
Delete tasks
|
||||
|
||||
Aliases:
|
||||
|
||||
* rm
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task delete [flags] <task> [<task> ...]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
- Delete a single task.:
|
||||
|
||||
$ $ coder task delete task1
|
||||
|
||||
- Delete multiple tasks.:
|
||||
|
||||
$ $ coder task delete task1 task2 task3
|
||||
|
||||
- Delete a task without confirmation.:
|
||||
|
||||
$ $ coder task delete task4 --yes
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### -y, --yes
|
||||
|
||||
| | |
|
||||
|------|-------------------|
|
||||
| Type | <code>bool</code> |
|
||||
|
||||
Bypass prompts.
|
||||
Generated
+92
@@ -0,0 +1,92 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task list
|
||||
|
||||
List tasks
|
||||
|
||||
Aliases:
|
||||
|
||||
* ls
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task list [flags]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
- List tasks for the current user.:
|
||||
|
||||
$ coder task list
|
||||
|
||||
- List tasks for a specific user.:
|
||||
|
||||
$ coder task list --user someone-else
|
||||
|
||||
- List all tasks you can view.:
|
||||
|
||||
$ coder task list --all
|
||||
|
||||
- List all your running tasks.:
|
||||
|
||||
$ coder task list --status running
|
||||
|
||||
- As above, but only show IDs.:
|
||||
|
||||
$ coder task list --status running --quiet
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### --status
|
||||
|
||||
| | |
|
||||
|------|--------------------------------------------------------------------|
|
||||
| Type | <code>pending\|initializing\|active\|paused\|error\|unknown</code> |
|
||||
|
||||
Filter by task status.
|
||||
|
||||
### -a, --all
|
||||
|
||||
| | |
|
||||
|---------|--------------------|
|
||||
| Type | <code>bool</code> |
|
||||
| Default | <code>false</code> |
|
||||
|
||||
List tasks for all users you can view.
|
||||
|
||||
### --user
|
||||
|
||||
| | |
|
||||
|------|---------------------|
|
||||
| Type | <code>string</code> |
|
||||
|
||||
List tasks for the specified user (username, "me").
|
||||
|
||||
### -q, --quiet
|
||||
|
||||
| | |
|
||||
|---------|--------------------|
|
||||
| Type | <code>bool</code> |
|
||||
| Default | <code>false</code> |
|
||||
|
||||
Only display task IDs.
|
||||
|
||||
### -c, --column
|
||||
|
||||
| | |
|
||||
|---------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Type | <code>[id\|organization id\|owner id\|owner name\|owner avatar url\|name\|display name\|template id\|template version id\|template name\|template display name\|template icon\|workspace id\|workspace name\|workspace status\|workspace build number\|workspace agent id\|workspace agent lifecycle\|workspace agent health\|workspace app id\|initial prompt\|status\|state\|message\|created at\|updated at\|state changed]</code> |
|
||||
| Default | <code>name,status,state,state changed,message</code> |
|
||||
|
||||
Columns to display in table output.
|
||||
|
||||
### -o, --output
|
||||
|
||||
| | |
|
||||
|---------|--------------------------|
|
||||
| Type | <code>table\|json</code> |
|
||||
| Default | <code>table</code> |
|
||||
|
||||
Output format.
|
||||
Generated
+38
@@ -0,0 +1,38 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task logs
|
||||
|
||||
Show a task's logs
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task logs [flags] <task>
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
- Show logs for a given task.:
|
||||
|
||||
$ coder task logs task1
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### -c, --column
|
||||
|
||||
| | |
|
||||
|---------|----------------------------------------|
|
||||
| Type | <code>[id\|content\|type\|time]</code> |
|
||||
| Default | <code>type,content</code> |
|
||||
|
||||
Columns to display in table output.
|
||||
|
||||
### -o, --output
|
||||
|
||||
| | |
|
||||
|---------|--------------------------|
|
||||
| Type | <code>table\|json</code> |
|
||||
| Default | <code>table</code> |
|
||||
|
||||
Output format.
|
||||
Generated
+32
@@ -0,0 +1,32 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task send
|
||||
|
||||
Send input to a task
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task send [flags] <task> [<input> | --stdin]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
- Send direct input to a task.:
|
||||
|
||||
$ coder task send task1 "Please also add unit tests"
|
||||
|
||||
- Send input from stdin to a task.:
|
||||
|
||||
$ echo "Please also add unit tests" | coder task send task1 --stdin
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### --stdin
|
||||
|
||||
| | |
|
||||
|------|-------------------|
|
||||
| Type | <code>bool</code> |
|
||||
|
||||
Reads the input from stdin.
|
||||
Generated
+55
@@ -0,0 +1,55 @@
|
||||
<!-- DO NOT EDIT | GENERATED CONTENT -->
|
||||
# task status
|
||||
|
||||
Show the status of a task.
|
||||
|
||||
Aliases:
|
||||
|
||||
* stat
|
||||
|
||||
## Usage
|
||||
|
||||
```console
|
||||
coder task status [flags]
|
||||
```
|
||||
|
||||
## Description
|
||||
|
||||
```console
|
||||
- Show the status of a given task.:
|
||||
|
||||
$ coder task status task1
|
||||
|
||||
- Watch the status of a given task until it completes (idle or stopped).:
|
||||
|
||||
$ coder task status task1 --watch
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### --watch
|
||||
|
||||
| | |
|
||||
|---------|--------------------|
|
||||
| Type | <code>bool</code> |
|
||||
| Default | <code>false</code> |
|
||||
|
||||
Watch the task status output. This will stream updates to the terminal until the underlying workspace is stopped.
|
||||
|
||||
### -c, --column
|
||||
|
||||
| | |
|
||||
|---------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||
| Type | <code>[id\|organization id\|owner id\|owner name\|owner avatar url\|name\|display name\|template id\|template version id\|template name\|template display name\|template icon\|workspace id\|workspace name\|workspace status\|workspace build number\|workspace agent id\|workspace agent lifecycle\|workspace agent health\|workspace app id\|initial prompt\|status\|state\|message\|created at\|updated at\|state changed\|healthy]</code> |
|
||||
| Default | <code>state changed,status,healthy,state,message</code> |
|
||||
|
||||
Columns to display in table output.
|
||||
|
||||
### -o, --output
|
||||
|
||||
| | |
|
||||
|---------|--------------------------|
|
||||
| Type | <code>table\|json</code> |
|
||||
| Default | <code>table</code> |
|
||||
|
||||
Output format.
|
||||
Reference in New Issue
Block a user