Jolocky provides community open-source sections under the MIT license and exclusive award-winning blocks for Pro members. To protect creator intellectual property while maintaining a frictionless developer experience, Jolocky uses token-based registry authentication.
How Authentication Works#
When you install a Pro section, the registry CLI sends an HTTP GET request to https://jolocky.com/r/[slug].json.
For Pro sections, the endpoint expects a bearer token containing your license key:
GET /r/golden-hour.json HTTP/1.1
Host: jolocky.com
Authorization: Bearer JOLOCKY-PRO-XXXX-XXXXThe authentication pipeline executes the following checks:
- Format Validation: Checks that the key matches the standard Jolocky license format.
- Database Verification: Queries the PostgreSQL database to verify that the license exists, is marked active, and has not passed its 365-day expiration date.
- Rate Limiting: Enforces abuse protection via Redis, allowing up to 120 requests per minute for authenticated Pro members while throttling suspicious scrapers.
- Access Logging: Records the section access event in
cli_logsfor your review in your Member Dashboard.
Passing Your Token#
There are three ways to authenticate the CLI:
1. Command Line Flag#
Pass the --token flag directly when running the command:
pnpm dlx shadcn@latest add https://jolocky.com/r/golden-hour --token JOLOCKY-PRO-XXXX-XXXX
2. Environment Variable#
Export SHADCN_TOKEN in your terminal shell or .bashrc / .zshrc:
export SHADCN_TOKEN="JOLOCKY-PRO-XXXX-XXXX"
npx shadcn@latest add https://jolocky.com/r/golden-hour3. Namespace Configuration in components.json#
Embed the environment variable in your components.json:
{
"registries": {
"@jolocky": {
"url": "https://jolocky.com/r/{name}.json",
"headers": {
"Authorization": "Bearer ${JOLOCKY_LICENSE_KEY}"
}
}
}
}Managing Your License#
You can check your remaining subscription days, reveal your license key, or revoke a compromised token at any time inside the Member Dashboard.