Rob Austin - Aug 20, 2025
We’re excited to announce support for Shadcn CLI namedspaced registries and authentication. This means improved API key authentication for our private shadcn registry. You will be able to access all our pro blocks and components from the CLI with an env variable. This will allow usage with MCP servers and and other developer workflows.
The new registry system integrates seamlessly with the new official shadcn CLI and is configured in your projects components.json
file:
{
"registries": {
"@shadcnblocks": {
"url": "https://shadcnblocks.com/r/{name}",
"headers": {
"Authorization": "Bearer ${SHADCNBLOCKS_API_KEY}"
}
}
}
}
Visit your dashboard and navigate to the API Keys section:
Add your API key to your environment variables:
# .env.local (for Next.js)
SHADCNBLOCKS_API_KEY=sk_live_your_api_key_here
Add the registry configuration to your components.json
:
{
"$schema": "https://ui.shadcn.com/schema.json",
"style": "default",
"rsc": false,
"tsx": true,
"tailwind": {
"config": "tailwind.config.ts",
"css": "src/styles/globals.css",
"baseColor": "neutral",
"cssVariables": true
},
"aliases": {
"components": "@/components",
"utils": "@/lib/utils"
},
"registries": {
"@shadcnblocks": {
"url": "https://shadcnblocks.com/r/{name}",
"headers": {
"Authorization": "Bearer ${SHADCNBLOCKS_API_KEY}"
}
}
}
}
Use shadcn to install any block.
npx shadcn add @shadcnblocks/hero125
npx shadcn add @shadcnblocks/pricing3
npx shadcn add @shadcnblocks/features8
Our registry supports multiple authentication methods for maximum flexibility:
curl -H "Authorization: Bearer sk_live_your_api_key" \
https://shadcnblocks.com/r/hero125
curl -H "X-API-Key: sk_live_your_api_key" \
https://shadcnblocks.com/r/hero125
curl "https://shadcnblocks.com/r/hero125?token=your_jwt_token"
API keys are perfect for continuous integration and deployment pipelines:
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Install shadcn components
env:
SHADCNBLOCKS_API_KEY: ${{ secrets.SHADCNBLOCKS_API_KEY }}
run: |
npx shadcn add @shadcnblocks/hero125
npx shadcn add @shadcnblocks/pricing3
- name: Build
run: npm run build
# Dockerfile
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
# Copy source and config
COPY . .
# Install private components during build
ARG SHADCNBLOCKS_API_KEY
ENV SHADCNBLOCKS_API_KEY=$SHADCNBLOCKS_API_KEY
RUN npx shadcn add @shadcnblocks/hero125
RUN npm run build
EXPOSE 3000
CMD ["npm", "start"]
Build with:
docker build --build-arg SHADCNBLOCKS_API_KEY=sk_live_your_key .
Old way:
npx shadcn add "https://shadcnblocks.com/r/hero125?token=your_token"
New way:
npx shadcn add @shadcnblocks/hero125
❌ “Authentication required for pro blocks”
SHADCNBLOCKS_API_KEY
variable name matches exactlysk_live_
❌ “Registry not configured”
components.json
includes the registries
section@shadcnblocks
is defined{name}
placeholder❌ “Invalid API key”
sk_live_
)👉 Generate API Key in Dashboard (Pro users+)