Linkage LogoLinkage Docs

CLI

Scaffold a Linkage integration and upload a node registry

The Linkage CLI (@linkage-open/cli) helps you scaffold a frontend integration and upload a node registry (schemas + node definitions) to Linkage.

Installation

npm install -g @linkage-open/cli

Or run without installing:

npx @linkage-open/cli init

Commands

init

Scaffold a frontend-only Linkage integration (React SDK + example registry.ts).

linkage init [dir]

Options:

  • -n, --name <name> repository name
  • -m, --package-manager <bun|npm> package manager to use

linkage init also generates pz.json (used by linkage upload) with your projectId.

upload

Upload a node registry file (JSON-serializable node schemas + definitions).

linkage upload <registry.(json|ts|js)>

Options:

  • -k, --api-key <apiKey> API key (or use LINKAGE_API_KEY, or linkage config set-api-key)
  • -p, --project-id <projectId> project id (or read from pz.json)

Examples:

# Upload the default registry created by `linkage init`
linkage upload ./registry.ts

# Explicit project id
linkage upload ./registry.ts --project-id <projectId>

config set-api-key

Store your API key locally (recommended).

linkage config set-api-key [api-key]

If you omit the key, the CLI prompts interactively. The key is stored in ~/.linkage/config.json.

config remove-api-key

Remove the stored API key.

linkage config remove-api-key

Authentication

The CLI resolves your API key in this order:

  1. --api-key
  2. LINKAGE_API_KEY
  3. ~/.linkage/config.json (set with linkage config set-api-key)

Next