Playground

CLI

Copy components into your project with npx monoline.

Overview

The monoline CLI copies component source and its CSS from the registry into your project, shadcn-style. It is plain Node (20+) with no dependencies.

bash
npx monoline init                  # writes monoline.json, prints the tokens import
npx monoline list                  # all components   (--category forms)
npx monoline info dialog           # description, css, accessibility notes
npx monoline add button dialog     # copy source and CSS into your project

Commands

add <name...>
Copies each component and any component it imports (for example password-input brings input) into src/components/monoline/<name>/, and its stylesheets into src/styles/monoline/. Writes utils/cx.ts when needed. Prints the CSS imports to add and the npm packages to install.
list
Lists components with category, status and description. --category <x> filters.
info <name>
Shows title, category, status, import line, primitive, stylesheets and accessibility notes.
init
Writes monoline.json (component and style folders) and prints the token imports. Refuses if the file exists unless --overwrite.

Options

--registry <path|url>
Registry folder or URL. Default is the GitHub master registry. A local checkout works: --registry ./registry.
--dir <path>
Component folder. Default src/components/monoline.
--styles <path>
CSS folder. Default src/styles/monoline.
--overwrite
Replace files that already exist. Without it, add refuses and lists the clashes.
--dry-run
Print what would be written; write nothing.
--cwd <path>
Project root. Default: the current folder.

monoline.json stores components, styles and optionally registry; flags win over it.

Example

bash
npx monoline add dialog --dry-run
npx monoline add dialog
npm i radix-ui   # the command prints the exact packages

The CSS files assume the tokens are loaded: npm i @monoline/css and import tokens.css, base.css and accents.css once (init prints the lines). Only use registries you trust: the CLI writes whatever source the registry serves.