DocsCLI Reference
CLI Reference
Use the nudge-ui CLI to scaffold, configure, and eject components.
Quick Run (Recommended)
Run the interactive setup wizard directly with npx without installing anything:
npx nudge-uiGlobal Installation
Or install globally to use the nudge or nudge-ui command anywhere:
npm install -g nudge-uiCommands
init
Scaffold Nudge UI into your existing React, Next.js, or Vanilla JS project:
npx nudge-ui init
# Available Flags:
# --style css|tailwind Choose default style mode (default: auto-detected)
# --typescript Add TypeScript support (.ts/.tsx)
# --dir <path> Custom component folder (default: components/toaster)
# --yes Skip all prompts and use smart defaults
# Example:
npx nudge-ui init --style tailwind --typescripteject
Eject the complete ToasterCore engine into your project as editable source:
npx nudge-ui eject
# Copies ToasterCore, ToastContainer, ToastItem, and useToaster
# You own 100% of the source code with zero external lock-inlist
List all available components and toast types:
npx nudge-ui listadd
Add individual components or stylesheets on-demand:
npx nudge-ui addNPM Publishing Guide
If you are maintaining or deploying your own version of the CLI to npm:
# 1. Enter the CLI directory
cd nudge-ui
# 2. Login to npm
npm login
# 3. Publish to npm registry
npm publish --access public