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/cliOr run without installing:
npx @linkage-open/cli initCommands
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 useLINKAGE_API_KEY, orlinkage config set-api-key)-p, --project-id <projectId>project id (or read frompz.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-keyAuthentication
The CLI resolves your API key in this order:
--api-keyLINKAGE_API_KEY~/.linkage/config.json(set withlinkage config set-api-key)
Next
- Define node schemas in Node Registry
- Render your registry in the editor via React SDK