Browse the docs
CLI
The package is nook-ui and the command is nook. Run it without installing:
npx nook-ui@latest --helpNook picks the package manager from your lockfile (bun.lock, pnpm-lock.yaml, package-lock.json, yarn.lock) and uses it to install dependencies.
nook init
Detects your framework, writes nook.json, installs the tokens and the cn() helper.
nook init
nook init --css src/index.css # when the CSS file cannot be detected
nook init --style soft # start in another style: sharp (default), soft or boldnook add
Installs items and everything they depend on.
nook add button # one component
nook add card dialog tabs # several
nook add theme cobalt # a preset theme
nook add theme nk1_... # a theme code from the customizer
nook add icon arrow-right # an icon
nook add @acme/pricing # an item from another registry
nook add https://example.com/r/hero.json # a direct URLnook list
Shows what the registry offers. Works before init.
nook list
nook list --type themeOptions
| Option | What it does |
|---|---|
--yes, -y | Accepts default answers to questions about choices. It never overwrites files. |
--overwrite | Replaces files that already exist. |
--dry-run | Shows what would happen and changes nothing. |
--cwd <path> | Runs in another folder. |
--no-install | Skips the package manager and prints the command instead. |
--registry <url> | Uses another registry for unprefixed names. |
Safe by default
- Nook always asks before overwriting a file that already exists, and shows which files. In a non-interactive shell it stops and tells you to use
--overwrite. - Files that are already identical are left alone.
- Registry paths are checked, so an item can never write outside your project.
- Packages are installed with an argument list, never through a shell string.
nook.json
{
"language": "ts",
"framework": "next",
"css": "src/app/globals.css",
"aliases": {
"components": "@/components",
"ui": "@/components/ui",
"utils": "@/lib/utils",
"icons": "@/components/icons"
},
"registries": {
"@acme": "https://acme.dev/r/{name}.json"
}
}The aliases must exist in your tsconfig.json or jsconfig.json paths. Choose "language": "js" and Nook writes plain JavaScript with JSX.