# templates

> Save launch settings once and reuse them from your terminal.

The `templates` commands create, list, show, change and delete templates.

```bash
featherless-cloud templates <subcommand> [options]
```

To deploy from a template, pass `--template` to [`instance create`](/cli/instance#create-an-instance) or [`exec`](/cli/exec). `--template` looks for your own template first, then one shared in your organization, then an official one. `org/<name>` and `featherless/<name>` choose explicitly.

## List templates

```bash
featherless-cloud templates list
```

Lists official templates, yours, and those shared in your organization, with their tags.

## Show a template

```bash
featherless-cloud templates show trainer
featherless-cloud templates show featherless/rocm-pytorch
```

Prints its settings. For an official template, it also lists the versions.

## Create a template

```bash
featherless-cloud templates create trainer \
  --image ghcr.io/acme/trainer:1 --registry ghcr \
  --gpu-count 1 --disk 100 --volume data:/workspace \
  --env EPOCHS=3 --secret HF_TOKEN=... \
  --tag training
featherless-cloud templates create llm-dev --template featherless/rocm-vllm --gpu-count 1 --port 8000
```

The name uses lowercase letters, numbers and hyphens. It's what you deploy the template by.

<table>
<thead>
  <tr>
    <th>
      Option
    </th>
    
    <th>
      Description
    </th>
  </tr>
</thead>

<tbody>
  <tr>
    <td>
      <code>
        --description <text>
      </code>
    </td>
    
    <td>
      What the template is for.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --visibility <private|organization>
      </code>
    </td>
    
    <td>
      <code>
        private
      </code>
      
       (default), or <code>
        organization
      </code>
      
       to let every member deploy it, with its secrets.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --template <name>
      </code>
    </td>
    
    <td>
      Start from an official template's image, command and environment. <code>
        name:version
      </code>
      
       for an older version.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --image <reference>
      </code>
    </td>
    
    <td>
      Container image.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --registry <name|id>
      </code>
    </td>
    
    <td>
      Registry credential for a private image.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --compute-type <gpu|cpu>
      </code>
    </td>
    
    <td>
      GPU (default) or CPU compute.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --gpu-type <text>
      </code>
    </td>
    
    <td>
      GPU model, matched on part of its name.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --gpu-count <n>
      </code>
    </td>
    
    <td>
      GPUs: 1, 2, 4 or 8.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --cpu-cores <n>
      </code>
    </td>
    
    <td>
      vCPUs, with <code>
        --compute-type cpu
      </code>
      
      .
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --disk <gb>
      </code>
    </td>
    
    <td>
      Container disk, 20–2,000.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --volume <name>:<path>
      </code>
    </td>
    
    <td>
      Mount a network volume. Repeatable.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --command <string>
      </code>
    </td>
    
    <td>
      Start command, split on spaces.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --env <K=V>
      </code>
    </td>
    
    <td>
      Environment variable. Repeatable.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --secret <K=V>
      </code>
    </td>
    
    <td>
      Secret variable, available as a file under <code>
        $FEATHERLESS_SECRETS_PATH
      </code>
      
      . Repeatable.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --port <port>
      </code>
    </td>
    
    <td>
      Public port. Repeatable.
    </td>
  </tr>
  
  <tr>
    <td>
      <code>
        --tag <tag>
      </code>
    </td>
    
    <td>
      Label. Repeatable.
    </td>
  </tr>
</tbody>
</table>

## Change a template

```bash
featherless-cloud templates update trainer --visibility organization
featherless-cloud templates update trainer --gpu-count 2 --tag training --tag multi-gpu
```

Takes the same options as `create`, plus `--name` to rename it. `--secret` and `--tag` replace the saved lists. Instances and Run Jobs already deployed keep their settings.

## Delete a template

```bash
featherless-cloud templates delete trainer
```

Instances and Run Jobs deployed from it keep running.
