---
title: Getting started
description: Seven steps from an empty project to an agent working through your comments.
---

**Settings → Setup** has the same steps as a checklist, each ticked once it is done.

You need Node 20.12 or newer, a React project and git.

The studio is the `@dexhq/canvas` package on npm, and its command is `dex`. `npm create dex@latest` sets it up (`pnpm create dex`, `yarn create dex` and `bun create dex` do too), installing it into your project as a dev dependency; flags go after `--`. Without `create`, `npx @dexhq/canvas create` is the same.

## 1. Set up

**A new project.** One command makes the shadcn starter (a Vite + React app with shadcn on Base UI, in the Vega style with Hugeicons, and every component the studio's own interface uses), the studio set up on those components, and a first file:

```sh
npm create dex@latest my-app
cd my-app
npm run studio
```

In a terminal it asks which project to start (`--template` chooses without asking) and which agents to connect, with none ticked (`--agent`; without a terminal, Claude Code). All three projects are shadcn on Base UI:

| `--template` | What you get |
| --- | --- |
| `vite` (the default) | A Vite + React app in `src/`, with the studio beside it in `studio/`. |
| `standalone` | The studio on its own, with the components and no app, for design teams without an app repository. |
| `turborepo` | A Turborepo on Bun workspaces (or `--pm`): `apps/web`, the components as a shared package `packages/ui` (`@workspace/ui`), and the studio in its own app, `apps/studio`. Start it with `bun run studio` from the root (with `--pm`, that package manager's `run studio`). |

**An existing project.** From its root:

```sh
npm create dex@latest
npm run studio
```

`create` shows what it found (your components, global styles, any DESIGN.md and your agents, and where it read each), asks you to confirm them and how DESIGN.md starts (a draft from your design system, a link to yours, an import, or empty), and shows its plan before it writes anything: `dex.config.ts` (the choices made, and nothing your project's files already say), a `studio/` folder with a `tsconfig.json` that extends yours (in a monorepo, its own app or a folder in your app), one `studio` script in `package.json`, your agents' configs and a pointer in your `AGENTS.md`. Your `.gitignore` gets two lines, for the studio's own state and its comments' temporary files, and your tsconfig is left as it is. Codex keeps its config per person, so for Codex it asks first. It never overwrites a file of yours, and stops if the studio folder has an `AGENTS.md` it did not write. Run it again in a set-up repo and it plans only what differs from what this version writes (a smaller config, a missing file, the install), and changes that once you say go ahead: a second run changes nothing. For an agent or CI, `--yes` (or no terminal) takes what it found, and every question has a flag ([CLI](/docs/cli)). The studio is one versioned package: update it and everything updates with it ([Upgrading](/docs/upgrading)). Settings are all in `dex.config.ts` ([Configuration](/docs/configuration)). Check the setup any time with `npx dex doctor`.

## 2. Who you are

Your name goes on your files and comments. Dex knows you from the GitHub CLI's account (`gh auth login`) or your git user name (`git config user.name`), so there is nothing to set up: whoever runs `create` is added then, and anyone else is added the first time they make something, such as a file or a comment. Your GitHub account decides first, then your git email, then your git name; since two people can share a name, someone whose git name is a contributor's but whose GitHub account is another is added as someone new. To add someone by hand:

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

## 3. Connect your agent

Your agent reads and answers comments through the studio's MCP server. `create` registers it for the agents you confirm: Claude Code in `.mcp.json`, Cursor in `.cursor/mcp.json`, and so on (`npx dex agents add <agent>`, or **Add MCP config** in the studio, adds one later). In the studio, **Connect your agent** then opens it for you: **Open <agent>** starts it in a Terminal window where agents start, and **Open terminal here** opens a plain one (away from a Mac, each gives the command to copy). Claude Code opens listening, so new comments reach it as they are posted; ask any other agent to watch the studio. Turn on **Make <agent> my default agent**, and wherever you ask an agent while none is connected (a comment, a pull request, a git step to fix), the studio offers to open it. Your default is kept in `~/.config/dex/preferences.json`, not in the project. For other agents, add the server once:

```sh
claude mcp add dex -- npx --package=@dexhq/canvas dex mcp
```

## 4. Write guidelines

Open **Settings → Guidelines**, under Workspace, and write what your agent cannot learn from the design system: who you design for, the bar, decisions already made. These are the workspace guidelines, kept in `DESIGN.md`. Each file can add its own, and you can keep your own for your agents. See [Guidelines](/docs/guidelines).

## 5. Create a file

Click **New file** on the Recents page, or ask your agent. **New file** opens the canvas of a file called Untitled. Its folder in `files/` is an id, such as `f-3k7q9x2m`, that never changes: rename the file from its title on the canvas, and only the title in its `prototype.json` changes, so its links stay and two people's new files never share a folder.

## 6. Review it with your agent

On the canvas, choose **Comment** (C), click anything in a frame and **Post to agent**. Then ask your agent:

> Watch the studio for feedback and work through it.

It picks up each comment (👀 shows it is taken), makes the change, and resolves it with what changed (✅). See [Comments and agents](/docs/comments-and-agents).

## 7. Work as a team (optional)

A cloud workspace shares comments across everyone's studio and agents. See [Cloud workspaces](/docs/cloud-workspaces).

```sh
npx dex cloud link --workspace <slug>
```
