Install with the CLI
Add any Dot component with one command. It saves the file to your project and installs the packages it needs.
Set up the CLI (once per project)
Run this in your project folder and accept the defaults. Skip it if your project already has a components.json file.
$ npx shadcn@latest initAdd a component
No account needed for free components. The file is saved to components/dot/. Every component page has its own command under CLI.
$ npx shadcn@latest add @dot/ascii-footer# using pnpm, yarn or bun:
$ pnpm dlx shadcn@latest add @dot/ascii-footer$ yarn dlx shadcn@latest add @dot/ascii-footer$ bunx --bun shadcn@latest add @dot/ascii-footerPro components (only if you have Pro)
Skip this if you only use free components. For Pro ones you need a Pro plan and an API token. Set it up once per project:
a. Create a token in Account → API tokens and paste it into .env.local. Keep this file out of git.
DOT_API_TOKEN=dot_live_your_token_hereb. Add these lines to components.json, next to what's already there. The token is read from .env.local, so it never ends up in this file.
{
"registries": {
"@dot": {
"url": "https://bydot.co/r/{name}.json",
"headers": { "Authorization": "Bearer ${DOT_API_TOKEN}" }
}
}
}c. Add Pro components the same way as free ones. From now on every @dot install in this project uses the token, free ones too, so keep it set.
$ npx shadcn@latest add @dot/<component-name>Asked for environment variables? DOT_API_TOKEN is missing from .env.local. Told you're not authorized? The token was revoked or your plan isn't Pro.
Using an AI editor? Connect Dot MCP and just ask for a component. It uses the same API token.