Primitiv

Install

Get Primitiv running in three commands.

Install

npm install @ai-by-design/primitiv

1. Initialize your project

Run init in your project root:

npx @ai-by-design/primitiv init

Primitiv detects your framework (Next, Nuxt, Astro, SvelteKit, Remix, Expo, Qwik, Vite, Solid, or React), TypeScript, Tailwind, Figma token files, and Storybook automatically and generates a tailored primitiv.config.js.

init also writes a project-scoped MCP config (.mcp.json or .cursor/mcp.json), refreshes a Primitiv block in AGENTS.md and CLAUDE.md so Claude Code, Cursor, and other MCP-compatible tools pick up the server automatically, installs a verify --strict CI workflow on GitHub repos, and drops a /build-component skill for Claude Code.

2. Build your contract

npx @ai-by-design/primitiv build

This scans your sources, resolves conflicts, lints for token misuse, and writes primitiv.contract.json.

3. Start the MCP server

npx @ai-by-design/primitiv serve

From this point, every agent that builds UI in your codebase calls get_design_context first, then get_violations before generating any literal values — and gets your resolved design contract back.

On this page