> 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-and-templates/marketplace)

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

Supports all [global flags](https://developer.celigo.com/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`. `--kind integration\|mcpserver` reads the typed Templates catalog instead, which carries each entry's `type`. |
| `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`.)

`--kind integration|mcpserver` reads a different catalog: the typed Templates catalog (`GET /v1/templates/published`, sorted by name), which carries each entry's `type` — the combined catalog does not. It lists Templates only, so it cannot be combined with `--include-connectors` or `--type Connector`. MCP-server templates install with [`mcp-servers install-template`](https://developer.celigo.com/cli/commands/mcp-servers.md#celigo-mcp-servers-install-template-less-than-templateid-greater-than); integration templates with `templates install`. Added in celigo-cli 2026.9.6.

**Signature**

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

**Flags**

| Flag                   | Type                         | Default   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                |
| ---------------------- | ---------------------------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `--type <type>`        | string                       | *(unset)* | Filter by `docType`. Accepts `Template` or `Connector` (case-insensitive). Since celigo-cli 2026.10.1 any other value is refused before the request: `Invalid --type 'Integration'. Expected one of: Template, Connector.` Since celigo-cli 2026.11.2 a blank `--type` or `--kind` (an unset shell variable) is refused too; it used to be read as the flag left out.                                                                                                                                                                                                      |
| `--include-connectors` | boolean                      | `false`   | Include `docType=Connector` entries in the unfiltered list. Ignored when `--type` is set.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `--kind <kind>`        | `integration` \| `mcpserver` | *(unset)* | Only Templates of one kind, read from the typed catalog (`GET /v1/templates/published`, sorted by name) and filtered client-side on `type`. Rejects any other value, and cannot be combined with `--include-connectors` or `--type Connector`. Since celigo-cli 2026.10.1 every page of the typed catalog is read. Added in celigo-cli 2026.9.6.                                                                                                                                                                                                                           |
| `--fields <spec>`      | string                       | `default` | Fields to print per row. `default` prints `_id`, `name`, and the table columns; `all` prints complete documents; a comma-separated list selects specific fields (dot notation allowed). The catalog endpoints ignore the `include` parameter, so rows are trimmed client-side, and `docType` (`type` with `--kind`) always rides along for the filters. Since celigo-cli 2026.10.1, `--format table` draws `_id`, `name` and the fields you list instead of the default columns. See [field projection](https://developer.celigo.com/cli/getting-started/global-flags.md). |

**Example**

```bash
# The most-installed templates
celigo templates marketplace --format table

# MCP-server templates, by name — install one with mcp-servers install-template <id>
celigo templates marketplace --kind mcpserver --format table
```

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

***

## `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](https://developer.celigo.com/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. `list` prints `_id`, `name`, `lastModified`, and since celigo-cli 2026.10.1 it reads every page of the listing.

Since celigo-cli 2026.10.1, `create` and `update` refuse a body that is not a JSON object, and check it for masked credential placeholders (`"******"` — four or more asterisks and nothing else): `create` refuses them with no override, and `update` refuses them unless you pass `--force` (added in celigo-cli 2026.10.1), which submits the body anyway.

> ⚠️ **`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 update <id> --file ./template.json --force   # submit masked values copied from a GET
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.

Both forms print one row per object (`model`, `_id`, `name`, `adaptorType` in a table); `--model` keeps one object type and `--summary` counts per type. Since celigo-cli 2026.10.1, `--zip` renders the same way, honoring `--model` and `--summary` (it printed the raw response and ignored both), and `--summary --model` counts only that model.

A by-id preview works in every mode. `--zip` uploads the bundle to staging storage before the preview, so it needs `operate` or `full` mode; since celigo-cli 2026.10.1 `read` mode refuses it before anything is uploaded. Since celigo-cli 2026.11.2 the refusal says who lifts it, as every mode refusal does:

```
Previewing a local template .zip uploads the bundle to staging storage first — it cannot run in read mode. Current mode: read. A person raises this profile's mode to operate or full at a terminal ('celigo config set mode <mode>') to preview a local bundle; an agent must not raise it, or switch profiles, to get past this refusal.
```

When `CELIGO_MODE` set the mode, the refusal names that variable instead. Earlier releases ended the message with `Switch to operate or full mode.`

Also since celigo-cli 2026.11.2:

* The CLI reads the ZIP before it asks for an upload URL. A path that holds no file, or a file that cannot be read, is refused before any request: `Cannot read the template zip './my-template.zip' (the file --zip names): no file at that path.` Earlier releases requested an upload URL first and left it unused.
* The upload names its target on stderr before the bundle is sent, as every write does.
* A blank `--zip` or `--model` (an unset shell variable) is refused. A blank `--zip` beside an id used to preview the published template.

The rows leave out the preview envelope's `type` and `stackRequired`. Since celigo-cli 2026.10.2, a line on stderr reports them when they change how the template installs:

* An MCP server template, previewed by id, gets `This is an MCP server template (type mcpserver): install it with 'celigo mcp-servers install-template <id>'; 'templates install' takes integration templates only.` A `--zip` bundle of an MCP server, the ZIP that `mcp-servers download` writes, is refused here with `400 invalid_template`. Preview it with [`mcp-servers preview-template --zip`](https://developer.celigo.com/cli/commands/mcp-servers.md#celigo-mcp-servers-preview-template), added in celigo-cli 2026.11.2.
* A template whose `stackRequired` is `true` gets `The template needs a stack (stackRequired): it includes NetSuite-distributed resources that need a dedicated stack.` Install it with [`install --stack-id`](#celigo-templates-install).

**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]`. Since celigo-cli 2026.10.1 a leading `~` means your home directory.                             |
| `--model <model>` | string  | *(unset)* | Scope the response to one object type (`Flow`, `Export`, `Import`, `Script`, `Connection`, `Integration`), matched case-insensitively. Applies to `--zip` too since celigo-cli 2026.10.1. |
| `--summary`       | boolean | `false`   | Show a `{model, count}` rollup instead of full configs. With `--model`, counts only that model (since celigo-cli 2026.10.1).                                                              |

**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-and-templates/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 or read from `--file`: `{"connectionMap":{"sourceConnId":"targetConnId", …}}`. Run `preview` first to discover the source connections. An id-based install always reads a body, and fails with `No input received. Pipe JSON via stdin, or pass --file <path> (where supported).` when there is none; with `--zip` the body is optional.

Each install creates another integration and is sent once. After a timeout, a `5xx`, or a `429`, look for the new integration with `celigo integrations list` before you install again.

Since celigo-cli 2026.10.1, the body must be a JSON object, and an install is never resent after a timeout or a `5xx`, so a slow install that reached the platform does not create a second integration. Since celigo-cli 2026.11.1, an install is not resent after a `429` either; earlier releases retried it. When the platform refuses an id-based install with `422 invalid templateZip`, nothing is created: the template installs step by step, which this one-shot install does not run. The CLI says so and points at the integrator.io marketplace installer: `This template installs step by step: its install steps include a template_zip step that this one-shot install does not run, so the platform refused the copy and created nothing (celigo templates preview 5f83a9b2c7d3e8f1a2b3c4d5 --model Integration shows the steps). Install it from the integrator.io marketplace, whose installer runs them.`

`install` takes integration templates only. The platform refuses an id-based install of an MCP server template with `400` before it creates anything. Since celigo-cli 2026.10.2, that refusal carries a hint: `Hint: This is an MCP server template, and nothing was created: install it with celigo mcp-servers install-template <id>.`

A template whose resources need a dedicated stack (`templates preview` says so on stderr) installs only when the request names one. Without it, the platform refuses the install with `400 stack_not_found`. Since celigo-cli 2026.10.2, `--stack-id <id>` sends the stack as `_stackId`, by id or with `--zip`. A string `_stackId` in the piped body is sent too, and `--stack-id` wins when both are given.

A `--jq` expression that fails on an install's answer does not hide the integration the install created. The error says the request succeeded, the untransformed answer follows on stderr, and the command exits `1`. Since celigo-cli 2026.10.2, this holds for `--zip` installs too.

Since celigo-cli 2026.11.2, `install --zip` reads the ZIP before it asks for an upload URL, as `preview --zip` does: a path that holds no file is refused before any request. A blank `--zip` or `--stack-id` (an unset shell variable) is refused too.

**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]`. Since celigo-cli 2026.10.1 a leading `~` means your home directory.                                                                                                                        |
| `-f, --file <path>` | path   | *(unset)* | JSON body file (or pipe via stdin; `--file -` waits for stdin to close). With `--zip` it carries the `connectionMap` — since celigo-cli 2026.10.1; earlier releases ignored `--file` with `--zip` — and a body piped without `--file` must start arriving within 1 second (it was 50 ms). |
| `--stack-id <id>`   | string | *(unset)* | Stack the copy's hooks and wrapper connections run on (sent as `_stackId`), by id or with `--zip`. Required when the template needs a stack: without one the platform answers `400 stack_not_found`. Wins over a `_stackId` in the piped body. Added in celigo-cli 2026.10.2.             |

**Example**

```bash
echo '{"connectionMap":{"src1":"tgt1"}}' | celigo templates install --zip ./my-template.zip
celigo templates install --zip ./my-template.zip --file ./connection-map.json
celigo templates install 5f83a9b2c7d3e8f1a2b3c4d5 --file ./connection-map.json

# A template whose preview says it needs a stack
celigo templates install 5f83a9b2c7d3e8f1a2b3c4d5 --file ./connection-map.json --stack-id 60a1b2c3d4e5f6a7b8c9d0e3
```

**Corresponds to**: `POST /v1/integrations/template/{_id}` (by id), or `POST /v1/integrations/template` (by `--zip`, after a signed-URL upload), with `_stackId` in the body when given. 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")))'`).
* **`--kind` reads the typed catalog, and its entries install differently (celigo-cli 2026.9.6).** The combined catalog carries `docType` (`Template`/`Connector`) but not a template's `type`; `GET /v1/templates/published` carries `type` (`integration` or `mcpserver`), is sorted by name rather than install count, and lists Templates only — so `--kind` cannot be combined with `--include-connectors` or `--type Connector`. An `mcpserver` entry installs with `mcp-servers install-template <id>`, not `templates install`. Since celigo-cli 2026.10.2, `preview` says so on stderr, and `install`'s refusal of one carries a hint naming that command.
* **Each install creates another integration.** An install is never resent after a timeout, a `5xx`, or (since celigo-cli 2026.11.1) a `429`. Look for the new integration with `celigo integrations list` before you install again.
* **`--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. Since celigo-cli 2026.11.2 the ZIP is read before that first request, so a path that cannot be read is refused before any request. Because of that upload, `preview --zip` needs `operate` or `full` mode, unlike `preview <id>`; `install` needs `full` mode either way. See [Profiles & regions](https://developer.celigo.com/cli/getting-started/profiles.md#permission-modes).
* **An `access_restricted` 403 is a plain permission denial.** It is the platform's answer when the account or token cannot use the template routes. Since celigo-cli 2026.10.1, the CLI no longer adds the hint that the action is restricted to the API token's own user to a `templates` read.

## Related

* [integrations](https://developer.celigo.com/cli/commands/integrations.md) — the integration created by `install`.
* [mcp-servers](https://developer.celigo.com/cli/commands/mcp-servers.md) — `mcp-servers install-template <id>` installs the `mcpserver` entries `marketplace --kind mcpserver` lists; `mcp-servers download` produces the ZIP a publisher uploads, and `mcp-servers preview-template --zip` and `install-template --zip` preview and install that ZIP.
* [http-connectors](https://developer.celigo.com/cli/commands/http-connectors.md) — the HTTP connector catalog referenced by many templates.
* [trading-partner-connectors](https://developer.celigo.com/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
