feat(cli): add --agents-allowed to template commands (#27517)

Relates to CODAGT-713

Depends on #27515

This adds `--agents-allowed` to `coder templates create` and `coder templates edit`. Template creation defaults the option to true, matching the per-template API and database default, while template editing only changes the value when the flag is explicitly supplied so unrelated edits preserve the existing setting.

The generated CLI help and reference documentation include the new option. #27518 updates the Coder Agents platform controls documentation to describe the completed per-template model.
This commit is contained in:
Ethan
2026-08-06 14:45:38 +10:00
committed by GitHub
parent 6c8a8647f6
commit 78b5a0f5a2
8 changed files with 165 additions and 0 deletions
+9
View File
@@ -11,6 +11,15 @@ coder templates create [flags] [name]
## Options
### --agents-allowed
| | |
|---------|-------------------|
| Type | <code>bool</code> |
| Default | <code>true</code> |
Allow Coder Agents to create workspaces using this template.
### --private
| | |
+9
View File
@@ -126,6 +126,15 @@ Specify a duration workspaces may be inactive prior to being moved to the dorman
Specify a duration workspaces may be in the dormant state prior to being deleted. This licensed feature's default is 0h (off). Maps to "Dormancy Auto-Deletion" in the UI.
### --agents-allowed
| | |
|---------|-------------------|
| Type | <code>bool</code> |
| Default | <code>true</code> |
Allow Coder Agents to create workspaces using this template.
### --allow-user-cancel-workspace-jobs
| | |