# CLI

> `dtheo` copies components into your project and checks UI code against the system. It is built for scripts and agents: every command takes `--json`.

## Commands

```bash
npx dtheo init                 # utils, ThemeScope and styles
npx dtheo add button table     # components and what they need
npx dtheo list chart           # search the registry
npx dtheo check src            # design check, exits 1 on errors
npx dtheo rules                # what each check means
npx dtheo mcp                  # MCP config for your editor or agent
```

## Options

| Option | Meaning |
| --- | --- |
| `--registry <url>` | Use another registry (default https://ui.dtheo.dev, or `$DTHEO_REGISTRY`) |
| `--cwd <dir>` | Run against another project directory |
| `--overwrite` | Replace files that already exist (skipped by default) |
| `--dry-run` | Show what would be written |
| `--json` | Machine-readable output |

## Safety

The CLI only reads from the registry, over HTTPS unless the host is local. It refuses absolute paths, `..` segments and anything that would land outside your project, and never runs code it downloads. Dependencies are printed for you to install.
