create-imola-kit
v0.6.10
Published
Scaffold a new project from the Imola Kit Pro template.
Downloads
1,404
Readme
create-imola-kit
Interactive CLI to scaffold a new project from the Imola Kit Pro template, with optional per-organization branding (logo, favicon, theme color palette, legal PDFs).
Usage
npm create imola-kit@latest my-app
# or
npx create-imola-kit my-appThe CLI asks:
- Project name — used as the folder name and
package.json#name. - Auth provider —
CUSTOM,AUTH0,CLERK,COGNITO,SUPABASE,KEYCLOAK, orNONE. The runtime strategy is set inappConfig.authStrategy; all provider folders ship in the codebase so you can switch later by editing one value. - Organization branding (after clone, only if the template has
public/orgs/) — pick one of the discovered organizations or keep the Imola defaults.
What it does:
git clone --depth 1 https://imola.ghe.com/applications/imola-kit-pro.git <name>(needs network + auth to GHE).- Removes the cloned
.gitso the new project starts clean. - Updates
package.json(name,version,private). - Updates
src/config/app.ts(name,primaryColor,authStrategy). - If an organization was selected:
- Reads its
public/orgs/<slug>/meta.json(name + 11-tone palette). - Appends
export const <themeKey>tosrc/styles/theme/colors.tswith the 50–950 scale. - Inserts a
<themeKey>entry into theprimarySchemesregistry ofsrc/styles/theme/color-schemes.ts. - Adds
"<themeKey>"to thePrimaryColorunion insrc/styles/theme/types.d.ts. - Sets
appConfig.primaryColor = "<themeKey>". - Replaces
public/favicon.ico,public/assets/Imola.png,logo-short.*,icon.*,palette.htmlwith the org's assets. - Updates the 6 source files that referenced
/assets/Imola.pngto point at the new logo and uses the org's name asalt. - Copies legal PDFs (
eula,privacy,sla,ai-policy,third-party) intopublic/legal/.
- Reads its
- Deletes the
public/orgs/folder entirely so the generated project doesn't ship branding for other orgs.
Organization meta.json schema
Each public/orgs/<slug>/meta.json should look like:
{
"name": "AroraCyber",
"slug": "aroracyber",
"themeKey": "aroraBlue",
"palette": {
"50": "#edf4ff",
"100": "#ddebff",
"200": "#cbe0ff",
"300": "#b2d1ff",
"400": "#4b94ff",
"500": "#1d79ff",
"600": "#0058d8",
"700": "#0043a5",
"800": "#002459",
"900": "#00183b",
"950": "#001026"
}
}themeKey is the identifier injected into colors.ts and the PrimaryColor union — keep it camelCase, e.g. aroraBlue, cloudBlue, omegaRed.
The folder layout the CLI consumes:
public/orgs/<slug>/
├── meta.json ← required (display name + palette)
├── favicon.ico ← required for favicon swap
├── logo.svg | logo.png ← required (svg preferred)
├── logo-short.* ← optional
├── icon.png ← optional (falls back to logo)
├── palette.html ← optional reference doc
└── legal/
├── eula.pdf
├── privacy.pdf
├── sla.pdf
├── ai-policy.pdf
└── third-party.pdfAdding a new organization
- Create
public/orgs/<slug>/in the template repo (imola-kit-pro). - Drop the logo, favicon, icon, palette.html and legal PDFs in.
- Write
meta.jsonwith the brand name, slug, themeKey, and 11-tone palette extracted from your palette.html (--<token>-050through--<token>-950). - Commit and push. Next
npm create imola-kit@latest …run will pick it up automatically — no CLI republish needed.
Development
npm install
npm run build # compiles src/ to dist/
node dist/index.js # run it locallyIterate without committing:
npm link # exposes `create-imola-kit` globally on this machine
create-imola-kit
npm unlink -g create-imola-kit # cleanupPublishing
The package is named create-imola-kit so npm create imola-kit (and npm init imola-kit) resolve to it.
npm version patch # or minor / major
npm publish --access public --otp=... # npmjs.org requires 2FA on publishprepublishOnly runs npm run build automatically.
Roadmap
- [ ]
--yesflag with sensible defaults for CI / non-interactive runs. - [ ] Run
npm installautomatically at the end (behind a--installflag). - [ ] Validate
meta.jsonpalette completeness before injection (warn on missing tones).
