create-repoctl 0.1.7 → 1.0.1

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
@@ -10,7 +10,15 @@ pnpm create repoctl
10
10
  yarn create repoctl
11
11
  ```
12
12
 
13
- The interactive flow selects a target directory and any built-in templates to include. After creation:
13
+ The interactive flow selects a target directory and any built-in templates to include. After creation, or for agents that must not prompt:
14
+
15
+ ```bash
16
+ pnpm create repoctl my-app -- --yes --templates vue-hono
17
+ npm create repoctl@latest my-app -- --yes --templates vue-hono
18
+ npx create-repoctl my-app --yes --templates vue-hono
19
+ ```
20
+
21
+ Template keys: `vue-hono`, `hono-server`, `tsdown`, `vue-lib`, `vitepress`, `cli`. After creation:
14
22
 
15
23
  ```bash
16
24
  cd <project>
@@ -20,6 +28,10 @@ pnpm exec repo doctor
20
28
  pnpm exec repo check
21
29
  ```
22
30
 
31
+ ## For AI agents
32
+
33
+ If the user asked you to create a project with repoctl, run the `--yes` command above, then `pnpm install`, `pnpm exec repo init`, and `pnpm exec repo doctor`. Do not wait for interactive prompts.
34
+
23
35
  Output is English by default. Pass `--lang zh-CN` or set `REPOCTL_LANG=zh-CN` for Simplified Chinese.
24
36
 
25
37
  ```bash
package/README.zh-CN.md CHANGED
@@ -10,7 +10,15 @@ pnpm create repoctl
10
10
  yarn create repoctl
11
11
  ```
12
12
 
13
- 交互流程会选择目标目录和需要包含的内置模板。创建完成后运行:
13
+ 交互流程会选择目标目录和需要包含的内置模板。代理或不需要提问时:
14
+
15
+ ```bash
16
+ pnpm create repoctl my-app -- --yes --templates vue-hono
17
+ npm create repoctl@latest my-app -- --yes --templates vue-hono
18
+ npx create-repoctl my-app --yes --templates vue-hono
19
+ ```
20
+
21
+ 模板 key:`vue-hono`、`hono-server`、`tsdown`、`vue-lib`、`vitepress`、`cli`。创建完成后运行:
14
22
 
15
23
  ```bash
16
24
  cd <project>
package/dist/cli.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { t as createCreateRepoctlProgram } from "./src-D3CcgoeO.mjs";
1
+ import { t as createCreateRepoctlProgram } from "./src-C3obqm4D.mjs";
2
2
  import process from "node:process";
3
3
  //#region src/cli.ts
4
4
  createCreateRepoctlProgram().parseAsync(process.argv).catch((error) => {
package/dist/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { n as resolveCreateRepoctlLocale, t as createCreateRepoctlProgram } from "./src-D3CcgoeO.mjs";
1
+ import { n as resolveCreateRepoctlLocale, t as createCreateRepoctlProgram } from "./src-C3obqm4D.mjs";
2
2
  export { createCreateRepoctlProgram, resolveCreateRepoctlLocale };
@@ -29,6 +29,7 @@ const help$1 = {
29
29
  targetArgument: "Target directory",
30
30
  templatesOption: "Comma-separated template keys or indexes to include",
31
31
  forceOption: "Remove an existing target directory before creating the workspace",
32
+ yesOption: "Skip prompts; use the directory argument and --templates as-is",
32
33
  globalOptionsTitle: "Global Options:",
33
34
  helpOption: "Display help for command",
34
35
  languageOption: "Output language: en or zh-CN",
@@ -84,6 +85,7 @@ const help = {
84
85
  targetArgument: "目标目录",
85
86
  templatesOption: "要包含的模板 key 或序号,以逗号分隔",
86
87
  forceOption: "创建前删除已存在的目标目录",
88
+ yesOption: "跳过交互;直接使用目录参数和 --templates",
87
89
  globalOptionsTitle: "全局选项:",
88
90
  helpOption: "显示命令帮助",
89
91
  languageOption: "输出语言:en 或 zh-CN",
@@ -291,13 +293,13 @@ function createCreateRepoctlProgram(options = {}) {
291
293
  };
292
294
  const localizeHelpMetadata = (value) => value.replaceAll("choices:", t("choicesLabel")).replaceAll("default:", t("defaultLabel")).replaceAll("preset:", t("presetLabel")).replaceAll("env:", t("envLabel"));
293
295
  const localizeCommanderError = (value) => value.replaceAll("Did you mean one of", t("commanderDidYouMeanOneOf")).replaceAll("Did you mean", t("commanderDidYouMean")).replaceAll("Allowed choices are", t("commanderAllowedChoices")).replaceAll("missing required argument", t("commanderMissingRequiredArgument")).replaceAll("required option", t("commanderRequiredOption")).replaceAll("argument missing", t("commanderArgumentMissing")).replaceAll("not specified", t("commanderNotSpecified")).replaceAll("too many arguments", t("commanderTooManyArguments")).replaceAll("unknown command", t("commanderUnknownCommand")).replaceAll("unknown option", t("commanderUnknownOption")).replace(/^error:/, t("commanderErrorPrefix"));
294
- program.name(commandName).description(t("description")).argument("[dir]", t("targetArgument"), defaultTarget).option("-t, --templates <list>", t("templatesOption")).option("-f, --force", t("forceOption"), false).option("--lang <locale>", t("languageOption")).helpOption("-h, --help", t("helpOption")).configureOutput({ outputError: (value, write) => write(localizeCommanderError(value)) }).configureHelp({
296
+ program.name(commandName).description(t("description")).argument("[dir]", t("targetArgument"), defaultTarget).option("-t, --templates <list>", t("templatesOption")).option("-f, --force", t("forceOption"), false).option("-y, --yes", t("yesOption"), false).option("--lang <locale>", t("languageOption")).helpOption("-h, --help", t("helpOption")).configureOutput({ outputError: (value, write) => write(localizeCommanderError(value)) }).configureHelp({
295
297
  argumentDescription: (argument) => localizeHelpMetadata(defaultHelp.argumentDescription(argument)),
296
298
  optionDescription: (option) => localizeHelpMetadata(defaultHelp.optionDescription(option)),
297
299
  styleTitle: (title) => titles[title] ?? title
298
300
  }).action(async (targetDirInput, createOptions) => {
299
301
  if (createOptions.lang && !isCreateRepoctlLocale(createOptions.lang)) throw new Error(t("invalidLocale", { locale: createOptions.lang }));
300
- const isInteractive = Boolean(process.stdin.isTTY && process.stdout.isTTY);
302
+ const isInteractive = !createOptions.yes && Boolean(process.stdin.isTTY && process.stdout.isTTY);
301
303
  let targetInput = targetDirInput || defaultTarget;
302
304
  if (isInteractive) targetInput = await promptTargetDir(targetInput, t("targetPrompt", { defaultDir: targetInput }));
303
305
  let selectedTemplates = [];
package/package.json CHANGED
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "create-repoctl",
3
3
  "type": "module",
4
- "version": "0.1.7",
5
- "description": "Create a repoctl-managed pnpm and Turborepo workspace",
4
+ "version": "1.0.1",
5
+ "description": "Create a repoctl-managed pnpm and Turborepo workspace. Non-interactive: pnpm create repoctl <dir> -- --yes --templates vue-hono",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://repoctl.icebreaker.top",
@@ -36,20 +36,22 @@
36
36
  "create-repoctl": "bin/create-repoctl.js"
37
37
  },
38
38
  "files": [
39
+ "README.md",
39
40
  "bin",
40
41
  "dist"
41
42
  ],
42
43
  "engines": {
43
- "node": ">=18.0.0"
44
+ "node": ">=22.13.0"
44
45
  },
45
46
  "dependencies": {
46
- "@icebreakers/monorepo-templates": "1.3.5"
47
+ "@icebreakers/monorepo-templates": "2.0.1"
47
48
  },
48
49
  "devDependencies": {
49
50
  "tsd": "^0.33.0"
50
51
  },
51
52
  "publishConfig": {
52
- "access": "public"
53
+ "access": "public",
54
+ "registry": "https://registry.npmjs.org"
53
55
  },
54
56
  "scripts": {
55
57
  "dev": "tsdown --watch --sourcemap",