Preset Templates
Preset templates are pre-configured combinations of registries for quickly initializing specific types of projects.
What Are Templates?
Preset templates package a set of commonly used registries together to form complete project templates. Using templates allows you to install all required registries at once without adding them individually.
# Without template - bootstrap from a single registry, then add the rest
rk init -t runtimes/node -n my-project
cd my-project
rk add quality/eslint
rk add quality/prettier
rk add testing/vitest
rk add build/typescript
# With template - done in one step
rk init -t @presets/node -n my-projectUsing Templates
Initialize Project
rk init -t @presets/nodeSpecify Project Name
rk init -t @presets/node -n my-projectCI Mode
Skip interactive prompts in CI environments (--ci requires an explicit -n).
rk init -t @presets/node -n my-project --ciCreating Templates
1. Create preset.json
{
"$schema": "https://registry.rackjs.com/schemas/preset.json",
"name": "my-preset",
"version": "1.0.0",
"description": "My custom preset",
"author": "Your Name",
"tags": ["custom", "preset"],
"registries": [
"runtimes/node",
"quality/eslint",
"testing/vitest",
"build/typescript"
]
}2. Directory Structure
my-presets/
└── my-preset/
└── preset.json3. Deploy Template
The CLI fetches presets at {host}/presets/{name} (single-segment name, no /preset.json suffix, no namespace segment).
Recommended: @rack/registry-server
Use Registry Server directly — it has a built-in /presets/... route and uploads land at the correct path automatically.
Self-hosted static file server
Place preset.json at the matching path and configure a rewrite so /presets/my-preset returns the preset.json JSON content.
# Static server root layout
https://registry.company.com/
└── presets/
└── my-preset/
└── preset.json # Served at URL: /presets/my-presetActual URL the CLI requests
https://registry.company.com/presets/my-preset4. Configure and Use
# Configure private source
rk config set @mypresets --url https://registry.company.com
# Use custom template
rk init -t @mypresets/my-preset
