@nateui/cli 0.0.0-stage → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,25 @@
1
- # Temporary Holding Version
1
+ # @nateui/cli
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ The CLI for [NateUI](https://nateui.com). Creates template starters and adds NateUI components, Blocks and template pages to your project as source code.
4
+
5
+ ```bash
6
+ npx @nateui/cli@latest <command>
7
+ ```
8
+
9
+ Run it from your project root. Pro components and template pages use the access on your NateUI account; the CLI asks you to sign in with your purchase email when needed.
10
+
11
+ ## Commands
12
+
13
+ | Command | What it does |
14
+ | --- | --- |
15
+ | `login` | Sign in with your NateUI account email |
16
+ | `init --nextjs\|--vite <folder>` | Create a new app with NateUI set up |
17
+ | `init-template --<template> <folder>` | Create a starter from a template (`--crm`, `--project-management`, `--sales-inventory`, `--ai-chat`) |
18
+ | `list` | List components and Blocks; `list --template <name>` lists a template's pages |
19
+ | `describe <name>` | Show details for a component or Block |
20
+ | `add <name>` | Add a component or Block, e.g. `add button` or `add blocks/ai-chat-box` |
21
+ | `add-page --<page> --<template>` | Add a template page, e.g. `add-page --contacts --crm` |
22
+ | `remove-page --<page>` | Remove a page added with `add-page` |
23
+ | `skill` | Install the NateUI agent skill for your AI coding tool |
24
+
25
+ Full guide: [nateui.com/docs/templates/cli](https://nateui.com/docs/templates/cli)
@@ -0,0 +1,44 @@
1
+ # Generated tree
2
+
3
+ Base tree produced 2026-09-04 with:
4
+
5
+ ```bash
6
+ npx create-next-app@latest nateui-next --typescript --app --src-dir --import-alias "@/*" --tailwind --no-eslint --turbopack --use-pnpm --skip-install
7
+ ```
8
+
9
+ create-next-app version resolved at generation time: 16.3.4 (`next` itself is pinned down to `16.2.6` in `package.json` afterward, per `code/package.json`).
10
+
11
+ Flags beyond the work order's base command, and why:
12
+ - `--tailwind` — gets a correct `postcss.config.mjs` + `@tailwindcss/postcss` devDependency for free; `globals.css` it writes is deleted and replaced by our copied stylesheet regardless.
13
+ - `--no-eslint` — the target file manifest (`m2-packaging.md` §2) has no ESLint config; omit it at the source instead of stripping after.
14
+ - `--turbopack` — current create-next-app default; only affects the `dev` script flag, not the file set.
15
+ - `--use-pnpm` — makes the generator emit a `pnpm-workspace.yaml` (later overwritten with the proven `template-base` fix — see below) and stamp `packageManager` (dropped; not in the target manifest).
16
+ - `--skip-install` — no need to install into the scratch dir; the real install happens in the throwaway acceptance-test copy.
17
+
18
+ ## Kept from the generator as-is
19
+ `.gitignore`, `next-env.d.ts`, `next.config.ts` (byte-identical to `template-base`'s), `postcss.config.mjs` (also byte-identical to `template-base`'s), `tsconfig.json` (already clean — no `@/configs/*` CRM paths, no `useMenuActive` include; those only exist in `template-base`'s hand-edited `tsconfig.json`, which is why the work order says not to copy that file).
20
+
21
+ ## Hand-written, not from the generator
22
+ `package.json` (dependency versions pinned from `code/package.json`, not the generator's auto-resolved latest), `pnpm-workspace.yaml` (see below), `src/app/layout.tsx`, `src/app/page.tsx`, `src/styles/base.css` + `src/styles/index.css` (copied, see the two notes below).
23
+
24
+ ## Stripped from the generator's output
25
+ `AGENTS.md`, `CLAUDE.md`, `README.md` — current create-next-app scaffolds agent-instruction files and a generic README by default; none are in the target manifest and shipping an agent-instruction file inside a buyer's fresh app is actively wrong. `src/app/globals.css`, `src/app/favicon.ico`, `public/*.svg` — generator branding/demo content. `.git/` — the generator initializes a repo in the scratch dir; irrelevant, not copied.
26
+
27
+ ## pnpm-workspace.yaml note
28
+ The work order and `m2-packaging.md` both say to use a key named `onlyBuiltDependencies`. That key does not appear anywhere in this repo and current `create-next-app --use-pnpm` does not write it either — it writes `allowBuilds: { sharp: false, unrs-resolver: false }`. `template-base`'s own `pnpm-workspace.yaml` (the file the spec cites as prior precedent for this exact bug) carries that plus `ignoredBuiltDependencies: [sharp, unrs-resolver]`. This chassis copies `template-base`'s proven content verbatim rather than the spec's literal (and apparently stale) key name. Flagged in the report back to the orchestrator.
29
+
30
+ ## src/styles/index.css note
31
+ The work order and `m2-packaging.md` §1 both say `index.css` comes from `code/templates/template-base/typescript/nextjs/src/styles/` alongside `base.css`. That path has no `index.css` — only `base.css` lives there. `index.css` actually lives per-domain, at `code/templates/domains/<slug>/typescript/nextjs/src/styles/index.css`. It is byte-identical across `crm`, `project-management`, and `sales-inventory`; `ai-chat`'s carries extra CodeMirror syntax-color tokens on top (chat-specific, not core). Copied from `crm`'s, matching the path `m2-packaging.md`'s own Sources section cites. Flagged in the report back to the orchestrator.
32
+
33
+ ## @tailwindcss/typography — added, not in `m2-packaging.md`'s pinned-7 list
34
+ `base.css` line 2 is `@plugin "@tailwindcss/typography";` — copied verbatim per the "never re-authored" rule, so the package it names must be a real dependency or `pnpm build` fails to resolve the plugin. `code/package.json` doesn't pin it (it isn't ecosystem source, it's Tailwind tooling). Version `^0.5.19` taken from `code/templates/domains/crm/typescript/nextjs/package.json` — the freshest real install of this exact package in the repo. `@tailwindcss/postcss` and `tailwindcss` both `^4`, matching what `create-next-app --tailwind` itself resolved.
35
+
36
+ ## "use client" — real finding, not a chassis-only quirk
37
+ `src/app/page.tsx` needs `"use client"` at the top. Without it, `next build` fails: `Button` → `ConfigProvider.ts` / `InputGroup/context.ts` both call `createContext`/`useContext`, and App Router treats every file as a Server Component by default — `createContext` is Client-Component-only. Neither `Button.tsx` nor `ConfigProvider.ts` carries its own `"use client"` directive (unlike some `ui/` components — `Alert`, `Rate`, `AvatarGroup`, `Badge`, `Avatar` do; `Button`/`ConfigProvider`/`InputGroup`/`Spinner`/`Form` don't). `crm`'s own domain components follow the same pattern of marking the *consuming* file, not relying on the library leaf to self-mark (e.g. `_components/BoardCard.tsx`, `_components/ListGroup.tsx`), so marking `page.tsx` itself here follows existing repo convention rather than inventing one. Any buyer who renders an interactive/context-consuming `ui` component directly from a Server Component will hit the same error — this is a real, repo-wide `code/components/ui/` consumption gotcha under App Router, not something specific to this starting page. Worth the orchestrator/Architect knowing about; not fixed at the source here (out of scope).
38
+
39
+ ## Acceptance test (F2-equivalent, run by hand per the work order's "Done means")
40
+ Built in a throwaway copy with `code/components/ui/{Button,ConfigProvider,Spinner,InputGroup}/` plus `code/components/ui/form/context.ts` (not the whole `Form/` folder — `InputGroup.tsx` and `Addon.tsx` both call `useForm` from `../Form/context`, which is a small, self-contained context file with no further dependencies; the rest of `Form/` — `Form.tsx`, `FormField.tsx`, `FormScope.tsx`, `constants.ts`, its own `index.tsx` — is not part of Button's actual closure) and `code/utils/class-names.ts`, layered into `src/components/ui/` and `src/utils/` respectively — never committed here, this chassis tree stays component-free per §1/§2 (the CLI's `init` fetches `components/ui/**` as a separate registry step; the chassis itself is deliberately not one of the ~8 files that carries it).
41
+ 1. `pnpm install` — exit 0.
42
+ 2. `pnpm build` — exit 0, after the `"use client"` fix above. First attempt (without it) failed with exactly the error described above.
43
+ 3. `pnpm dev`, loaded in-browser: button background `rgb(255, 255, 255)`, border `rgb(213, 215, 218)`, page background `rgb(250, 250, 250)`, font family resolves to `Inter` (via `next/font/google`) — resolving through the `--nui-*` tokens, not browser defaults or a grey box.
44
+ 4. `document.documentElement.classList.add('dark')` → body background flips to `rgb(10, 10, 10)`, button to `rgba(255, 255, 255, 0.04)`. Confirmed working.
@@ -0,0 +1,7 @@
1
+ import type { NextConfig } from "next";
2
+
3
+ const nextConfig: NextConfig = {
4
+ /* config options here */
5
+ };
6
+
7
+ export default nextConfig;
@@ -0,0 +1,29 @@
1
+ {
2
+ "name": "nateui-app",
3
+ "version": "0.1.0",
4
+ "private": true,
5
+ "scripts": {
6
+ "dev": "next dev",
7
+ "build": "next build",
8
+ "start": "next start"
9
+ },
10
+ "dependencies": {
11
+ "next": "16.2.6",
12
+ "react": "19.2.4",
13
+ "react-dom": "19.2.4",
14
+ "@floating-ui/react": "^0.27",
15
+ "clsx": "^2.1.1",
16
+ "dayjs": "^1",
17
+ "motion": "^12",
18
+ "tailwind-merge": "^2"
19
+ },
20
+ "devDependencies": {
21
+ "@tailwindcss/postcss": "^4",
22
+ "@tailwindcss/typography": "^0.5.19",
23
+ "@types/node": "^20",
24
+ "@types/react": "^19",
25
+ "@types/react-dom": "^19",
26
+ "tailwindcss": "^4",
27
+ "typescript": "^5"
28
+ }
29
+ }
@@ -0,0 +1,6 @@
1
+ allowBuilds:
2
+ sharp: false
3
+ unrs-resolver: false
4
+ ignoredBuiltDependencies:
5
+ - sharp
6
+ - unrs-resolver
@@ -0,0 +1,7 @@
1
+ const config = {
2
+ plugins: {
3
+ "@tailwindcss/postcss": {},
4
+ },
5
+ };
6
+
7
+ export default config;
@@ -0,0 +1,32 @@
1
+ import type { Metadata } from "next";
2
+ import type { ReactNode } from "react";
3
+ import { Inter } from "next/font/google";
4
+ import "@/styles/index.css";
5
+
6
+ const inter = Inter({
7
+ subsets: ["latin"],
8
+ display: "swap",
9
+ variable: "--font-inter",
10
+ });
11
+
12
+ export const metadata: Metadata = {
13
+ title: "NateUI App",
14
+ description: "A NateUI application.",
15
+ };
16
+
17
+ export default function RootLayout({
18
+ children,
19
+ }: Readonly<{
20
+ children: ReactNode;
21
+ }>) {
22
+ return (
23
+ <html
24
+ className={`antialiased ${inter.variable}`}
25
+ lang="en"
26
+ dir="ltr"
27
+ suppressHydrationWarning
28
+ >
29
+ <body className={inter.className}>{children}</body>
30
+ </html>
31
+ );
32
+ }
@@ -0,0 +1,12 @@
1
+ "use client";
2
+
3
+ import { Button } from "@/components/ui/button";
4
+
5
+ export default function Home() {
6
+ return (
7
+ <main className="flex min-h-screen flex-col items-center justify-center gap-4">
8
+ <p className="text-foreground">This app was created with NateUI.</p>
9
+ <Button>Get started</Button>
10
+ </main>
11
+ );
12
+ }