# CLI commands for Canvas

> The commands in this section allow you to manage project assets that involve Uniform's composition features.

Source: https://docs.uniform.app/docs/guides/cli/commands/canvas

## Overview

The commands in this section allow you to manage project assets
that involve Uniform's composition features. This includes:

| Project asset | Command |
| --- | --- |
| Assets | [asset](#asset-commands) |
| Components | [component](#component-commands) |
| Compositions | [composition](#composition-commands) |
| Component patterns | [component-pattern](#component-pattern-commands) or [pattern](#component-pattern-commands) (legacy) |
| Composition patterns | [composition-pattern](#composition-pattern-commands) |
| Categories | [category](#category-commands) |
| Content types | [contenttype](#content-type-commands) |
| Entries | [entry](#entry-commands) |
| Entry patterns | [entry-pattern](#entry-pattern-commands) |
| Data sources | [datasource](#data-source-commands) |
| Data types | [datatype](#data-type-commands) |
| Labels | [label](#label-commands) |
| Locales | [locale](#locale-commands) |
| Prompts (Legacy feature) | [prompts](#prompt-commands) |
| Preview URLs | [preview-url](#preview-url-commands) |
| Preview viewports | [preview-viewport](#preview-viewport-commands) |
| Workflows | [workflow](#workflow-commands) |

## Asset commands

### Get asset

```bash
uniform canvas asset get <id>
```

Fetch an asset from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List asset

```bash
uniform canvas asset list
```

List assets from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull asset

```bash
uniform canvas asset pull <directory or file path>
```

Fetch all assets from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each asset.
- If a file path is specified, all assets are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push asset

```bash
uniform canvas asset push <directory or file path>
```

Insert or update all assets from local disk to the Uniform project.

- If a directory path is specified, the assets defined in the files in the directory used.
- If a file path is specified, the assets in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove asset

```bash
uniform canvas asset remove <id>
```

Delete an asset from the Uniform project. Moves it to [Trash](https://docs.uniform.app/docs/guides/content-organization/trash).

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update asset

```bash
uniform canvas asset update <filename>
```

Insert or update an asset from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Component commands

### Get component

```bash
uniform canvas component get <id>
```

Fetch a component definition from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List components

```bash
uniform canvas component list
```

List component definitions from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull component

```bash
uniform canvas component pull <directory or file path>
```

Fetch all component definitions from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each component.
- If a file path is specified, all component definitions are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push component

```bash
uniform canvas component push <directory or file path>
```

Insert or update all component definitions from local disk to the Uniform project.

- If a directory path is specified, the components defined in the files in the directory used.
- If a file path is specified, the components in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove component

```bash
uniform canvas component remove <id>
```

Delete a component definition from the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update component

```bash
uniform canvas component update <filename>
```

Insert or update a component definition from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Composition commands

### Get composition

```bash
uniform canvas composition get <id>
```

Fetch a composition definition from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List compositions

```bash
uniform canvas composition list
```

List composition definitions from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| --state  <br>_string (default value: preview)_ | Get the compositions that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull composition

```bash
uniform canvas composition pull <directory or file path>
```

Fetch all composition definitions from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each composition.
- If a file path is specified, all composition definitions are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| --state  <br>_string (default value: preview)_ | Get the compositions that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push composition

```bash
uniform canvas composition push <directory or file path>
```

Insert or update all composition definitions from local disk to the Uniform project.

- If a directory path is specified, the compositions defined in the files in the directory used.
- If a file path is specified, the components in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| --state  <br>_string (default value: preview)_ | Compositions are set to this state after being pushed.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Info:**
>
> it's important to understand the concept of [composition state](https://docs.uniform.app/docs/guides/composition/glossary#composition-state) when using this command or else you might get unexpected results. See the `--state` switch for more information.

### Publish composition

```bash
uniform canvas composition publish <compositionId or "--all">
```

Publishes given composition.

- If a compositionId is specified, then the specific composition will be published.
- If "--all" param is specified instead - all compositions in the project will be published.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all compositions in the project will be published. Overrides "compositionId" |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove composition

```bash
uniform canvas composition remove <id>
```

Delete a composition from the Uniform project. Moves it to [Trash](https://docs.uniform.app/docs/guides/content-organization/trash).

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update composition

```bash
uniform canvas composition update <filename>
```

Insert or update a composition definition from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| --state  <br>_string (default value: preview)_ | Composition is set to this state after being updated.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Component pattern commands

### Get component pattern

```bash
uniform canvas component-pattern get <id>
// or legacy
uniform canvas pattern get <id>
```

Fetch a component pattern from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |
| --state  <br>_string (optional, choices: "preview", "published", default value: "preview")_ | Component pattern state to fetch. |

### List component patterns

```bash
uniform canvas component-pattern list
// or legacy
uniform canvas pattern list
```

List component patterns from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| --state  <br>_string (default value: preview)_ | Get the component patterns that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft component patterns will result in "orphan" component patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull component pattern

```bash
uniform canvas component-pattern pull <directory or file path>
// or legacy
uniform canvas pattern pull <directory or file path>
```

Fetch all component patterns from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each component pattern.
- If a file path is specified, all component patterns are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| --state  <br>_string (default value: preview)_ | Get the component patterns that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft component patterns will result in "orphan" component patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push component pattern

```bash
uniform canvas component-pattern push <directory or file path>
// or legacy
uniform canvas pattern push <directory or file path>
```

Insert or update all component patterns from local disk to the Uniform project.

- If a directory path is specified, the component patterns defined in the files in the directory used.
- If a file path is specified, the components in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| --state  <br>_string (default value: preview)_ | Component patterns are set to this state after being pushed.  <br>`preview`  <br>`published` - Using this option without first pushing the draft component patterns will result in "orphan" component patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Info:**
>
> it's important to understand the concept of [composition state](https://docs.uniform.app/docs/guides/composition/glossary#composition-state) when using this command or else you might get unexpected results. See the `--state` switch for more information.

### Publish component pattern

```bash
uniform canvas component-pattern publish <ids or "--all">
// or legacy 
uniform canvas pattern publish <ids or "--all">
```

Publishes given component patterns.

- If a `ids` is specified, then the specific comma-separated component patterns will be published.
- If "--all" param is specified instead - all component patterns in the project will be published.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all component patterns in the project will be published. Overrides `ids` |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Unpublish component pattern

```bash
uniform canvas component-pattern publish <ids or "--all">
// or legacy 
uniform canvas pattern publish <ids or "--all">
```

Unpublish given component patterns.

- If a `ids` is specified, then the specific comma-separated component patterns will be unpublished.
- If "--all" param is specified instead - all component patterns in the project will be unpublished.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all component patterns in the project will be unpublished. Overrides `ids` |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove component pattern

```bash
uniform canvas component-pattern remove <id>
// or legacy
uniform canvas pattern remove <id>
```

Delete a component pattern from the Uniform project. Moves it to [Trash](https://docs.uniform.app/docs/guides/content-organization/trash).

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update component pattern

```bash
uniform canvas component-pattern update <filename>
// or legacy
uniform canvas pattern update <filename>
```

Insert or update a component pattern from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| --state  <br>_string (default value: preview)_ | Component pattern is set to this state after being updated.  <br>`preview`  <br>`published` - Using this option without first pushing the draft component patterns will result in "orphan" component patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Composition pattern commands

> **Note:**
>
> Requires the `@uniformdev/cli` package in [version `v19.169.0` or higher](https://docs.uniform.app/docs/changelog/shipped/regular-release-update-july-16th-2024).

### Get composition pattern

```bash
uniform canvas composition-pattern get <id>
```

Fetch a composition pattern from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |
| --state  <br>_string (optional, choices: "preview", "published", default value: "preview")_ | Composition pattern state to fetch. |

### List composition patterns

```bash
uniform canvas composition-pattern list
```

List composition patterns from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| --state  <br>_string (default value: preview)_ | Get the composition patterns that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft composition patterns will result in "orphan" composition patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull composition pattern

```bash
uniform canvas composition-pattern pull <directory or file path>
```

Fetch all composition patterns from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each composition pattern.
- If a file path is specified, all composition patterns are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| --state  <br>_string (default value: preview)_ | Get the composition patterns that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft composition patterns will result in "orphan" composition patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push composition pattern

```bash
uniform canvas composition-pattern push <directory or file path>
```

Insert or update all composition patterns from local disk to the Uniform project.

- If a directory path is specified, the composition patterns defined in the files in the directory used.
- If a file path is specified, the components in the file are used.

| Command | Output details |  |  |
| --- | --- | --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |  |  |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |  |  |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. | --state  <br>_string (default value: preview)_ | Composition patterns are set to this state after being pushed.  <br>`preview`  <br>`published` - Using this option without first pushing the draft composition patterns will result in "orphan" composition patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |  |  |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |  |  |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |  |  |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |  |  |

> **Info:**
>
> it's important to understand the concept of [composition state](https://docs.uniform.app/docs/guides/composition/glossary#composition-state) when using this command or else you might get unexpected results. See the `--state` switch for more information.

### Publish composition pattern

```bash
uniform canvas composition-pattern publish <ids or "--all">
```

Publishes given composition patterns.

- If a `ids` is specified, then the specific comma-separated composition patterns will be published.
- If "--all" param is specified instead - all composition patterns in the project will be published.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all composition patterns in the project will be published. Overrides `ids` |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Unpublish composition pattern

```bash
uniform canvas composition-pattern publish <ids or "--all">
```

Unpublish given composition patterns.

- If a `ids` is specified, then the specific comma-separated composition patterns will be unpublished.
- If "--all" param is specified instead - all composition patterns in the project will be unpublished.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all composition patterns in the project will be unpublished. Overrides `ids` |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove composition pattern

```bash
uniform canvas composition-pattern remove <id>
```

Delete a composition pattern from the Uniform project. Moves it to [Trash](https://docs.uniform.app/docs/guides/content-organization/trash).

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update composition pattern

```bash
uniform canvas composition-pattern update <filename>
```

Insert or update a composition pattern from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| --state  <br>_string (default value: preview)_ | Composition pattern is set to this state after being updated.  <br>`preview`  <br>`published` - Using this option without first pushing the draft composition patterns will result in "orphan" composition patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Category commands

### Get category

```bash
uniform canvas category get <id>
```

Fetch a category from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List of categories

```bash
uniform canvas category list
```

List of categories from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull category

```bash
uniform canvas category pull <directory or file path>
```

Fetch all categories from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each category.
- If a file path is specified, all categories are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push category

```bash
uniform canvas category push <directory or file path>
```

Insert or update all categories from local disk to the Uniform project.

- If a directory path is specified, the categories in the files in the directory used.
- If a file path is specified, the categories in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove category

```bash
uniform canvas category remove <id>
```

Delete a category from the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update category

```bash
uniform canvas category update <filename>
```

Insert or update a category from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Content type commands

> **Note:**
>
> The commands in this section require the package `@uniformdev/canvas`.

### Get content type

```bash
uniform canvas contenttype get <id>
```

Fetch a content type from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List content types

```bash
uniform canvas contenttype list
```

List content types from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull content types

```bash
uniform canvas contenttype pull <directory or file path>
```

Pulls all content types to local files in a directory

- If a directory path is specified, a separate file is created for each content type.
- If a filename ending in `yaml` or `json` is used, a package file will be created instead of files in the directory.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push content types

```bash
uniform canvas contenttype push <directory or file path>
```

Pushes all content types from files in a directory to Uniform

- If a directory path is specified, the content types that are defined in the files in the directory used.
- If a file path is specified, the content types in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove content type

```bash
uniform canvas contenttype remove <id>
```

Delete a content type from the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update content type

```bash
uniform canvas contenttype update <filename>
```

Insert or update a content type from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Entry commands

### Get entry

```bash
uniform canvas entry get <id>
```

Fetch an entry from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |
| --resolveData  <br>_boolean (optional, default value: false)_ | Resolve all data resources used by the entry |
| --resolutionDepth  <br>_integer (optional, default value: 1)_ | Controls how many levels deep content references should be resolved. |

### List entries

```bash
uniform canvas entry list
```

List entries from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| --state  <br>_string (default value: preview)_ | Get the entries that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entries will result in "orphan" entries and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull entries

```bash
uniform canvas entry pull <directory or file path>
```

Fetch all entries from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each entry.
- If a file path is specified, all entries are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| --state  <br>_string (default value: preview)_ | Get the entries that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entries will result in "orphan" entries and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push entries

```bash
uniform canvas entry push <directory or file path>
```

Insert or update all entries from local disk to the Uniform project.

- If a directory path is specified, the entries defined in the files in the directory used.
- If a file path is specified, the components in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| --state  <br>_string (default value: preview)_ | Entries are set to this state after being pushed.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entries will result in "orphan" entries and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Publish entry

```bash
uniform canvas entry publish <entryId or "--all">
```

Publishes given entry.

- If a entryId is specified, then the specific entry will be published.
- If "--all" param is specified instead - all entries in the project will be published.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all entries in the project will be published. Overrides "entryId" |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Unpublish entry

```bash
uniform canvas entry unpublish <entryId or "--all">
```

Unpublishes given entry.

- If an entryId is specified, that specific entry will be unpublished.
- If "--all" param is specified instead - all entries in the project will be unpublished.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all entries in the project will be unpublished. Overrides "entryId". |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove entry

```bash
uniform canvas entry remove <id>
```

Delete an entry from the Uniform project. Moves it to [Trash](https://docs.uniform.app/docs/guides/content-organization/trash).

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update entry

```bash
uniform canvas entry update <filename>
```

Insert or update a entry from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| --state  <br>_string (default value: preview)_ | Entry is set to this state after being updated.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entries will result in "orphan" entries and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Entry pattern commands

> **Note:**
>
> Requires the `@uniformdev/cli` package in version `v19.146.2` or higher.

### Get entry pattern

```bash
uniform canvas entry-pattern get <id>
```

Fetch a entry pattern from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |
| --state  <br>_string (optional, choices: "preview", "published", default value: "preview")_ | Entry pattern state to fetch. |

### List entry patterns

```bash
uniform canvas entry-pattern list
```

List entry patterns from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| --state  <br>_string (default value: preview)_ | Get the entry patterns that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entry patterns will result in "orphan" entry patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull entry pattern

```bash
uniform canvas entry-pattern pull <directory or file path>

```

Fetch all entry patterns from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each entry pattern.
- If a file path is specified, all entry patterns are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| --state  <br>_string (default value: preview)_ | Get the entry patterns that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entry patterns will result in "orphan" entry patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push entry pattern

```bash
uniform canvas entry-pattern push <directory or file path>
```

Insert or update all entry patterns from local disk to the Uniform project.

- If a directory path is specified, the entry patterns defined in the files in the directory used.
- If a file path is specified, the entry patterns in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| --state  <br>_string (default value: preview)_ | Entry patterns are set to this state after being pushed.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entry patterns will result in "orphan" entry patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Info:**
>
> it's important to understand the concept of [composition state](https://docs.uniform.app/docs/guides/composition/glossary#composition-state) when using this command or else you might get unexpected results. See the `--state` switch for more information.

### Publish entry pattern

```bash
uniform canvas entry-pattern publish <ids or "--all">
```

Publishes given entry patterns.

- If a `ids` is specified, then the specific comma-separated entry patterns will be published.
- If "--all" param is specified instead - all entry patterns in the project will be published.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all entry patterns in the project will be published. Overrides `ids` |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Unpublish entry pattern

```bash
uniform canvas entry-pattern publish <ids or "--all">
```

Unpublish given entry patterns.

- If a `ids` is specified, then the specific comma-separated entry patterns will be unpublished.
- If "--all" param is specified instead - all entry patterns in the project will be unpublished.

| Command | Output details |
| --- | --- |
| --all  <br>_boolean (optional)_ | If true, all entry patterns in the project will be unpublished. Overrides `ids` |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove entry pattern

```bash
uniform canvas entry-pattern remove <id>
```

Delete an entry pattern from the Uniform project. Moves it to [Trash](https://docs.uniform.app/docs/guides/content-organization/trash).

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update entry pattern

```bash
uniform canvas entry-pattern update <filename>
```

Insert or update a entry pattern from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| --state  <br>_string (default value: preview)_ | Entry pattern is set to this state after being updated.  <br>`preview`  <br>`published` - Using this option without first pushing the draft entry patterns will result in "orphan" entry patterns and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Data source commands

### Get data source

```bash
uniform canvas datasource get <id>
```

Fetch a data source definition from the Uniform project. Because the data source may contain secrets, the value is only written to stdout.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove data source

```bash
uniform canvas datasource remove <id>
```

Delete a data source from the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update data source

```bash
uniform canvas datasource update <dataSource>
```

Insert or update a data source using its JSON definition. The JSON can be fetched using the `get` command.

_example_

```bash
uniform canvas datasource update --integrationType canvas '{"id": "pokeapi", "displayName": "Pokéapi", "connectorType": "genericrestapi", "baseUrl": "https://pokeapi.co/api/v2"}'
```

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Data type commands

### Get data type

```bash
uniform canvas datatype get <id>
```

Fetch a data type definition from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List data types

```bash
uniform canvas datatype list
```

List data type definitions from the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| --state  <br>_string (default value: preview)_ | Get the compositions that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull data types

```bash
uniform canvas datatype pull <directory or file path>
```

Fetch all data type definitions from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each composition.
- If a file path is specified, all composition definitions are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| --state  <br>_string (default value: preview)_ | Get the compositions that are in this state.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push data types

```bash
uniform canvas datatype push <directory or file path>
```

> **Note:**
>
> Data sources referred to in your data types must be created manually before a push can succeed. Data sources cannot be serialized because they contain secrets.

Insert or update all data type definitions from local disk to the Uniform project.

- If a directory path is specified, the compositions defined in the files in the directory used.
- If a file path is specified, the components in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| --state  <br>_string (default value: preview)_ | Compositions are set to this state after being pushed.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Info:**
>
> it's important to understand the concept of [composition state](https://docs.uniform.app/docs/guides/composition/glossary#composition-state) when using this command or else you might get unexpected results. See the `--state` switch for more information.

### Remove data types

```bash
uniform canvas datatype remove <id>
```

Delete a data type definition from the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update data types

```bash
uniform canvas datatype update <filename>
```

Insert or update a data type definition from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| --state  <br>_string (default value: preview)_ | Data type is set to this state after being updated.  <br>`preview`  <br>`published` - Using this option without first pushing the draft compositions will result in "orphan" compositions and therefore isn't recommended. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Label commands

The commands in this section allow you to manage labels through the `canvas label` command group.

> **Minimum CLI version:**
>
> Label commands require `@uniformdev/cli` version **20.51.1** or higher.

### Pull label

```bash
uniform canvas label pull <directory>
```

Fetch all labels from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each label.
- If a file path is specified, all labels are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push label

```bash
uniform canvas label push <directory>
```

Insert or update all labels from local disk to the Uniform project.

- If a directory path is specified, the labels defined in the files in the directory are used.
- If a file path is specified, the labels in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Locale commands

### Pull locale

```bash
uniform canvas locale pull <directory or file path>
```

Fetch all locales from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each locale.
- If a file path is specified, all locales are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push locale

```bash
uniform canvas locale push <directory or file path>
```

Insert or update all locales from local disk to the Uniform project.

- If a directory path is specified, the locales defined in the files in the directory used.
- If a file path is specified, the locales in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Prompt commands

> **Legacy feature:**
>
> AI prompts is a legacy feature that will continue working for existing projects but is not recommended for new implementations.
>
> For a more flexible and powerful approach, use [Scout](https://docs.uniform.app/docs/guides/ai/scout) for AI-assisted composition building, [AI guidance](https://docs.uniform.app/docs/guides/ai/ai-guidance) to define context for your components and content types, and [AI quick edits](https://docs.uniform.app/docs/guides/ai/ai-quick-edits) for rapid content updates.
>
> AI prompts are likely to be deprecated in the future.

> **Info:**
>
> The commands in this section require the package `@uniformdev/canvas`.
>
> At present, [built-in prompts](https://docs.uniform.app/docs/guides/ai/ai-prompts#built-in-prompts) cannot be serialized.

### Get prompt

```bash
uniform canvas prompt get <id>
```

Fetch a prompt from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List prompts

```bash
uniform canvas prompt list
```

List prompts in the Uniform project.

| Command | Output details |
| --- | --- |
| --offset  <br>_integer (optional)_ | Number of rows to skip before fetching. |
| limit  <br>_integer (optional, default value: 20)_ | Number of rows to fetch. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull prompt

```bash
uniform canvas prompt pull <directory or file path>
```

Fetch all custom prompts and disabled built-in prompts from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each prompt.
- If a file path is specified, all custom prompts and disabled built-in prompts are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push prompt

```bash
uniform canvas prompt push <directory or file path>
```

Insert or update all custom prompts and disabled built-in prompts from local disk to the Uniform project.

- If a directory path is specified, the prompt defined in the files in the directory used.
- If a file path is specified, the prompt in the file are used.

| Command | Output details |
| --- | --- |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove prompt

```bash
uniform canvas prompt remove <id>
```

Delete a prompt from the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update prompt

```bash
uniform canvas prompt update <filename>
```

Insert or update a prompt from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Preview URL commands

### Get preview URL

```bash
uniform canvas preview-url get <id>
```

Fetch a preview url from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List preview URLs

```bash
uniform canvas preview-url list
```

List the preview URLs for the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull preview URL

```bash
uniform canvas preview-url pull <directory or file path>
```

Pulls all preview urls to local files in a directory

- If a directory path is specified, a separate file is created for each preview url.
- If a filename ending in yaml or json is used a package file will be created instead of files in the directory.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push preview URLs

```bash
uniform canvas preview-url push <directory or file path>
```

Pushes all preview urls from files in a directory to Uniform Canvas

- If a directory path is specified, the preview urls defined in the files in the directory used.
- If a file path is specified, the preview urls in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove preview URL

```bash
uniform canvas preview-url remove <id>
```

Remove a preview URL from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update preview URL

```bash
uniform canvas preview-url update <filename>
```

Insert or update a preview url from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

!!!!!!

## Preview viewport commands

### Get preview viewport

```bash
uniform canvas preview-viewport get <id>
```

Fetch a preview viewport from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### List preview viewports

```bash
uniform canvas preview-viewport list
```

List the preview viewports for the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Pull preview viewports

```bash
uniform canvas preview-viewport pull <directory or file path>
```

Pulls all preview urls to local files in a directory

- If a directory path is specified, a separate file is created for each preview viewport.
- If a filename ending in yaml or json is used a package file will be created instead of files in the directory.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Push preview viewports

```bash
uniform canvas preview-viewport push <directory or file path>
```

Pushes all preview viewports from files in a directory to Uniform Canvas

- If a directory path is specified, the preview viewports defined in the files in the directory are used.
- If a file path is specified, the preview viewports in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Remove preview viewport

```bash
uniform canvas preview-viewport remove <id>
```

Remove a preview viewport from the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

### Update preview viewport

```bash
uniform canvas preview-viewport update <filename>
```

Insert or update a preview viewport from a local file to the Uniform project.

| Command | Output details |
| --- | --- |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -o, --filename  <br>_string (optional)_ | File name for the output. If not specified the output is written to stdout. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

## Workflow commands

### Pull workflow

```bash
uniform canvas workflow pull <directory or file path>
```

Fetch all workflows from the Uniform project and save them locally.

- If a directory path is specified, a separate file is created for each workflows.
- If a file path is specified, all workflows are saved in a single file.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Format for the output (YAML or JSON) |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |

> **Tip:**
>
> If file name is specified, CLI will override only corresponding part of it (for example, pulling Project Map will only override project map section, but leave Canvas section in the same file intact). It allows you to create single file containing whole project export (Canvas + Context + Project Map). This isn't recommended for big projects. Learn about [backing up to a single file](https://docs.uniform.app/docs/guides/cli/common-tasks#backup-assets-to-a-single-file).

### Push workflow

> **Note:**
>
> In order to push workflows to a project, you must ensure;
>
> - The current token being used with the CLI has **Team Admin** permissions
> - The team for the project to which the workflows are being pushed already has roles created with the same public IDs as those specified in the workflows being created.

```bash
uniform canvas workflow push <directory or file path>
```

Insert or update all worlflows from local disk to the Uniform project.

- If a directory path is specified, the workflows defined in the files in the directory used.
- If a file path is specified, the workflows in the file are used.

| Command | Output details |
| --- | --- |
| -w, --what-if  <br>_boolean (optional)_ | If true, reports what would be done but changes no files. |
| -m, --mode  <br>string (optional, default value: mirror) | Specifies what kind of changes can be made.  <br>`create` - Create new files but don't update existing files.  <br>`createOrUpdate` - Create new files and update existing files but delete no files.  <br>`mirror` - Create new files, update existing files, and delete files that don't match existing objects in the Uniform project. |
| -d, --diff  <br>string (optional, default value: off) | Specifies which changes are written to stdout. If not specified, the environment variable UNIFORM_CLI_DIFF_MODE is used. If the environment variable isn't set, the default value is used.  <br>`off` - No changes are written.  <br>`update` - Only update changes are written.  <br>`on` - Update, create, and delete changes are written. |
| -p, --project  <br>_string_ | Uniform project id. If not specified, the environment variable `UNIFORM_CLI_PROJECT_ID` is used. |
| -f, --format  <br>_string (optional, default value: YAML)_ | Uniform API key. If not specified, the environment variable `UNIFORM_API_KEY` is used. |
| --apiHost  <br>_string (optional, default value: https://uniform.app)_ | Uniform host. If not specified, the environment variable `UNIFORM_CLI_BASE_URL` is used. If the environment variable isn't set, the default value is used. |
| --proxy  <br>_string (optional)_ | Proxy server. If not specified, the following environment variables are used (with the first match being used): `HTTPS_PROXY`, `https_proxy`, `ALL_PROXY`, `all_proxy`. If no match is found, no proxy server is used. |
