Skip to content

Installation

The canvasmesh CLI publishes to npm as @canvasmesh/cli.

Terminal window
npm install -g @canvasmesh/cli
# or
pnpm add -g @canvasmesh/cli
# or
yarn global add @canvasmesh/cli

Verify:

Terminal window
canvasmesh --version
Terminal window
npm install @canvasmesh/sdk-js

Import 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.

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:

Terminal window
canvasmesh login --token <key> --endpoint https://api.internal.example.com

Or update an existing configuration:

Terminal window
canvasmesh config set endpoint https://api.internal.example.com