CLI
A zero-dependency init helper. It wires the stylesheet imports into your global CSS and prints the remaining setup. Unlike copy-paste generators, it never copies component source into your repo — the components stay in the installed package, so upgrades are a version bump, not a merge.
init
Run it once after installing. It detects your global stylesheet (via components.json or common paths), adds any missing @import / @source lines in the correct order, and prints the font, dark-mode, and router setup.
npx substrateui init
# with the package installed
npx substrateui init
# or point it at a specific stylesheet
npx substrateui init --css src/app/globals.css
# non-interactive (CI, scripts)
npx substrateui init --yesWhat it writes
The command is idempotent — it only inserts lines that are missing, and keeps @import "tailwindcss" first as Tailwind v4 requires:
Added to your global stylesheet.
@import "tailwindcss";
@import "tw-animate-css";
@import "@mikenotthepope/substrateui/styles.css";
@source "../node_modules/@mikenotthepope/substrateui";Options
--css <path> — target a specific stylesheet instead of auto-detecting.
-y, --yes — apply changes without the confirmation prompt.
-h, --help — show usage.