---
title: 'cratis extension vendor: copy locked extension packages for air-gapped use'
editUrl: https://github.com/Cratis/cli/edit/main/Documentation/reference/extension-vendor.md
description: Copy every package pinned in screenplay.lock, with its signature, to a local folder or private OCI registry so restores work without public registries.
lastUpdated: 2026-11-14T00:00:00.000Z
---


`cratis extension vendor` copies the packages [`screenplay.lock`](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/extension-contracts.md#the-lock) pins to a place you control,
for deployments that cannot reach the registries the references name. See
[Manage extension packages](/cli/reference/extension/) for references, credentials and [trust](/cli/reference/extension/#trust).

```bash
cratis extension vendor <DESTINATION> [--root <PATH>] [--source <FOLDER|oci://HOST/PREFIX>]
```

## What it does

Every entry of the lock is fetched, then verified against what the lock pins: the digest, the contract hash, a valid signature,
an allowed publisher. Only then is it copied. A package that is unsigned or has changed is not copied, and the command fails.
A reference in the model that the lock does not pin fails with `NotLocked`; the locked ones are still copied. Run
[`cratis extension restore`](/cli/reference/extension-restore/) first.

`<DESTINATION>` is one of:

| Destination | Result |
| --- | --- |
| A folder | One folder per package, named by its digest with `:` as `-`: `contract.extension` (the file the compiler reads), `package.json` (the reference, version, digest and signature) and `parts/` (the artifact: manifest, config and layers, or the npm tarball). |
| `oci://HOST/PREFIX` | The artifact and its signature pushed to your registry at `PREFIX/<repository path>`, so `ghcr.io/cratis/extension-stripe` becomes `HOST/PREFIX/cratis/extension-stripe:<version>`. The manifest is copied byte for byte, so the digest is unchanged. npm packages vendor to folders only. |

Registry credentials for the destination come from `cratis config` under the destination's host, like any other
[registry](/cli/reference/extension/#registry-credentials).

## Restoring from the copy

```bash
cratis extension vendor ./vendor
cratis extension restore --locked --source ./vendor
cratis extension restore --locked --source oci://registry.internal/mirror
```

A restore from the copy re-verifies the signature and the allow-list from the copy alone, and does not contact the original
registry. The digest is the lock's digest, so the copy is accepted only when it is the package the lock pinned.

To make the compiler read the packages with no restore at all, vendor into the `extensions` folder beside the lock:

```bash
cratis extension vendor ./Model/extensions
```

The compiler reads contracts from that folder before the user cache. [Commit it](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/extension-contracts.md#the-cache-vendoring-and-restore) if the deployment builds from the repository.

## Example

```text
$ cratis extension vendor ./vendor
vendored   cratis/stripe 2.3.1 sha256:5b0c…e1
vendored   npm:@acme/charts 1.2.0 sha256:91af…07
```

## Exit codes

The [shared codes](/cli/reference/extension/#exit-codes) apply.

## Related

- [`cratis extension restore`](/cli/reference/extension-restore/) with `--source` restores from the copy.
- [`cratis extension update`](/cli/reference/extension-update/) moves the pins you then vendor.
- [Extension contracts](https://github.com/Cratis/Screenplay/blob/main/Documentation/screenplay/extension-contracts.md) describes the lock and the compiler's cache.
