---
title: "CLI and registry publishing"
description: "Generate keys, validate manifests, publish signed releases, and manage the registry."
---

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

# CLI and registry publishing

The plugin CLI signs and publishes releases. The registry reviews them; only
approved, non-yanked releases can be installed.

## CLI commands

Run the CLI with Node's type stripping:

```sh
node --experimental-strip-types packages/plugin-cli/bin/edgecart-plugin.mjs \
  <command>
```

| Command | Purpose |
|---|---|
| `keygen [--out key.json]` | Generate an Ed25519 keypair. The private key is written with `0600` permissions. |
| `validate <manifest.json>` | Parse the manifest and print the plugin id, version, and trust hash. |
| `publish <manifest.json> <bundle.js> --endpoint <url> --api-key <key> --private-key <base64>` | Sign the bundle and POST it to `/v1/releases`. |

The bundle must be one self-contained JavaScript module, at most 10 MiB.

## Publishers

1. In **Admin → Plugin registry**, create a publisher.
2. Paste the base64 SPKI public key from `keygen`.
3. Create a publisher API key. It is shown once; the registry stores only its
   SHA-256 hash.
4. Keep the private key local.

Registry operations require the operator's email in `PLATFORM_ADMIN_EMAILS`.
An unset allow-list fails closed.

## Signing and trust

Releases are signed over:

```text
pluginId@version + trustHash + bundleHash
```

The trust hash is computed over the canonical manifest contract: capabilities,
allowed hosts, storage, hooks, routes, admin/storefront declarations, and
limits. The install consent shows the hash so a merchant can confirm what they
are granting.

Publishing verifies the R2 object's size and SHA-256 before the release becomes
installable.

## Review and lifecycle

- New releases start as `pending`.
- An operator can **approve** or **reject** a release.
- **Yank** is the kill switch: new installs and upgrades are rejected, active
  installations stop receiving hooks, and host calls with tokens signed before
  the yank are rejected.
- **Reinstate** re-checks the per-hook fan-out under the store's control-plane
  lock.
- Upgrades and rollbacks are consented full-release transitions.
- Uninstalling hard-deletes the installation and frees the store/plugin slot.

## Related

- [Build your first plugin](https://edgecart.dev/plugins/quickstart)
- [Plugin manifest](https://edgecart.dev/plugins/manifest)
- [Capabilities and hooks](https://edgecart.dev/plugins/capabilities-hooks)

Source: https://edgecart.dev/plugins/cli-registry/index.mdx
