Installation
The canvasmesh CLI publishes to npm as @canvasmesh/cli.
npm install -g @canvasmesh/cli# orpnpm add -g @canvasmesh/cli# oryarn global add @canvasmesh/cliVerify:
canvasmesh --versionJavaScript SDK
Section titled “JavaScript SDK”npm install @canvasmesh/sdk-jsImport and instantiate:
import { CanvasClient } from '@canvasmesh/sdk-js';
const client = new CanvasClient({ apiKey: process.env.CANVASMESH_API_KEY! });The SDK ships both ESM and CommonJS builds and has zero runtime dependencies.
Self-hosted endpoint
Section titled “Self-hosted endpoint”Both the CLI and SDK default to https://api.canvasmesh.app. To point at a different API, pass an endpoint:
new CanvasClient({ apiKey: 'key', endpoint: 'https://api.internal.example.com' });For the CLI, set the endpoint during interactive login or pass it explicitly:
canvasmesh login --token <key> --endpoint https://api.internal.example.comOr update an existing configuration:
canvasmesh config set endpoint https://api.internal.example.com- Authentication — how to get and use an API key.