Requirements
- Node.js 22.13 or newer.
- npm, pnpm, Yarn or Bun.
- A browser on the machine, for signing in and for
clayzo preview. - For playback on your site: a browser with WebGL2, which is every current browser.
The initializer
Then it runs
npx skills add clayzo/agent-skills to install the two Clayzo skills for your agent.
Interactively it asks three questions: whether to also install @clayzo/canvaskit-player for full-fidelity playback, whether to install the skills, and whether to install the CLI for your whole machine so every project can use it. Without a terminal, or with --yes, it takes the defaults, which add the CLI to the project as a dev dependency.
If the machine-wide install fails, for example because npm can’t write to its global folder, the initializer adds the CLI to the project instead and says so.
The initializer prints the commands it runs, then a JSON summary on stdout.
Installing by hand
@clayzo/webgl-player for @clayzo/canvaskit-player if you want the full-fidelity player. See Choosing a renderer.
To install the CLI once for your machine instead of in each project, replace the dev dependency with:
iOS and macOS
Native playback in Swift apps is a Swift package, not an npm package. Addhttps://github.com/Clayzo/clayzo-swift in Xcode and play the same documents and bundles the CLI produces. See iOS and macOS.
Versions
All Clayzo packages are released together and share one version number, the Swift package included. Install matching versions and upgrade them together. When the CLI on your machine, your project’s Clayzo packages or the agent skills fall behind the current release, every command says so in one line on stderr. One command updates all of them:CLAYZO_VERSION_UNSUPPORTED error and the command to run.
Running the CLI
With the CLI installed for your machine, run it from anywhere:npx clayzo, which works either way: it runs the project’s CLI when the project has one, and the one installed for your machine otherwise. With pnpm, pnpm clayzo works too, and npx clayzo@latest runs the newest release without installing it.
A project that has clayzo as a dev dependency keeps its version. The CLI installed for your machine hands preview, render-frame, review, package and export to the project’s CLI, so everyone working on the project, and its CI, renders with the same version.
