CLI
Kevlar ships a CLI for scaffolding projects and initializing component files.
npx kevlar --helpKevlar -- Component scaffold for Mantine v9
Usage:
kevlar init Scaffold kevlar/ into current project
kevlar create <name> Create new Next.js project with Kevlar
kevlar --help Show this help
Every component. Every state. Every target. Every decision. Filled or it throws.npx kevlar init
Scaffolds the kevlar/ directory into your current project. Copies all templates (design config, 9 base components, 108 component files, and the index re-export) into a kevlar/ folder at your current working directory.
cd my-existing-project
npx kevlar initThis command will fail if a kevlar/ directory already exists. Remove it first if you want to re-initialize.
Created folder structure
kevlar/
design.config.ts # Your design language
index.ts # Re-exports everything
base/
BaseInteractive.tsx # Buttons, action icons, anchors
BaseInput.tsx # Text inputs, selects, sliders
BaseOverlay.tsx # Modals, drawers, popovers
BaseMedia.tsx # Images, avatars
BaseNavigation.tsx # Tabs, breadcrumbs, pagination
BaseFeedback.tsx # Notifications, alerts, progress
BaseStatic.tsx # Text, badges, dividers
BaseContainer.tsx # AppShell, grid, scroll area
BaseDisclosure.tsx # Accordion, collapse, spoiler
components/
Button.tsx # 108 component files
TextInput.tsx
Modal.tsx
Image.tsx
...Every file is full of MUST_BE_DEFINED sentinel markers. Your job is to replace each one with a conscious decision.
npx kevlar create my-app
Creates a new Next.js project with Mantine v9 and Kevlar pre-configured in one command.
npx kevlar create my-appThis runs three steps:
npx create-next-app@latestwith TypeScript, Tailwind, ESLint, App Router, and src directorynpm install @mantine/core @mantine/hooks @unlikefraction/kevlarkevlar initinside thesrc/directory
After creation:
cd my-app
npm run devThe command will fail if a directory with the given name already exists.
Next steps after scaffolding
- Open
kevlar/design.config.tsand fill in your breakpoints, sensory budgets, and design tokens - Work through
kevlar/base/*.tsx— replace everyMUST_BE_DEFINEDwith your project’s decisions - Start using components:
import { Button } from './kevlar'
Every MUST_BE_DEFINED is a question. Answer them all.