> ## Documentation Index
> Fetch the complete documentation index at: https://docs.suprsend.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Push Template

> Push templates and their variants from local files to a SuprSend workspace

Push locally edited template files — including all channel variants — to a SuprSend workspace. By default, pushed changes are saved as a **draft** and do not go live until committed.

Use `--commit` to push and commit in a single step, making changes live immediately.

This action overwrites templates with the same slug in the workspace, or creates new ones if they do not exist.

## Syntax

```bash theme={"system"}
suprsend template push [flags]
```

## Flags

| Flag                          | Description                                                                  | Default                |
| ----------------------------- | ---------------------------------------------------------------------------- | ---------------------- |
| `-h, --help`                  | Show help for the command                                                    | –                      |
| `-g, --slug string`           | Push a single template by slug. Omit to push all templates in the directory. | –                      |
| `-d, --dir string`            | Directory to read template files from                                        | `./suprsend/templates` |
| `-c, --commit`                | Commit the pushed templates to live immediately after pushing                | –                      |
| `-m, --commit-message string` | Message describing the changes (used when `--commit` is set)                 | –                      |
| `-f, --force`                 | Force commit by skipping variants that have errors                           | –                      |

## Example

```bash theme={"system"}
# Push all templates from the default directory as drafts
suprsend template push

# Push a single template by slug
suprsend template push --slug order-shipped

# Push from a custom directory
suprsend template push --dir ./my-templates

# Push and immediately commit to live
suprsend template push --slug order-shipped --commit

# Push and commit with a message describing the changes
suprsend template push --slug order-shipped --commit --commit-message "Update CTA copy for Q2 campaign"

# Push to production and commit, skipping any variants with errors
suprsend template push --workspace production --commit --force
```

<Note>
  Without `--commit`, pushed changes are saved as a draft. Run `suprsend template commit <slug>` as a separate step when you are ready to make them live.
</Note>

<Warning>
  Using `--force` skips validation errors on individual variants and commits the rest. Variants with errors will not be committed. Use with caution in production.
</Warning>
