Configure your ReUI license key for premium registry installs.
Use this guide when you want to install premium ReUI registry items with the shadcn CLI. Free components do not require a license key, but premium blocks and icons do. Templates are not registry items: download each one from its page in Templates.
Your License Key
Use the license key from your ReUI account:
CLI Installation
This is the recommended setup for premium registry installs.
Prerequisites
A React project with shadcn/ui initialized
Node.js 18 or newer
A components.json file in your project root
Add your license key
Put it in .env.local in the root of your project:
REUI_LICENSE_KEY=your-license-key-here
Point components.json at the @reui registry
Update components.json to use the authenticated @reui registry config:
The shadcn CLI expands ${REUI_LICENSE_KEY} from your environment, so leave it as a variable here. A ReUI MCP server entry is a separate config with its own rules, and they differ by client: Claude Code expands ${VAR} in .mcp.json, Cursor and VS Code only understand the env: prefix (${env:NAME}, and VS Code also takes an ${input:...} prompt), OpenCode uses single braces with no dollar sign ({env:NAME}), Codex reads the value from bearer_token_env_var, and Antigravity's mcp_config.json documents no substitution at all, so there the real token gets pasted in. Check your agent's guide before copying this line across, and create a token at Account → MCP.
Install registry items
Install from the same namespace:
pnpm dlx shadcn@latest add @reui/c-data-grid-1
Free components continue to work with the authenticated config, so you do not need a second registry namespace.
Monorepo (Turborepo)
Installing into a shared package such as packages/ui works the same way, with three things to get right. All three follow from one rule: the CLI reads components.json and .env.local from the directory it runs in, and looks nowhere else.
Put components.json in the package, not the repo root
Every workspace needs its own components.json, and the @reui registry block belongs in the one you install from:
The aliases are what land the files in packages/ui instead of in an app.
Keep the key next to it
The CLI loads .env.local from the directory it runs in and does not walk up to parent folders, so a key kept only in the repo root's .env.local is never seen. That is the Registry "@reui" requires the following environment variables error, and it stops before any request is made:
packages/ui/.env.local
REUI_LICENSE_KEY=your-license-key-here
Run the install from the package
cd packages/uinpx shadcn@latest add @reui/c-data-grid-1
Or stay at the repo root and point the CLI at the package, which is what it suggests itself when run from there:
Running from a directory whose components.json has no @reui block (the root, or an app) is the other way this fails: the CLI falls back to shadcn's public directory entry for @reui, which carries no license header, so reui.io answers You are not authorized to access the item even though the key is set.
Consuming apps then import as usual, and need no license key of their own:
import { DataGrid } from "@workspace/ui/components/reui/data-grid/data-grid"
Prefer shadcn's own monorepo layout, where installs run from apps/web? That works too: put the same registries block and .env.local in apps/web instead. The ui alias still lands the files in packages/ui.
Passing the key from your shell or CI environment instead of the env file,
through a turbo task? Turborepo 2 defaults to strict environment mode, which
hands a task only the variables declared in turbo.json, so add
REUI_LICENSE_KEY to globalEnv there. With the key in
packages/ui/.env.local this does not apply: the CLI reads that file itself,
inside the task.
Manual Copy & Paste
Prefer to browse and copy code directly instead of using the CLI?