Files
coder/cli/testdata/coder_templates_edit_--help.golden
T
Ethan 78b5a0f5a2 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.
2026-08-06 14:45:38 +10:00

106 lines
4.3 KiB
Plaintext

coder v0.0.0-devel
USAGE:
coder templates edit [flags] <template>
Edit the metadata of a template by name.
OPTIONS:
-O, --org string, $CODER_ORGANIZATION
Select which organization (uuid or name) to use.
--activity-bump duration
Edit the template activity bump - workspaces created from this
template will have their shutdown time bumped by this value when
activity is detected. Maps to "Activity bump" in the UI.
--agents-allowed bool (default: true)
Allow Coder Agents to create workspaces using this template.
--allow-user-autostart bool (default: true)
Allow users to configure autostart for workspaces on this template.
This can only be disabled in enterprise.
--allow-user-autostop bool (default: true)
Allow users to customize the autostop TTL for workspaces on this
template. This can only be disabled in enterprise.
--allow-user-cancel-workspace-jobs bool (default: true)
Allow users to cancel in-progress workspace jobs.
--autostart-requirement-weekdays [monday|tuesday|wednesday|thursday|friday|saturday|sunday|all]
Edit the template autostart requirement weekdays - workspaces created
from this template can only autostart on the given weekdays. To unset
this value for the template (and allow autostart on all days), pass
'all'.
--autostop-reminder duration
Edit how long before the autostop deadline a reminder notification is
sent for workspaces created from this template, in Go duration format
(e.g. 1h, 30m). Set to 0 to disable.
--autostop-requirement-weekdays [monday|tuesday|wednesday|thursday|friday|saturday|sunday|none]
Edit the template autostop requirement weekdays - workspaces created
from this template must be restarted on the given weekdays. To unset
this value for the template (and disable the autostop requirement for
the template), pass 'none'.
--autostop-requirement-weeks int
Edit the template autostop requirement weeks - workspaces created from
this template must be restarted on an n-weekly basis.
--default-ttl duration
Edit the template default time before shutdown - workspaces created
from this template default to this value. Maps to "Default autostop"
in the UI.
--deprecated string
Sets the template as deprecated. Must be a message explaining why the
template is deprecated.
--description string
Edit the template description.
--display-name string
Edit the template display name.
--dormancy-auto-deletion duration (default: 0h)
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.
--dormancy-threshold duration (default: 0h)
Specify a duration workspaces may be inactive prior to being moved to
the dormant state. This licensed feature's default is 0h (off). Maps
to "Dormancy threshold" in the UI.
--failure-ttl duration (default: 0h)
Specify a failure TTL for workspaces created from this template. It is
the amount of time after a failed "start" build before coder
automatically schedules a "stop" build to cleanup.This licensed
feature's default is 0h (off). Maps to "Failure cleanup" in the UI.
--icon string
Edit the template icon path.
--name string
Edit the template name.
--private bool (default: false)
Disable the default behavior of granting template access to the
'everyone' group. The template permissions must be updated to allow
non-admin users to use this template.
--require-active-version bool (default: false)
Requires workspace builds to use the active template version. This
setting does not apply to template admins. This is an enterprise-only
feature. See
https://coder.com/docs/admin/templates/managing-templates#require-automatic-updates-enterprise
for more details.
-y, --yes bool
Bypass confirmation prompts.
———
Run `coder --help` for a list of global options.