create-next-pro-cli 0.1.29 → 0.1.31

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
@@ -71,13 +71,16 @@ cd my-app
71
71
  Then install dependencies with your preferred package manager:
72
72
 
73
73
  ```bash
74
- bun install && bun run dev
74
+ bun install && cp .env.example .env && bun run dev
75
75
  # or
76
- npm install && npm run dev
76
+ npm install && cp .env.example .env && npm run dev
77
77
  # or
78
- pnpm install && pnpm run dev
78
+ pnpm install && cp .env.example .env && pnpm run dev
79
79
  ```
80
80
 
81
+ The creation result reports `.env.example` explicitly and provides the same
82
+ local-development commands in both human and JSON output.
83
+
81
84
  An existing destination is rejected by default. `--force` only permits replacement of the requested child destination:
82
85
 
83
86
  ```bash
@@ -129,9 +132,15 @@ The Next.js route and its interface are separate: `src/app` owns routing while `
129
132
 
130
133
  ```text
131
134
  my-app/
135
+ ├── .agents/
136
+ │ └── skills/
137
+ │ ├── create-next-pro-create-project/
138
+ │ ├── create-next-pro-addpage/
139
+ │ └── ...
132
140
  ├── .env.example
133
141
  ├── .gitignore
134
142
  ├── .prettierignore
143
+ ├── AGENTS.md
135
144
  ├── bun.lock
136
145
  ├── cnp.config.json
137
146
  ├── messages/
@@ -199,6 +208,8 @@ my-app/
199
208
 
200
209
  Template working files (`.env`, the nested Git repository, caches, screenshots, and test results) are not copied into generated projects. The CLI creates `cnp.config.json` with the project name and selected alias.
201
210
 
211
+ Generated projects also include concise root guidance in `AGENTS.md` and eight instruction-only command skills under `.agents/skills`. Agents should prefer the deterministic `--json` contract and read the matching skill before invoking a project mutation.
212
+
202
213
  ## CLI architecture
203
214
 
204
215
  ```text
@@ -332,7 +343,7 @@ Interactive input is never attempted in JSON mode. Pass every required argument
332
343
  Generated projects contain only the canonical `.env.example`, never the template's local `.env` or other environment copies. Copy it before configuring Auth.js:
333
344
 
334
345
  ```bash
335
- cp .env.example .env.local
346
+ cp .env.example .env
336
347
  ```
337
348
 
338
349
  The Google and Auth.js values shipped in `.env.example` are intentionally public, limited development credentials. Replace all of them before production use. Nested Git repositories, caches, installed dependencies, Playwright artifacts, agent context, the local `.env`, and every non-canonical `.env*` file are excluded from generated projects and the npm package. For checks without authentication, use `AUTH_DISABLED=true`.
package/dist/bin.bun.js CHANGED
@@ -6846,6 +6846,24 @@ import { fileURLToPath } from "url";
6846
6846
 
6847
6847
  // src/core/template-manifest.ts
6848
6848
  import path8 from "path";
6849
+
6850
+ // src/core/agent-guidance.ts
6851
+ var PROJECT_SKILL_NAMES = [
6852
+ "create-next-pro-create-project",
6853
+ "create-next-pro-addcomponent",
6854
+ "create-next-pro-addpage",
6855
+ "create-next-pro-addlib",
6856
+ "create-next-pro-addapi",
6857
+ "create-next-pro-addlanguage",
6858
+ "create-next-pro-addtext",
6859
+ "create-next-pro-rmpage"
6860
+ ];
6861
+ var PROJECT_AGENT_GUIDANCE_FILES = [
6862
+ "AGENTS.md",
6863
+ ...PROJECT_SKILL_NAMES.map((name) => `.agents/skills/${name}/SKILL.md`)
6864
+ ];
6865
+
6866
+ // src/core/template-manifest.ts
6849
6867
  var TEMPLATE_DENY_NAMES = new Set([
6850
6868
  ".env",
6851
6869
  ".git",
@@ -6893,6 +6911,7 @@ async function templateManifest(root, fs) {
6893
6911
  async function validateScaffoldTemplate(root, fs) {
6894
6912
  const manifest = await templateManifest(root, fs);
6895
6913
  for (const required of [
6914
+ ...PROJECT_AGENT_GUIDANCE_FILES.map((relative) => relative.split("/").join(path8.sep)),
6896
6915
  "package.json",
6897
6916
  "tsconfig.json",
6898
6917
  ".env.example",
@@ -7060,6 +7079,17 @@ async function createProjectFromOptions(options, context) {
7060
7079
  message: "Run the generated project checks before development.",
7061
7080
  paths: [{ scope: "project", path: "package.json" }],
7062
7081
  commands: ["bun run check", "npm run check", "pnpm run check"]
7082
+ },
7083
+ {
7084
+ kind: "run",
7085
+ required: false,
7086
+ message: "To run the project locally, copy the development environment example and start the development server.",
7087
+ paths: [{ scope: "project", path: ".env.example" }],
7088
+ commands: [
7089
+ `cd ${options.projectName} && cp .env.example .env && bun run dev`,
7090
+ `cd ${options.projectName} && cp .env.example .env && npm run dev`,
7091
+ `cd ${options.projectName} && cp .env.example .env && pnpm run dev`
7092
+ ]
7063
7093
  }
7064
7094
  ],
7065
7095
  data: {
package/dist/bin.node.js CHANGED
@@ -2067,6 +2067,24 @@ import { fileURLToPath } from "url";
2067
2067
 
2068
2068
  // src/core/template-manifest.ts
2069
2069
  import path8 from "path";
2070
+
2071
+ // src/core/agent-guidance.ts
2072
+ var PROJECT_SKILL_NAMES = [
2073
+ "create-next-pro-create-project",
2074
+ "create-next-pro-addcomponent",
2075
+ "create-next-pro-addpage",
2076
+ "create-next-pro-addlib",
2077
+ "create-next-pro-addapi",
2078
+ "create-next-pro-addlanguage",
2079
+ "create-next-pro-addtext",
2080
+ "create-next-pro-rmpage"
2081
+ ];
2082
+ var PROJECT_AGENT_GUIDANCE_FILES = [
2083
+ "AGENTS.md",
2084
+ ...PROJECT_SKILL_NAMES.map((name) => `.agents/skills/${name}/SKILL.md`)
2085
+ ];
2086
+
2087
+ // src/core/template-manifest.ts
2070
2088
  var TEMPLATE_DENY_NAMES = /* @__PURE__ */ new Set([
2071
2089
  ".env",
2072
2090
  ".git",
@@ -2116,6 +2134,9 @@ async function templateManifest(root, fs) {
2116
2134
  async function validateScaffoldTemplate(root, fs) {
2117
2135
  const manifest = await templateManifest(root, fs);
2118
2136
  for (const required of [
2137
+ ...PROJECT_AGENT_GUIDANCE_FILES.map(
2138
+ (relative) => relative.split("/").join(path8.sep)
2139
+ ),
2119
2140
  "package.json",
2120
2141
  "tsconfig.json",
2121
2142
  ".env.example",
@@ -2334,6 +2355,17 @@ async function createProjectFromOptions(options, context) {
2334
2355
  message: "Run the generated project checks before development.",
2335
2356
  paths: [{ scope: "project", path: "package.json" }],
2336
2357
  commands: ["bun run check", "npm run check", "pnpm run check"]
2358
+ },
2359
+ {
2360
+ kind: "run",
2361
+ required: false,
2362
+ message: "To run the project locally, copy the development environment example and start the development server.",
2363
+ paths: [{ scope: "project", path: ".env.example" }],
2364
+ commands: [
2365
+ `cd ${options.projectName} && cp .env.example .env && bun run dev`,
2366
+ `cd ${options.projectName} && cp .env.example .env && npm run dev`,
2367
+ `cd ${options.projectName} && cp .env.example .env && pnpm run dev`
2368
+ ]
2337
2369
  }
2338
2370
  ],
2339
2371
  data: {