---
title: "template.saveAs: Save as Template — Motion kit command — Kition"
description: "Saves the current project as a user project template `name` (with `description`, `category`); the active comp becomes its main comp. Footage is embedded up to `embedLimitMB` (256), larger files stay linked."
canonical: "https://developer.kition.ai/docs/kits/motion/commands/template.saveAs"
---

> Canonical HTML: [https://developer.kition.ai/docs/kits/motion/commands/template.saveAs](https://developer.kition.ai/docs/kits/motion/commands/template.saveAs)

# template.saveAs

**Save as Template.** Saves the current project as a user project template `name` (with `description`, `category`); the active comp becomes its main comp. Footage is embedded up to `embedLimitMB` (256), larger files stay linked.

- Kit: Motion 0.1.0 (.kmotion); reference: [Motion kit commands](https://developer.kition.ai/docs/kits/motion.md)
- Changes the document: yes

## Parameters

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `category` | `string` | no |  |
| `comp` | `integer \| string` | no | read by the command beside its listed parameters |
| `description` | `string` | no |  |
| `embedFootage` | `boolean` | no | default true: the footage files go into the template |
| `embedLimitMB` | `number` | no | default 256: footage beyond it stays linked, with a warning |
| `name` | `string` | no |  |
| `overwrite` | `boolean` | no | default true |

## Call through motion_run

```text
motion_run {
  "path": "<file>.kmotion",
  "steps": [{ "command": "template.saveAs" }]
}
```

The required parameters, with placeholders for their types: not a tested example. Optional: `category`, `comp`, `description`, `embedFootage`, `embedLimitMB`, `name`, `overwrite`. motion_run answers the step’s result in `completed[i].result`.

## Result

The kit gives no result schema for this command.

## Parameter schema

```json
{
  "additionalProperties": false,
  "properties": {
    "category": {
      "type": "string"
    },
    "comp": {
      "description": "read by the command beside its listed parameters",
      "oneOf": [
        {
          "description": "comp's item id as motion_inspect lists it",
          "type": "integer"
        },
        {
          "description": "the item id as receipts print it (\"1\"), or the comp's name",
          "type": "string"
        }
      ],
      "x-khp-name": "name",
      "x-khp-types": [
        "Item"
      ]
    },
    "description": {
      "type": "string"
    },
    "embedFootage": {
      "description": "default true: the footage files go into the template",
      "type": "boolean"
    },
    "embedLimitMB": {
      "description": "default 256: footage beyond it stays linked, with a warning",
      "type": "number"
    },
    "name": {
      "type": "string"
    },
    "overwrite": {
      "description": "default true",
      "type": "boolean"
    }
  },
  "returns": "{id, path, embedded, embeddedBytes, linked: [{item, name, reason}], warning?}",
  "type": "object"
}
```

Generated from the command list of @kition/motion-darwin-arm64@0.1.0 and the kit itself (motion_commands through @kition/cli@0.1.1, built from KitionAI/kition-motion@4719aa7).
