> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# mammoth template

> All 5 mammoth template commands with examples, arguments and confirmation flags: Manage legacy workspace templates (the project catalog is 'workflow template').

> Generated from mammoth-cli 2.4.2, released 2026-11-02: `mammoth schema list`, `mammoth capability list` and the CLI's own `--help`. Do not edit by hand; run `npm run docs:capabilities`.

Manage legacy workspace templates (the project catalog is 'workflow template'). 5 commands.

Every command also takes the [global flags](https://mammoth.io/docs/build/cli/global-flags/) (`--output`, `--yes`, `--confirm`, `--dry-run`, `--input`, `--profile`, ...), which are not repeated below. `--input` takes a JSON or YAML document of the input fields; `mammoth schema get COMMAND_ID` prints a command's full input schema.

**Confirmation.** Commands marked `--yes --confirm TARGET` or `--yes` always need those flags, even at a terminal: they never prompt. Commands marked "`--yes` or prompt" ask at an interactive terminal (table output, no `--no-input`) and otherwise need `--yes`. `--dry-run` skips confirmation and sends nothing.

## Summary

| Command | What it does | Effect | Confirmation |
|---|---|---|---|
| [`template create`](#mammoth-template-create) | Create a template. Payload comes from the 'body' input field. | Benign mutation | — |
| [`template delete`](#mammoth-template-delete) | Delete a template by id. Prompt or '--yes' required. | Destructive | `--yes` or prompt |
| [`template get`](#mammoth-template-get) | Get one template by id. | Read | — |
| [`template list`](#mammoth-template-list) | List the legacy workspace templates (not the workflow template catalog). | Read | — |
| [`template update`](#mammoth-template-update) | Update a template. Template id is positional; payload is the 'body' field. | Benign mutation | — |

## template commands

### mammoth template create

Create a template. Payload comes from the 'body' input field.

```bash
mammoth template create --input '{"body": {"name": "Revenue report"}}'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `body` | `--input` field | yes | — | `dict[str, any]` |  |

- **Effect:** Benign mutation, scope `project` · **Confirmation:** none
- **Id:** `template.create` · **Result:** `TemplateCreateResult` · **Backed by:** SDK `mammoth.api.templates.TemplatesAPI.create`, API `POST /workspaces/{workspace_id}/templates` (CreateTemplate)

### mammoth template delete

Delete a template by id. Prompt or '--yes' required.

```bash
mammoth template delete 123 --yes
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `TEMPLATE_ID` | positional | yes | — | `int` | ID of the template. |

- **Effect:** Destructive, scope `project` · **Confirmation:** `--yes`, or answer the prompt at an interactive terminal
- **Preconditions:** Required inputs: TEMPLATE_ID.
- **Id:** `template.delete` · **Result:** `TemplateDeleteResult` · **Backed by:** SDK `mammoth.api.templates.TemplatesAPI.delete`, API `DELETE /workspaces/{workspace_id}/templates/{template_id}` (DeleteTemplate)

### mammoth template get

Get one template by id.

```bash
mammoth template get 123
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `TEMPLATE_ID` | positional | yes | — | `int` | ID of the template. |

- **Effect:** Read, scope `project` · **Confirmation:** none
- **Preconditions:** Required inputs: TEMPLATE_ID.
- **Id:** `template.get` · **Result:** `TemplateGetResult` · **Backed by:** SDK `mammoth.api.templates.TemplatesAPI.get`, API `GET /workspaces/{workspace_id}/templates/{template_id}` (GetTemplate)

### mammoth template list

List the legacy workspace templates (not the workflow template catalog).

```bash
mammoth template list
```

- **Effect:** Read, scope `project` · **Confirmation:** none · **Pages:** `single_page`
- **Id:** `template.list` · **Result:** `TemplateListResult` · **Backed by:** SDK `mammoth.api.templates.TemplatesAPI.list`, API `GET /workspaces/{workspace_id}/templates` (ListTemplates)

### mammoth template update

Update a template. Template id is positional; payload is the 'body' field.

```bash
mammoth template update 123 --input '{"body": {"name": "Revenue report"}}'
```

| Name | Passed as | Required | Default | Type | Notes |
|---|---|---|---|---|---|
| `TEMPLATE_ID` | positional | yes | — | `int` | ID of the template. |
| `body` | `--input` field | yes | — | `dict[str, any]` |  |

- **Effect:** Benign mutation, scope `project` · **Confirmation:** none
- **Preconditions:** Required inputs: TEMPLATE_ID.
- **Id:** `template.update` · **Result:** `TemplateUpdateResult` · **Backed by:** SDK `mammoth.api.templates.TemplatesAPI.update`, API `PATCH /workspaces/{workspace_id}/templates/{template_id}` (UpdateTemplate)

---
Source: https://mammoth.io/docs/build/cli/template.md · Updated: 2026-11-02
