NudgeUI
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-ui

Global Installation

Or install globally to use the nudge or nudge-ui command anywhere:

npm install -g nudge-ui

Commands

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 --typescript

eject

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-in

list

List all available components and toast types:

npx nudge-ui list

add

Add individual components or stylesheets on-demand:

npx nudge-ui add

NPM 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