Skip to content
Esc
↑↓navigate↵open⌘Jpreview
On this page

Getting started

Set up Dex in a new or existing project and have your agent work through your first comment.

This page takes you from an empty folder, or an existing React project, to an agent working through your comments. Get started on the Recents page tracks the same steps.

You need Node 20.12 or newer, a React project and git. Dex is the @dexhq/canvas package on npm, and its command is dex.

Set up with your agent

To have your coding agent do the setup, copy this prompt into it. It runs the steps below and tells you what it found.

Set up Dex, the prototyping studio (npm: @dexhq/canvas), in this project.

  1. From the project root, run `npm create dex@latest -- --yes --agent <id>`, with your own id from `npx @dexhq/canvas create --help`. If you aren't listed, use `--agent none`, then add Dex's MCP server to your own config: `npx --package=@dexhq/canvas dex mcp --root <the studio folder setup made>`.
  2. Start Dex in the background with `npm run dex` and give me its link.
  3. Tell me what setup found, and what I need to restart so you can read my comments through Dex's MCP server.

Change only the files setup writes. If setup stops, tell me why.

1. Set up by hand

To start a new project:

npm create dex@latest my-app cd my-app npm run dex

create asks which starter to use and which agents to connect. Every starter is shadcn on Base UI:

--template What you get
vite (default) A Vite and React app in src/, with the studio in studio/.
standalone The studio and the components, with no app. For design teams without an app repository.
turborepo apps/web, the components in packages/ui, and the studio in apps/studio. Start it with bun run dex.

To add Dex to an existing project, run this from its root:

npm create dex@latest npm run dex

Run dex commands from the folder with dex.config.ts. In a monorepo, that’s the studio’s own package, such as apps/studio.

create shows the components, styles and agents it found, asks you to confirm them, and shows every file it will write before it writes anything. It never overwrites your files. Run it again later and it changes only what differs from what this version writes. Every question has a flag, listed in the CLI reference. Run npx dex doctor to check the setup at any time.

2. Check who you are

Dex puts your name on your files and comments. It reads it from your GitHub CLI account (gh auth login) or your git user, so there’s nothing to set up. To add a teammate by hand:

npx dex contributor --name "Ana Designer" --git "Ana Designer" --discipline product

3. Connect your agent

create registers Dex’s MCP server for the agents you confirmed, such as .mcp.json for Claude Code and .cursor/mcp.json for Cursor. To add one later, run npx dex agents add <agent>, or use Settings → MCP connection.

To open your agent, use the agent bar at the bottom right of the canvas. Claude Code opens listening, so new comments reach it as you post them. For any other agent, ask it to watch the studio.

4. Write guidelines

Open Guidelines in the sidebar and write what your agent can’t learn from the design system: who you design for, your quality bar, and decisions already made. See Guidelines.

5. Create a file

Click New file on the Recents page, or ask your agent. The file opens on its canvas as Untitled. Click the title to rename it.

6. Review it with your agent

On the canvas, press C, click anything in a frame, write a comment and choose Post to agent. If your agent isn’t listening already, ask it:

Watch the studio for feedback and work through it.

The agent marks the comment 👀 when it takes it and ✅ when it’s done, with a line on what changed. See Comments and agents.