> For the complete documentation index, see [llms.txt](https://developer.celigo.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.celigo.com/cli/commands/templates.md).

# templates

Browse, preview, manage, and install integration templates. Three things live here: the **published marketplace catalog** (`marketplace`), your **own template resources** (`list`, `get`, `create`, `update`, `delete`), and **installation** (`preview`, `install`).

**REST API**: [Marketplace](https://developer.celigo.com/api/api-reference/marketplace)

```
celigo templates <subcommand> [args] [flags]
```

Supports all [global flags](/cli/getting-started/global-flags.md).

***

## Subcommands

| Subcommand                               | Purpose                                                                                                           |
| ---------------------------------------- | ----------------------------------------------------------------------------------------------------------------- |
| `marketplace`                            | Browse the published catalog (Integration Apps + Templates), sorted by install count. Filter by name with `--jq`. |
| `list`                                   | List your own template resources (`GET /v1/templates`).                                                           |
| `get <id>`                               | Get one of your template resources.                                                                               |
| `create` / `update <id>` / `delete <id>` | Manage your own template resources.                                                                               |
| `preview [id]`                           | Preview a template's blueprint — by id, or `--zip` for a local bundle.                                            |
| `install [id]`                           | Install a template (creating an integration) — by id, or `--zip` for a local bundle.                              |

***

## `celigo templates marketplace`

List published marketplace entries, sorted by `numInstalls` descending. Connectors (Integration Apps) are excluded by default because they install through the UI and can't be previewed — use `--type Connector` or `--include-connectors` to bring them in. (For your *own* template resources, use `list`.)

**Signature**

```bash
celigo templates marketplace [flags]
```

**Flags**

| Flag                   | Type    | Default   | Description                                                                               |
| ---------------------- | ------- | --------- | ----------------------------------------------------------------------------------------- |
| `--type <type>`        | string  | *(unset)* | Filter by `docType`. Accepts `Template` or `Connector` (case-insensitive).                |
| `--include-connectors` | boolean | `false`   | Include `docType=Connector` entries in the unfiltered list. Ignored when `--type` is set. |

**Corresponds to**: [`POST /v1/published/combined?sort_by=numInstalls`](https://developer.celigo.com/api/api-reference/marketplace#post-v1-published-combined)

***

## `celigo templates list` / `get` / `create` / `update` / `delete`

Manage your **own** template resources (the `/v1/templates` CRUD endpoint) — distinct from the published `marketplace` catalog. `create`/`update`/`delete` follow the standard [resource conventions](/cli/readme.md). `create` and `update` read the JSON body from a file with `-f, --file <path>` or from stdin; `update` is a full `PUT`; `delete` takes `-y, --yes` to skip the confirmation prompt.

> ⚠️ **`update` and `delete` are destructive.** `update` is a full `PUT` — any field you omit is erased, so `GET` first and send the complete object. `delete` permanently removes the template resource.

```bash
celigo templates list
celigo templates get <id>
celigo templates create --file ./template.json
celigo templates update <id> --file ./template.json
celigo templates delete <id> -y
```

**Corresponds to**: `GET /v1/templates`, `GET|POST|PUT|DELETE /v1/templates[/{_id}]`

***

## `celigo templates preview`

Preview a template's full blueprint — every `{model, doc}` object the installer would materialize (Integration, Connection, Export, Import, Flow, Script). Either pass a template **id**, or `--zip` to preview a **local bundle** (which uploads the zip and previews the integration it would create — nothing is saved). Run this before `install --zip` to discover the source connections you need to map.

**Signature**

```bash
celigo templates preview [id] [flags]
```

**Arguments**

| Argument | Type   | Required    | Description                                                                                      |
| -------- | ------ | ----------- | ------------------------------------------------------------------------------------------------ |
| `[id]`   | string | Conditional | Template `_id` from `marketplace` (must be a `docType=Template` entry). Omit when using `--zip`. |

**Flags**

| Flag              | Type    | Default   | Description                                                                                                                       |
| ----------------- | ------- | --------- | --------------------------------------------------------------------------------------------------------------------------------- |
| `--zip <path>`    | path    | *(unset)* | Preview a local template `.zip` instead of a template id. Mutually exclusive with `[id]`.                                         |
| `--model <model>` | string  | *(unset)* | Scope the response to one object type (`Flow`, `Export`, `Import`, `Script`, `Connection`, `Integration`). Id-based preview only. |
| `--summary`       | boolean | `false`   | Show a `{model, count}` rollup instead of full configs. Takes precedence over `--model`.                                          |

**Example**

```bash
celigo templates preview 6405b9d73496e05ff253d587 --model Flow
celigo templates preview --zip ./my-template.zip
```

**Corresponds to**: [`GET /v1/templates/{_id}/preview`](https://developer.celigo.com/api/api-reference/marketplace#get-v1-templates-_id-preview) (by id), or `GET /v1/integrations/template/preview` (by `--zip`, after a signed-URL upload).

***

## `celigo templates install`

Install a template, creating a new integration. Either pass a template **id**, or `--zip` to install a **local bundle**. Templates that include connections require a source→target connection map piped via stdin: `{"connectionMap":{"sourceConnId":"targetConnId", …}}`. Run `preview` first to discover the source connections.

**Signature**

```bash
celigo templates install [id] [flags]
```

**Arguments**

| Argument | Type   | Required    | Description                                         |
| -------- | ------ | ----------- | --------------------------------------------------- |
| `[id]`   | string | Conditional | Template `_id` to install. Omit when using `--zip`. |

**Flags**

| Flag                | Type | Default   | Description                                                                                    |
| ------------------- | ---- | --------- | ---------------------------------------------------------------------------------------------- |
| `--zip <path>`      | path | *(unset)* | Install from a local template `.zip` instead of a template id. Mutually exclusive with `[id]`. |
| `-f, --file <path>` | path | *(unset)* | JSON body file for an id-based install (or pipe via stdin).                                    |

**Example**

```bash
echo '{"connectionMap":{"src1":"tgt1"}}' | celigo templates install --zip ./my-template.zip
celigo templates install 6405b9d73496e05ff253d587
```

**Corresponds to**: `POST /v1/integrations/template/{_id}` (by id), or `POST /v1/integrations/template` (by `--zip`, after a signed-URL upload). Requires `full` mode.

***

## Gotchas

* **`Template` vs `Connector`.** The combined marketplace endpoint returns two `docType`s. `Template` entries are user-installable blueprints and are the only ones `preview` accepts — passing a `Connector` id returns `404 Not Found` with `invalid_ref "Template not found"`. `Connector` entries are Celigo-managed Integration Apps that install through the UI (or `integrations install`).
* **`marketplace` vs `list`.** `marketplace` hits the published catalog (`/v1/published/combined`); `list`/`get`/CRUD operate on your own template resources (`/v1/templates`). Different datasets.
* **Connectors are hidden by default.** `marketplace` filters them out. Use `--type Connector` or `--include-connectors` for the full catalog.
* **`POST`, not `GET`, for the combined catalog.** `/v1/published/combined` is POST-only with an empty JSON body.
* **No server-side name search.** The combined catalog endpoint has no `q`/`name` parameter — filter `marketplace` output by name with `--jq` (e.g. `marketplace --jq 'map(select(.name | test("shopify";"i")))'`).
* **`--zip` is a two-step upload.** `preview --zip` / `install --zip` first request a signed S3 URL, PUT the bundle there, then pass the resulting `runKey` to the preview/install call.

## Related

* [integrations](/cli/commands/integrations.md) — the integration created by `install`.
* [http-connectors](/cli/commands/http-connectors.md) — the HTTP connector catalog referenced by many templates.
* [trading-partner-connectors](/cli/commands/trading-partner-connectors.md) — the trading partner connector catalog.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://developer.celigo.com/cli/commands/templates.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
