> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.itential.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.itential.com/_mcp/server.

# Use command templates

> How to create, test, import, export, and delete command templates in Itential Platform Studio.

## Create a Command Template

With the Command Template designer, you can execute commands on physical devices to see the actual response and rules evaluation.

#### Open Command Templates

Navigate to **Studio > Command Templates**.

#### Create a new template

Click the **plus (+)** icon in the top menu to create a new template. The **Create** dialog opens. Select **Command Template** from the dropdown menu, then enter a template name. Click **Create**. The Command Template form displays.

#### Select a device

Enter the device name in the search field (upper right) to select a device.

#### Add commands and rules

Add the relevant command variables and rules. For more information, see [Command Template Variables](/itential-platform/studio/command-templates/reference#command-template-variables) and [Defining Command Template Rules](/itential-platform/studio/command-templates/reference#defining-command-template-rules).

* Click **Add Command** to add a new command.
* Click **Add Rule** to add a new rule to a command.
* Click the trashcan icon next to a rule or command to delete it.

#### Test commands

Click **Test This Command** for a single command, or **Test All Commands** to test all commands at once. After evaluating the test output, rules will be marked with either a green check mark (passed) or red minus sign (failed). The device response appears at the bottom of the screen in **Test results**.

## Use Command Template controls

The easiest way to import, export, and delete a Command Template is to use the controls from the **Command Templates** collection page. From the Studio welcome page, click the **Search** button to open the **Collection** dialog.

From this view, you can **Import**, **Export**, or **Delete** command templates using the controls in the toolbar at the top of the canvas.

The **Export** and **Delete** icons are grayed out (disabled) until the radio button (bottom left circle) of a template card is checked.

### Controls toolbar

| UI action  | Description                                                 |
| ---------- | ----------------------------------------------------------- |
| Refresh    | Refreshes the Command Templates view in the current window. |
| Import     | Imports a template.                                         |
| Select All | Selects all templates in the current window.                |
| Delete     | Deletes the template when the radio button is selected.     |
| Export     | Exports the template when the radio button is selected.     |

To **Export** or **Delete** a template, select it by checking the circle in the lower left corner of the template card, then click the appropriate icon. Alternatively, hover over the vertical three dot icon in the lower right corner of a template card to open a menu of options for that template: **Edit**, **Clone**, **Delete**, or **Export**.

You can open any template by clicking the name at the top of the card. When a template is open, a new template can be **Imported** using the icon in the top toolbar on the left. Additional options — **Edit details**, **Clone**, **Revert changes**, **Export**, or **Delete** — are available from the three dot menu icon in the top right corner.

### Import a Command Template

Click the **Import** icon to open the Import dialog. Select **Command Template** from the dropdown list, then use the search bar to locate the desired template file for import. Once the file is selected, click **Import**.

### Export a Command Template

Click the **Export** icon to open a dialog with the options to open the template file or save it to a specific location.

### Delete a Command Template

Click the **Delete** icon. A confirmation box prompts you to confirm the delete action. Once a template is deleted, it cannot be undone and will no longer appear in the **Command Templates** collection view. Click **OK** to confirm.