repoctl 5.1.1 → 5.3.0

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,126 +1,62 @@
1
1
  # repoctl
2
2
 
3
- Package name: `repoctl`. Recommended command: `repo`.
3
+ English | [简体中文](README.zh-CN.md)
4
+
5
+ `repoctl` is the recommended package for the repoctl CLI. The package name is `repoctl`; the primary executable is `repo`.
4
6
 
5
7
  ## Install
6
8
 
7
- ```sh
9
+ ```bash
8
10
  pnpm add -D repoctl
9
11
  ```
10
12
 
11
- ## Quick Start
13
+ ## Start with an existing workspace
12
14
 
13
- ```sh
15
+ ```bash
14
16
  pnpm exec repo init
15
17
  pnpm exec repo doctor
16
- pnpm exec repo doctor --json
17
- pnpm exec repo doctor --json --out reports/doctor.json
18
18
  pnpm exec repo templates
19
19
  pnpm exec repo new my-package
20
20
  pnpm exec repo check
21
- pnpm exec repo check --dry-run
22
- pnpm exec repo env info
23
21
  ```
24
22
 
25
- Inside generated repos, the same workflow is available as conflict-free `repo:*` root scripts:
26
-
27
- ```sh
28
- pnpm run repo:init
29
- pnpm run repo:doctor -- --json
30
- pnpm run repo:new -- my-package
31
- pnpm run repo:check
32
- ```
33
-
34
- ## What Each Command Is For
35
-
36
- - `repo init`: initialize the workspace with the recommended metadata and tooling defaults.
37
- - `repo doctor`: diagnose whether the current repo is ready to use.
38
- - `repo templates`: list the built-in package/app templates and their target folders.
39
- - `repo new`: create a new package or app.
40
- - `repo check`: run the recommended local verification flow.
41
- - `repo upgrade`: sync the latest standard assets and scripts from the template.
42
-
43
- `repo init` is safe to run in an existing pnpm workspace. By default it creates missing root files, appends missing workspace patterns, and skips existing README/tooling files; use `--force` or `--overwrite` when you explicitly want managed files rewritten. Use `--yes` in CI.
44
-
45
- `repo upgrade` is also CI-safe. In a non-TTY process it will not prompt; changed files are skipped unless you pass `--yes` or `--overwrite`. Use `--no-overwrite` when automation must preserve every changed file.
23
+ Generated workspaces also expose conflict-free root scripts such as `repo:init`, `repo:doctor`, `repo:new`, and `repo:check`.
46
24
 
47
- `repo doctor` is intentionally lightweight. It checks root workspace files, Node version compatibility, CLI dependency presence, recommended `repo:*` root scripts, stale `monorepo.config.ts` files, workspace pattern coverage, legacy local tooling imports, and whether Husky plus lint-staged are both wired. Use `repo doctor --json --out reports/doctor.json` or `pnpm run repo:doctor -- --json` when automation needs a persisted report.
48
- Use `repo check --dry-run` or `repo check --json --out reports/check-plan.json` when automation needs to inspect the verification plan before running it.
25
+ ## Common workflows
49
26
 
50
- ## Common Commands
51
-
52
- ```sh
53
- # sync repo standards
54
- pnpm exec repo upgrade
27
+ ```bash
28
+ # inspect or update a workspace
29
+ pnpm exec repo doctor --json
55
30
  pnpm exec repo upgrade --yes
56
- pnpm exec repo upgrade --no-overwrite
57
31
 
58
- # create a specific template without extra prompts
59
- pnpm exec repo new dashboard --template vue-hono
60
- pnpm exec repo new dashboard --template vue-hono --dry-run
32
+ # preview creation without writing files
61
33
  pnpm exec repo new dashboard --template vue-hono --json
62
- pnpm exec repo new dashboard --template vue-hono --json --out plans/dashboard.json
63
- # invalid template keys fail with a suggestion instead of falling back silently
64
34
 
65
- # discover available templates
66
- pnpm exec repo templates
67
- pnpm exec repo templates tsdown
68
- pnpm exec repo templates --category library
69
- pnpm exec repo templates --check
70
- pnpm exec repo templates --check --json
71
- pnpm exec repo templates --json
72
- pnpm exec repo templates --markdown
73
- pnpm exec repo templates tsdown --markdown
74
- pnpm exec repo templates --markdown --out docs/templates.md
75
-
76
- # advanced workspace upgrade
77
- pnpm exec repo ws up
78
-
79
- # inspect verification routing
35
+ # inspect verification before running it
80
36
  pnpm exec repo check --dry-run
81
- pnpm exec repo check --json --out reports/check-plan.json
82
-
83
- # collect environment info for debugging
84
- pnpm exec repo env info
85
- pnpm exec repo env info --json --out reports/env.json
86
- pnpm exec repo env snapshot --json --out reports/snapshot.json
87
-
88
- # inspect workspace packages
89
- pnpm exec repo ws ls
90
- pnpm exec repo ws ls --json --include-private
91
- pnpm exec repo ws ls --json --out reports/workspaces.json
37
+ pnpm exec repo check --full
92
38
 
93
- # generate tooling configs
94
- pnpm exec repo tg init --all
39
+ # collect a support bundle
40
+ pnpm exec repo env support --json --redact --out reports/support.json
95
41
  ```
96
42
 
97
- ## Config
43
+ ## Language
98
44
 
99
- Create `repoctl.config.ts` in the workspace root to customize defaults.
45
+ Output is English by default. Use `--lang zh-CN` or `REPOCTL_LANG=zh-CN` for Simplified Chinese.
100
46
 
101
- ```ts
102
- import { defineMonorepoConfig } from 'repoctl'
103
-
104
- export default defineMonorepoConfig({
105
- commands: {
106
- init: {
107
- preset: 'standard',
108
- },
109
- create: {
110
- defaultTemplate: 'tsdown',
111
- },
112
- },
113
- })
47
+ ```bash
48
+ pnpm exec repo --lang zh-CN doctor
49
+ REPOCTL_LANG=zh-CN pnpm exec repo check --dry-run
114
50
  ```
115
51
 
116
- When `commands.create.defaultTemplate` is set, `repo new foo` creates the package directly and places it under the conventional base directory inferred from the template, such as `packages/foo` or `apps/foo`.
117
-
118
- Use `repoctl.config.ts`. `monorepo.config.ts` is no longer loaded at runtime.
52
+ ## Advanced APIs
119
53
 
120
- ## Performance Notes
54
+ `repoctl` re-exports the programmatic APIs from `@icebreakers/monorepo`. Tooling wrappers are available from `repoctl/tooling`.
121
55
 
122
- The CLI keeps startup lightweight by registering the command tree first and loading each command implementation only when that action runs. Workspace discovery also uses an in-process cache, so repeated checks inside one command reuse the same `pnpm-workspace.yaml` and package scan results.
56
+ ```ts
57
+ import { defineEslintConfig } from 'repoctl/tooling'
123
58
 
124
- ## Advanced Usage
59
+ export default await defineEslintConfig()
60
+ ```
125
61
 
126
- If you need the lower-level API and tooling wrappers, see `@icebreakers/monorepo`.
62
+ Documentation: https://repo.icebreaker.top
@@ -0,0 +1,44 @@
1
+ # repoctl
2
+
3
+ [English](README.md) | 简体中文
4
+
5
+ `repoctl` 是 repoctl CLI 的推荐安装包。包名为 `repoctl`,主要命令为 `repo`。
6
+
7
+ ## 安装
8
+
9
+ ```bash
10
+ pnpm add -D repoctl
11
+ ```
12
+
13
+ ## 接入已有工作区
14
+
15
+ ```bash
16
+ pnpm exec repo init
17
+ pnpm exec repo doctor
18
+ pnpm exec repo templates
19
+ pnpm exec repo new my-package
20
+ pnpm exec repo check
21
+ ```
22
+
23
+ 生成后的工作区还会提供 `repo:init`、`repo:doctor`、`repo:new` 和 `repo:check` 等无冲突根脚本。
24
+
25
+ ## 常用工作流
26
+
27
+ ```bash
28
+ pnpm exec repo doctor --json
29
+ pnpm exec repo upgrade --yes
30
+ pnpm exec repo new dashboard --template vue-hono --json
31
+ pnpm exec repo check --dry-run
32
+ pnpm exec repo check --full
33
+ pnpm exec repo env support --json --redact --out reports/support.json
34
+ ```
35
+
36
+ ## 语言
37
+
38
+ 默认输出英文。使用 `--lang zh-CN` 或 `REPOCTL_LANG=zh-CN` 切换为简体中文。
39
+
40
+ ## 高级 API
41
+
42
+ `repoctl` 会重新导出 `@icebreakers/monorepo` 的程序化 API,工程配置 wrapper 位于 `repoctl/tooling`。
43
+
44
+ 文档:https://repo.icebreaker.top
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "repoctl",
3
3
  "type": "module",
4
- "version": "5.1.1",
5
- "description": "Default task-first CLI for pnpm and Turbo monorepo setup and maintenance",
4
+ "version": "5.3.0",
5
+ "description": "Task-first CLI for initializing, maintaining, validating, and releasing pnpm and Turborepo monorepos",
6
6
  "author": "ice breaker <hi@sonofmagic.top>",
7
7
  "license": "MIT",
8
8
  "homepage": "https://repo.icebreaker.top",
9
9
  "repository": {
10
10
  "type": "git",
11
- "url": "git+https://github.com/sonofmagic/monorepo-template.git",
11
+ "url": "git+https://github.com/sonofmagic/repoctl.git",
12
12
  "directory": "packages/repoctl"
13
13
  },
14
14
  "bugs": {
15
- "url": "https://github.com/sonofmagic/monorepo-template/issues"
15
+ "url": "https://github.com/sonofmagic/repoctl/issues"
16
16
  },
17
17
  "keywords": [
18
18
  "repoctl",
@@ -88,7 +88,7 @@
88
88
  }
89
89
  },
90
90
  "dependencies": {
91
- "@icebreakers/monorepo": "5.1.1"
91
+ "@icebreakers/monorepo": "5.3.0"
92
92
  },
93
93
  "scripts": {
94
94
  "dev": "tsdown --tsconfig tsconfig.src.json --watch --sourcemap",