@icebreakers/monorepo-templates 1.1.0 → 1.2.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.
Files changed (154) hide show
  1. package/README.md +12 -8
  2. package/README.zh-CN.md +16 -0
  3. package/assets/.changeset/ledger.yaml +25 -0
  4. package/assets/.github/ISSUE_TEMPLATE/config.yml +1 -1
  5. package/assets/AGENTS.md +4 -3
  6. package/assets/CONTRIBUTING.md +27 -2
  7. package/assets/SECURITY.md +12 -14
  8. package/assets/package.json +13 -4
  9. package/package.json +6 -4
  10. package/templates/cli/package.json +11 -4
  11. package/templates/client/package.json +17 -1
  12. package/templates/server/package.json +11 -4
  13. package/templates/tsdown/package.json +11 -4
  14. package/templates/vitepress/.vitepress/config.ts +146 -165
  15. package/templates/vitepress/ai/index.md +12 -23
  16. package/templates/vitepress/ai/llms-txt.md +13 -31
  17. package/templates/vitepress/getting-started.md +3 -32
  18. package/templates/vitepress/index.md +27 -30
  19. package/templates/vitepress/knowledge/index.md +17 -41
  20. package/templates/vitepress/monorepo/commands.md +13 -18
  21. package/templates/vitepress/monorepo/index.md +22 -100
  22. package/templates/vitepress/monorepo/manage.md +15 -227
  23. package/templates/vitepress/monorepo/publish.md +15 -70
  24. package/templates/vitepress/monorepo/templates.md +10 -17
  25. package/templates/vitepress/monorepo/troubleshooting.md +13 -16
  26. package/templates/vitepress/package.json +10 -4
  27. package/templates/vitepress/public/_redirects +3 -0
  28. package/templates/vitepress/repoctl/adopt-existing.md +51 -53
  29. package/templates/vitepress/repoctl/aliases.md +18 -18
  30. package/templates/vitepress/repoctl/checks.md +21 -68
  31. package/templates/vitepress/repoctl/commands.md +16 -64
  32. package/templates/vitepress/repoctl/config.md +14 -35
  33. package/templates/vitepress/repoctl/doctor.md +20 -60
  34. package/templates/vitepress/repoctl/execution-model.md +16 -69
  35. package/templates/vitepress/repoctl/getting-started.md +34 -40
  36. package/templates/vitepress/repoctl/index.md +33 -61
  37. package/templates/vitepress/repoctl/reports.md +20 -74
  38. package/templates/vitepress/repoctl/scenarios.md +26 -28
  39. package/templates/vitepress/repoctl/template-assets.md +19 -88
  40. package/templates/vitepress/repoctl/templates.md +50 -81
  41. package/templates/vitepress/repoctl/troubleshooting.md +32 -46
  42. package/templates/vitepress/repoctl/workflows.md +38 -67
  43. package/templates/vitepress/thinking.md +4 -85
  44. package/templates/vitepress/tools/changeset.md +9 -59
  45. package/templates/vitepress/tools/husky.md +6 -124
  46. package/templates/vitepress/tools/index.md +13 -32
  47. package/templates/vitepress/tools/lint-staged.md +5 -96
  48. package/templates/vitepress/tools/llms-txt.md +4 -6
  49. package/templates/vitepress/tools/pnpm.md +7 -119
  50. package/templates/vitepress/tools/renovate.md +3 -87
  51. package/templates/vitepress/tools/turborepo.md +5 -157
  52. package/templates/vitepress/why/how-to-reuse-js-code.md +6 -247
  53. package/templates/vitepress/why/index.md +14 -1
  54. package/templates/vitepress/why/js-cjs-mjs.md +9 -96
  55. package/templates/vitepress/why/js-keywords.md +4 -129
  56. package/templates/vitepress/why/modern/bundlers.md +3 -50
  57. package/templates/vitepress/why/modern/dts.md +4 -90
  58. package/templates/vitepress/why/modern/esm-vs-cjs.md +4 -81
  59. package/templates/vitepress/why/modern/index.md +10 -51
  60. package/templates/vitepress/why/modern/package-entry-points.md +6 -117
  61. package/templates/vitepress/why/modern/typescript.md +4 -152
  62. package/templates/vitepress/why/publish-basic-npm-package.md +17 -144
  63. package/templates/vitepress/why/what-is-npm-package.md +4 -159
  64. package/templates/vitepress/zh/ai/index.md +33 -0
  65. package/templates/vitepress/zh/ai/llms-txt.md +42 -0
  66. package/templates/vitepress/zh/getting-started.md +40 -0
  67. package/templates/vitepress/zh/index.md +66 -0
  68. package/templates/vitepress/zh/knowledge/index.md +50 -0
  69. package/templates/vitepress/zh/monorepo/commands.md +21 -0
  70. package/templates/vitepress/zh/monorepo/index.md +115 -0
  71. package/templates/vitepress/zh/monorepo/manage.md +243 -0
  72. package/templates/vitepress/zh/monorepo/publish.md +87 -0
  73. package/templates/vitepress/zh/monorepo/templates.md +21 -0
  74. package/templates/vitepress/zh/monorepo/troubleshooting.md +20 -0
  75. package/templates/vitepress/zh/repoctl/adopt-existing.md +135 -0
  76. package/templates/vitepress/{en → zh}/repoctl/aliases.md +18 -18
  77. package/templates/vitepress/zh/repoctl/checks.md +86 -0
  78. package/templates/vitepress/zh/repoctl/commands.md +168 -0
  79. package/templates/vitepress/zh/repoctl/config.md +90 -0
  80. package/templates/vitepress/zh/repoctl/doctor.md +86 -0
  81. package/templates/vitepress/zh/repoctl/execution-model.md +81 -0
  82. package/templates/vitepress/zh/repoctl/getting-started.md +122 -0
  83. package/templates/vitepress/zh/repoctl/index.md +102 -0
  84. package/templates/vitepress/zh/repoctl/reports.md +94 -0
  85. package/templates/vitepress/{en → zh}/repoctl/scenarios.md +28 -26
  86. package/templates/vitepress/zh/repoctl/template-assets.md +116 -0
  87. package/templates/vitepress/zh/repoctl/templates.md +159 -0
  88. package/templates/vitepress/zh/repoctl/troubleshooting.md +110 -0
  89. package/templates/vitepress/zh/repoctl/workflows.md +118 -0
  90. package/templates/vitepress/zh/thinking.md +88 -0
  91. package/templates/vitepress/zh/tools/changeset.md +75 -0
  92. package/templates/vitepress/zh/tools/husky.md +130 -0
  93. package/templates/vitepress/zh/tools/index.md +38 -0
  94. package/templates/vitepress/zh/tools/lint-staged.md +103 -0
  95. package/templates/vitepress/zh/tools/llms-txt.md +9 -0
  96. package/templates/vitepress/zh/tools/pnpm.md +127 -0
  97. package/templates/vitepress/zh/tools/renovate.md +91 -0
  98. package/templates/vitepress/zh/tools/turborepo.md +166 -0
  99. package/templates/vitepress/zh/why/assets/npm-dt.svg +15 -0
  100. package/templates/vitepress/zh/why/assets/npm-ts.svg +19 -0
  101. package/templates/vitepress/zh/why/examples/0.npm-basic-package/index.js +10 -0
  102. package/templates/vitepress/zh/why/examples/0.npm-basic-package/package.json +11 -0
  103. package/templates/vitepress/zh/why/examples/1.npm-basic-package/index.cjs +12 -0
  104. package/templates/vitepress/zh/why/examples/1.npm-basic-package/index.d.ts +1 -0
  105. package/templates/vitepress/zh/why/examples/1.npm-basic-package/index.js +8 -0
  106. package/templates/vitepress/zh/why/examples/1.npm-basic-package/package.json +19 -0
  107. package/templates/vitepress/zh/why/examples/2.npm-basic-package/README.md +1 -0
  108. package/templates/vitepress/zh/why/examples/2.npm-basic-package/package-lock.json +30 -0
  109. package/templates/vitepress/zh/why/examples/2.npm-basic-package/package.json +35 -0
  110. package/templates/vitepress/zh/why/examples/2.npm-basic-package/rename-ext.js +24 -0
  111. package/templates/vitepress/zh/why/examples/2.npm-basic-package/src/index.ts +8 -0
  112. package/templates/vitepress/zh/why/examples/2.npm-basic-package/tsconfig.cjs.json +8 -0
  113. package/templates/vitepress/zh/why/examples/2.npm-basic-package/tsconfig.esm.json +7 -0
  114. package/templates/vitepress/zh/why/examples/2.npm-basic-package/tsconfig.json +18 -0
  115. package/templates/vitepress/zh/why/examples/3.npm-basic-package/README.md +1 -0
  116. package/templates/vitepress/zh/why/examples/3.npm-basic-package/package-lock.json +1496 -0
  117. package/templates/vitepress/zh/why/examples/3.npm-basic-package/package.json +31 -0
  118. package/templates/vitepress/zh/why/examples/3.npm-basic-package/src/index.ts +8 -0
  119. package/templates/vitepress/zh/why/examples/3.npm-basic-package/tsconfig.json +16 -0
  120. package/templates/vitepress/zh/why/examples/3.npm-basic-package/tsdown.config.ts +16 -0
  121. package/templates/vitepress/zh/why/examples/usage-cjs/cjs.cjs +4 -0
  122. package/templates/vitepress/zh/why/examples/usage-cjs/esm.mjs +4 -0
  123. package/templates/vitepress/zh/why/examples/usage-cjs/index.js +8 -0
  124. package/templates/vitepress/zh/why/examples/usage-cjs/package-lock.json +36 -0
  125. package/templates/vitepress/zh/why/examples/usage-cjs/package.json +20 -0
  126. package/templates/vitepress/zh/why/examples/usage-esm/cjs.cjs +4 -0
  127. package/templates/vitepress/zh/why/examples/usage-esm/createRequire.js +7 -0
  128. package/templates/vitepress/zh/why/examples/usage-esm/esm.mjs +4 -0
  129. package/templates/vitepress/zh/why/examples/usage-esm/index.js +8 -0
  130. package/templates/vitepress/zh/why/examples/usage-esm/package-lock.json +36 -0
  131. package/templates/vitepress/zh/why/examples/usage-esm/package.json +21 -0
  132. package/templates/vitepress/zh/why/how-to-reuse-js-code.md +250 -0
  133. package/templates/vitepress/zh/why/index.md +1 -0
  134. package/templates/vitepress/zh/why/js-cjs-mjs.md +99 -0
  135. package/templates/vitepress/zh/why/js-keywords.md +132 -0
  136. package/templates/vitepress/zh/why/modern/bundlers.md +52 -0
  137. package/templates/vitepress/zh/why/modern/dts.md +93 -0
  138. package/templates/vitepress/zh/why/modern/esm-vs-cjs.md +84 -0
  139. package/templates/vitepress/zh/why/modern/index.md +55 -0
  140. package/templates/vitepress/zh/why/modern/package-entry-points.md +128 -0
  141. package/templates/vitepress/zh/why/modern/typescript.md +155 -0
  142. package/templates/vitepress/zh/why/publish-basic-npm-package.md +146 -0
  143. package/templates/vitepress/zh/why/what-is-npm-package.md +162 -0
  144. package/templates/vue-lib/package.json +12 -5
  145. package/templates/vitepress/en/index.md +0 -63
  146. package/templates/vitepress/en/knowledge/monorepo.md +0 -37
  147. package/templates/vitepress/en/repoctl/adopt-existing.md +0 -133
  148. package/templates/vitepress/en/repoctl/commands.md +0 -120
  149. package/templates/vitepress/en/repoctl/config.md +0 -69
  150. package/templates/vitepress/en/repoctl/getting-started.md +0 -116
  151. package/templates/vitepress/en/repoctl/index.md +0 -74
  152. package/templates/vitepress/en/repoctl/templates.md +0 -128
  153. package/templates/vitepress/en/repoctl/troubleshooting.md +0 -96
  154. package/templates/vitepress/en/repoctl/workflows.md +0 -89
@@ -3,208 +3,189 @@ import { defineConfig } from 'vitepress'
3
3
  import llmstxt from 'vitepress-plugin-llms'
4
4
  import { withMermaid } from 'vitepress-plugin-mermaid'
5
5
 
6
- const repoctlSidebar = [
7
- {
8
- text: 'repoctl',
9
- items: [
10
- { text: '概览', link: '/repoctl/' },
11
- { text: '快速开始', link: '/repoctl/getting-started' },
12
- { text: '接入已有仓库', link: '/repoctl/adopt-existing' },
13
- { text: '按场景选命令', link: '/repoctl/scenarios' },
14
- { text: '执行模型', link: '/repoctl/execution-model' },
15
- { text: '命令速查', link: '/repoctl/commands' },
16
- { text: '校验链路', link: '/repoctl/checks' },
17
- { text: 'doctor 诊断', link: '/repoctl/doctor' },
18
- { text: '配置文件', link: '/repoctl/config' },
19
- { text: '模板与创建', link: '/repoctl/templates' },
20
- { text: '模板资产治理', link: '/repoctl/template-assets' },
21
- { text: '工作流与 CI', link: '/repoctl/workflows' },
22
- { text: '报告与自动化输出', link: '/repoctl/reports' },
23
- { text: '排障与报告', link: '/repoctl/troubleshooting' },
24
- { text: '命令别名', link: '/repoctl/aliases' },
25
- ],
26
- },
27
- ]
6
+ interface SidebarLabels {
7
+ repoctl: string
8
+ repoctlItems: string[]
9
+ knowledge: string
10
+ knowledgeItems: string[]
11
+ packages: string
12
+ packageItems: string[]
13
+ ai: string
14
+ aiItems: string[]
15
+ tools: string
16
+ toolItems: string[]
17
+ }
28
18
 
29
- const knowledgeSidebar = [
30
- {
31
- text: '知识库',
32
- items: [
33
- { text: '知识库首页', link: '/knowledge/' },
34
- { text: '为什么往 monorepo 方向演进', link: '/monorepo/' },
35
- { text: '如何管理 monorepo', link: '/monorepo/manage' },
36
- { text: '发包与变更日志', link: '/monorepo/publish' },
37
- { text: 'monorepo 命令参考', link: '/monorepo/commands' },
38
- { text: 'monorepo 模板体系', link: '/monorepo/templates' },
39
- { text: 'monorepo 排障', link: '/monorepo/troubleshooting' },
40
- ],
41
- },
42
- {
43
- text: '现代 npm 包',
44
- items: [
45
- { text: '如何复用 js 代码', link: '/why/how-to-reuse-js-code' },
46
- { text: 'JS 文件的各种后缀', link: '/why/js-cjs-mjs' },
47
- { text: 'CJS 和 ESM 关键字/全局变量对比', link: '/why/js-keywords' },
48
- { text: '什么是 npm 包', link: '/why/what-is-npm-package' },
49
- { text: '如何发布 npm 包', link: '/why/publish-basic-npm-package' },
50
- { text: '改进并发布现代 npm 包', link: '/why/index' },
51
- { text: '现代包指南', link: '/why/modern/' },
52
- { text: 'ESM 与 CJS', link: '/why/modern/esm-vs-cjs' },
53
- { text: '类型声明', link: '/why/modern/dts' },
54
- { text: '包入口', link: '/why/modern/package-entry-points' },
55
- { text: '构建工具', link: '/why/modern/bundlers' },
56
- { text: 'TypeScript', link: '/why/modern/typescript' },
57
- ],
58
- },
19
+ const repoctlPaths = [
20
+ '',
21
+ 'getting-started',
22
+ 'adopt-existing',
23
+ 'scenarios',
24
+ 'execution-model',
25
+ 'commands',
26
+ 'checks',
27
+ 'doctor',
28
+ 'config',
29
+ 'templates',
30
+ 'template-assets',
31
+ 'workflows',
32
+ 'reports',
33
+ 'troubleshooting',
34
+ 'aliases',
59
35
  ]
60
-
61
- const aiSidebar = [
62
- {
63
- text: 'AI',
64
- items: [
65
- { text: 'AI 文档首页', link: '/ai/' },
66
- { text: 'llms.txt', link: '/ai/llms-txt' },
67
- ],
68
- },
36
+ const knowledgePaths = ['', 'manage', 'publish', 'commands', 'templates', 'troubleshooting']
37
+ const packagePaths = [
38
+ 'how-to-reuse-js-code',
39
+ 'js-cjs-mjs',
40
+ 'js-keywords',
41
+ 'what-is-npm-package',
42
+ 'publish-basic-npm-package',
43
+ 'index',
44
+ 'modern/',
45
+ 'modern/esm-vs-cjs',
46
+ 'modern/dts',
47
+ 'modern/package-entry-points',
48
+ 'modern/bundlers',
49
+ 'modern/typescript',
69
50
  ]
51
+ const aiPaths = ['', 'llms-txt']
52
+ const toolPaths = ['', 'pnpm', 'turborepo', 'changeset', 'husky', 'lint-staged', 'renovate', 'llms-txt']
70
53
 
71
- const toolsSidebar = [
72
- {
73
- text: '工具专题',
74
- items: [
75
- { text: '工具专题首页', link: '/tools/' },
76
- { text: 'pnpm', link: '/tools/pnpm' },
77
- { text: 'turborepo', link: '/tools/turborepo' },
78
- { text: 'changeset', link: '/tools/changeset' },
79
- { text: 'husky', link: '/tools/husky' },
80
- { text: 'lint-staged', link: '/tools/lint-staged' },
81
- { text: 'renovate', link: '/tools/renovate' },
82
- ],
83
- },
84
- ]
54
+ const englishLabels: SidebarLabels = {
55
+ repoctl: 'repoctl',
56
+ repoctlItems: ['Overview', 'Getting Started', 'Adopt Existing Repos', 'Choose By Scenario', 'Execution Model', 'Command Reference', 'Verification', 'Doctor', 'Configuration', 'Templates', 'Template Assets', 'Workflows and CI', 'Reports', 'Troubleshooting', 'Command Aliases'],
57
+ knowledge: 'Knowledge Base',
58
+ knowledgeItems: ['Why Monorepo', 'Managing A Monorepo', 'Publishing and Changelogs', 'Monorepo Commands', 'Template Systems', 'Troubleshooting'],
59
+ packages: 'Modern Packages',
60
+ packageItems: ['Reusing JavaScript', 'Module Extensions', 'Runtime Globals', 'What Is An npm Package?', 'Publishing A Package', 'Package Evolution', 'Modern Package Guide', 'ESM vs CommonJS', 'Type Declarations', 'Package Entry Points', 'Bundlers', 'TypeScript'],
61
+ ai: 'AI',
62
+ aiItems: ['AI Documentation', 'llms.txt'],
63
+ tools: 'Tool Guides',
64
+ toolItems: ['Overview', 'pnpm', 'Turborepo', 'pnpm Versioning', 'Husky', 'lint-staged', 'Renovate', 'llms.txt'],
65
+ }
85
66
 
86
- const enSidebar = [
87
- {
88
- text: 'repoctl',
89
- items: [
90
- { text: 'Overview', link: '/en/repoctl/' },
91
- { text: 'Getting Started', link: '/en/repoctl/getting-started' },
92
- { text: 'Adopt Existing Repos', link: '/en/repoctl/adopt-existing' },
93
- { text: 'Choose By Scenario', link: '/en/repoctl/scenarios' },
94
- { text: 'Command Reference', link: '/en/repoctl/commands' },
95
- { text: 'Configuration', link: '/en/repoctl/config' },
96
- { text: 'Templates', link: '/en/repoctl/templates' },
97
- { text: 'Workflows and CI', link: '/en/repoctl/workflows' },
98
- { text: 'Troubleshooting', link: '/en/repoctl/troubleshooting' },
99
- { text: 'Command Aliases', link: '/en/repoctl/aliases' },
100
- ],
101
- },
102
- {
103
- text: 'Knowledge Base',
104
- items: [
105
- { text: 'Why Monorepo', link: '/en/knowledge/monorepo' },
106
- ],
107
- },
108
- ]
67
+ const chineseLabels: SidebarLabels = {
68
+ repoctl: 'repoctl',
69
+ repoctlItems: ['概览', '快速开始', '接入已有仓库', '按场景选命令', '执行模型', '命令速查', '校验链路', 'Doctor 诊断', '配置文件', '模板与创建', '模板资产治理', '工作流与 CI', '报告与自动化输出', '排障', '命令别名'],
70
+ knowledge: '知识库',
71
+ knowledgeItems: ['为什么使用 Monorepo', '管理 Monorepo', '发包与变更日志', 'Monorepo 命令', '模板体系', '常见问题排障'],
72
+ packages: '现代 npm 包',
73
+ packageItems: ['复用 JavaScript', '模块文件后缀', '运行时关键字', '什么是 npm 包', '发布 npm 包', '包的演进', '现代包指南', 'ESM 与 CommonJS', '类型声明', '包入口', '构建工具', 'TypeScript'],
74
+ ai: 'AI',
75
+ aiItems: ['AI 文档', 'llms.txt'],
76
+ tools: '工具专题',
77
+ toolItems: ['概览', 'pnpm', 'Turborepo', 'pnpm Versioning', 'Husky', 'lint-staged', 'Renovate', 'llms.txt'],
78
+ }
79
+
80
+ function prefixed(prefix: string, section: string, paths: string[], labels: string[]) {
81
+ return paths.map((path, index) => ({
82
+ text: labels[index]!,
83
+ link: `${prefix}/${section}/${path}`.replace(/\/+/g, '/'),
84
+ }))
85
+ }
86
+
87
+ function createSidebars(prefix: '' | '/zh', labels: SidebarLabels) {
88
+ const repoctl = [{ text: labels.repoctl, items: prefixed(prefix, 'repoctl', repoctlPaths, labels.repoctlItems) }]
89
+ const knowledge = [
90
+ { text: labels.knowledge, items: prefixed(prefix, 'monorepo', knowledgePaths, labels.knowledgeItems) },
91
+ { text: labels.packages, items: prefixed(prefix, 'why', packagePaths, labels.packageItems) },
92
+ ]
93
+ const ai = [{ text: labels.ai, items: prefixed(prefix, 'ai', aiPaths, labels.aiItems) }]
94
+ const tools = [{ text: labels.tools, items: prefixed(prefix, 'tools', toolPaths, labels.toolItems) }]
95
+ return {
96
+ [`${prefix}/repoctl/`]: repoctl,
97
+ [`${prefix}/knowledge/`]: knowledge,
98
+ [`${prefix}/monorepo/`]: knowledge,
99
+ [`${prefix}/why/`]: knowledge,
100
+ [`${prefix}/ai/`]: ai,
101
+ [`${prefix}/tools/`]: tools,
102
+ [`${prefix || ''}/`]: repoctl,
103
+ }
104
+ }
109
105
 
110
106
  export default withMermaid(defineConfig({
111
107
  outDir: '.vitepress/dist',
112
108
  title: 'repoctl',
113
- description: 'repoctl documentation for practical pnpm and Turborepo monorepos.',
109
+ description: 'Task-first CLI for initializing, maintaining, validating, and releasing pnpm and Turborepo monorepos.',
114
110
  lastUpdated: true,
115
111
  cleanUrls: true,
116
- head: [
117
- ['link', { rel: 'icon', href: '/logo.jpg' }],
118
- ],
112
+ head: [['link', { rel: 'icon', href: '/logo.jpg' }]],
119
113
  themeConfig: {
120
114
  logo: '/logo.jpg',
121
- search: {
122
- provider: 'local',
123
- },
124
- socialLinks: [
125
- { icon: 'github', link: 'https://github.com/sonofmagic/monorepo-template' },
126
- ],
115
+ search: { provider: 'local' },
116
+ socialLinks: [{ icon: 'github', link: 'https://github.com/sonofmagic/repoctl' }],
127
117
  },
128
118
  locales: {
129
119
  root: {
130
- label: '简体中文',
131
- lang: 'zh-CN',
120
+ label: 'English',
121
+ lang: 'en-US',
132
122
  title: 'repoctl',
133
- description: '围绕 repoctl 的 pnpm + Turborepo monorepo 使用文档。',
123
+ description: 'Task-first CLI for practical pnpm and Turborepo monorepos.',
134
124
  themeConfig: {
135
125
  nav: [
136
126
  { text: 'repoctl', link: '/repoctl/' },
137
- { text: '快速开始', link: '/repoctl/getting-started' },
138
- { text: '命令', link: '/repoctl/commands' },
139
- { text: '知识库', link: '/knowledge/' },
140
- { text: 'AI 文档', link: '/ai/' },
141
- { text: '工具专题', link: '/tools/' },
127
+ { text: 'Getting Started', link: '/repoctl/getting-started' },
128
+ { text: 'Commands', link: '/repoctl/commands' },
129
+ { text: 'Knowledge Base', link: '/knowledge/' },
130
+ { text: 'AI Docs', link: '/ai/' },
131
+ { text: 'Tool Guides', link: '/tools/' },
142
132
  ],
143
- outline: {
144
- label: '目录',
145
- level: [2, 3],
146
- },
147
- sidebar: {
148
- '/repoctl/': repoctlSidebar,
149
- '/knowledge/': knowledgeSidebar,
150
- '/monorepo/': knowledgeSidebar,
151
- '/why/': knowledgeSidebar,
152
- '/ai/': aiSidebar,
153
- '/tools/': toolsSidebar,
154
- '/': repoctlSidebar,
155
- },
133
+ outline: { label: 'On This Page', level: [2, 3] },
134
+ sidebar: createSidebars('', englishLabels),
156
135
  editLink: {
157
- pattern: 'https://github.com/sonofmagic/monorepo-template/edit/main/templates/vitepress/:path',
158
- text: '为此页提供修改建议',
159
- },
160
- docFooter: {
161
- prev: '上一页',
162
- next: '下一页',
163
- },
164
- lastUpdated: {
165
- text: '最后更新',
136
+ pattern: 'https://github.com/sonofmagic/repoctl/edit/main/templates/vitepress/:path',
137
+ text: 'Edit this page',
166
138
  },
139
+ docFooter: { prev: 'Previous page', next: 'Next page' },
140
+ lastUpdated: { text: 'Last updated' },
167
141
  },
168
142
  },
169
- en: {
170
- label: 'English',
171
- lang: 'en-US',
143
+ zh: {
144
+ label: '简体中文',
145
+ lang: 'zh-CN',
146
+ link: '/zh/',
172
147
  title: 'repoctl',
173
- description: 'Documentation for using repoctl in practical pnpm and Turborepo monorepos.',
148
+ description: '面向 pnpm 与 Turborepo monorepo 的任务型 CLI。',
174
149
  themeConfig: {
175
150
  nav: [
176
- { text: 'repoctl', link: '/en/repoctl/' },
177
- { text: 'Getting Started', link: '/en/repoctl/getting-started' },
178
- { text: 'Commands', link: '/en/repoctl/commands' },
179
- { text: 'Knowledge Base', link: '/en/knowledge/monorepo' },
180
- { text: 'AI Docs', link: '/ai/' },
151
+ { text: 'repoctl', link: '/zh/repoctl/' },
152
+ { text: '快速开始', link: '/zh/repoctl/getting-started' },
153
+ { text: '命令', link: '/zh/repoctl/commands' },
154
+ { text: '知识库', link: '/zh/knowledge/' },
155
+ { text: 'AI 文档', link: '/zh/ai/' },
156
+ { text: '工具专题', link: '/zh/tools/' },
181
157
  ],
182
- outline: {
183
- label: 'On This Page',
184
- level: [2, 3],
185
- },
186
- sidebar: {
187
- '/en/': enSidebar,
188
- },
158
+ outline: { label: '目录', level: [2, 3] },
159
+ sidebar: createSidebars('/zh', chineseLabels),
189
160
  editLink: {
190
- pattern: 'https://github.com/sonofmagic/monorepo-template/edit/main/templates/vitepress/:path',
191
- text: 'Edit this page',
192
- },
193
- docFooter: {
194
- prev: 'Previous page',
195
- next: 'Next page',
196
- },
197
- lastUpdated: {
198
- text: 'Last updated',
161
+ pattern: 'https://github.com/sonofmagic/repoctl/edit/main/templates/vitepress/:path',
162
+ text: '为此页提供修改建议',
199
163
  },
164
+ docFooter: { prev: '上一页', next: '下一页' },
165
+ lastUpdated: { text: '最后更新' },
200
166
  },
201
167
  },
202
168
  },
203
169
  vite: {
204
170
  plugins: [
205
- // @ts-ignore
171
+ // @ts-ignore vitepress-plugin-llms currently exposes Vite 6 plugin types.
206
172
  Tailwindcss(),
207
- llmstxt(),
173
+ llmstxt({
174
+ title: 'repoctl',
175
+ description: 'Task-first CLI for pnpm and Turborepo monorepos. Simplified Chinese documentation is available under /zh/.',
176
+ domain: 'https://repo.icebreaker.top',
177
+ ignoreFiles: [
178
+ 'zh/**',
179
+ 'en/**',
180
+ 'CHANGELOG.md',
181
+ 'thinking.md',
182
+ 'why/examples/**',
183
+ '.vitepress/**',
184
+ '**/node_modules/**',
185
+ '**/internal/**',
186
+ '**/fixtures/**',
187
+ ],
188
+ }),
208
189
  ],
209
190
  },
210
191
  mermaid: {},
@@ -1,33 +1,22 @@
1
1
  ---
2
- description: repoctl 文档站的 AI 文档入口,说明如何为 AI 编程工具提供 llms.txt 和页面 Markdown。
2
+ outline: deep
3
3
  ---
4
4
 
5
- # AI 文档
5
+ # AI Documentation
6
6
 
7
- AI 文档入口用于给 Cursor、Claude Code、Codex 和其他 AI 编程工具提供更容易读取的上下文。它和工具专题分开维护,避免 llms.txt 被埋在普通工具列表里。
7
+ repoctl publishes AI-readable documentation alongside the human site.
8
8
 
9
- ## 1. 推荐入口
9
+ ## Recommended Entrypoints
10
10
 
11
- | 入口 | 用途 |
12
- | ------------------------------ | ------------------------------------------------ |
13
- | `/llms.txt` | 轻量文档索引,适合先交给 AI 工具判断要读哪些页面 |
14
- | `/llms-full.txt` | 合并后的完整文档,适合需要一次性提供上下文的场景 |
15
- | [llms.txt 说明](./llms-txt.md) | 维护约定、访问方式和页面 frontmatter 要求 |
11
+ - `/llms.txt`: compact English index and product summary.
12
+ - `/llms-full.txt`: combined page content when a larger context is appropriate.
13
+ - `/zh/`: Simplified Chinese documentation.
14
+ - [llms.txt Guide](./llms-txt.md): usage and maintenance rules.
16
15
 
17
- ## 2. 在 AI 工具里怎么用
16
+ ## Using It In AI Tools
18
17
 
19
- 优先把 `https://repo.icebreaker.top/llms.txt` 作为入口提供给 AI 工具。只有当工具不能继续抓取链接,或者你需要离线提供完整上下文时,再使用 `https://repo.icebreaker.top/llms-full.txt`。
18
+ Give the tool the public `llms.txt` URL first, then point it to the specific repoctl, knowledge, or tool page needed for the task. Prefer JSON CLI output when the tool needs stable structured fields.
20
19
 
21
- ```txt
22
- 先给 llms.txt
23
- -> AI 选择相关页面
24
- -> 必要时补充 llms-full.txt
25
- ```
20
+ ## Maintenance
26
21
 
27
- ## 3. 维护原则
28
-
29
- | 维护动作 | 原因 |
30
- | --------------------------------- | ---------------------------------------- |
31
- | 新增重要页面时写 `description` | 让 llms 索引更容易被模型理解 |
32
- | 页面标题保持具体 | 避免 AI 只看到泛化标题,无法判断页面用途 |
33
- | repoctl、知识库、工具专题分开组织 | 让 AI 工具能按任务类型检索上下文 |
22
+ The index is generated by the site build. Changelogs, example fixture READMEs, generated output, and internal files are excluded so the result represents current product documentation.
@@ -1,42 +1,24 @@
1
1
  ---
2
- description: 使用 llms.txt 为大语言模型提供更易读取的 repoctl 文档入口。
2
+ outline: deep
3
3
  ---
4
4
 
5
- # AI 文档入口:llms.txt
5
+ # AI Entrypoint: llms.txt
6
6
 
7
- `llms.txt` 是面向大语言模型的文档入口文件。它把站点中的关键页面整理成更适合模型读取的 Markdown 索引,便于 AI 工具在回答 repoctl、pnpm workspace、Turborepo 和模板用法相关问题时快速定位上下文。
7
+ The documentation build generates `/llms.txt` and `/llms-full.txt`. English is the default corpus; Chinese pages are clearly namespaced under `/zh/`.
8
8
 
9
- 本站通过 `vitepress-plugin-llms` 在构建阶段自动生成这些文件:
9
+ ## Usage
10
10
 
11
- | 文件 | 用途 |
12
- | ---------------- | -------------------------------- |
13
- | `/llms.txt` | 文档索引,列出可供模型读取的页面 |
14
- | `/llms-full.txt` | 把站点文档合并成单个文本文件 |
15
- | 页面 `.md` 文件 | 保留每个页面内容的 Markdown 版本 |
16
-
17
- ## 1. 使用方式
18
-
19
- 访问 `https://repo.icebreaker.top/llms.txt` 可以获取当前文档的 LLM 索引。如果需要一次性提供完整上下文,可以使用 `https://repo.icebreaker.top/llms-full.txt`。
20
-
21
- 当你在 Cursor、Claude Code、Codex 或其他 AI 编程工具里引用 repoctl 文档时,优先提供 `llms.txt`,再按需要补充具体页面链接。
22
-
23
- ## 2. 维护约定
11
+ ```text
12
+ https://repo.icebreaker.top/llms.txt
13
+ https://repo.icebreaker.top/llms-full.txt
14
+ ```
24
15
 
25
- 新增重要文档页面时,在 frontmatter 中补充 `description`。构建插件会把描述写入 `llms.txt` 的链接说明中,让模型更容易判断每个页面的用途。
16
+ Use the compact index for discovery and the full file only when the consumer has enough context budget.
26
17
 
27
- ```md
28
- ---
29
- description: 说明这个页面解决的问题和适用场景。
30
- ---
31
- ```
18
+ ## Scope
32
19
 
33
- ## 3. 页面组织建议
20
+ The generated index includes current product guides, package roles, commands, reports, template assets, knowledge pages, and tool topics. Historical changelogs, example fixture READMEs, generated build output, and internal maintenance files are excluded.
34
21
 
35
- AI 入口应该保持显眼,但不要替代正常文档结构:
22
+ ## Language
36
23
 
37
- | 页面类型 | 推荐位置 |
38
- | -------------------------------------- | ------------------------------------ |
39
- | repoctl 命令、校验、诊断、报告 | `/repoctl/` |
40
- | monorepo 和 npm 包基础知识 | `/knowledge/`、`/monorepo/`、`/why/` |
41
- | pnpm、Turborepo、versioning 等工具专题 | `/tools/` |
42
- | llms.txt 和 AI 工具读取约定 | `/ai/` |
24
+ English URLs use the site root. Simplified Chinese pages use `/zh/`; this mirrors the CLI default and `--lang zh-CN` opt-in behavior.
@@ -1,40 +1,11 @@
1
- # 新手使用指南
1
+ # Getting Started
2
2
 
3
- 这篇旧入口已经收敛到 repoctl 主线。新读者建议直接阅读:
4
-
5
- - [repoctl 快速开始](./repoctl/getting-started.md)
6
- - [repoctl 命令速查](./repoctl/commands.md)
7
- - [repoctl 配置文件](./repoctl/config.md)
8
-
9
- ## 先这样用
3
+ The current setup guide is [repoctl Getting Started](./repoctl/getting-started.md).
10
4
 
11
5
  ```bash
12
6
  pnpm add -D repoctl
13
7
  pnpm exec repo init
14
8
  pnpm exec repo doctor
15
- pnpm exec repo new
16
- pnpm exec repo check
17
9
  ```
18
10
 
19
- 模板生成仓库里可以使用更短的根脚本:
20
-
21
- ```bash
22
- pnpm run repo:init
23
- pnpm doctor
24
- pnpm new
25
- pnpm check
26
- ```
27
-
28
- ## 知识点保留
29
-
30
- 理解工具前,先理解这几个边界:
31
-
32
- | 命令 | 解决的问题 |
33
- | -------------- | ----------------------------------------------------- |
34
- | `repo init` | 补齐仓库默认脚本、workspace patterns 和基础工具链入口 |
35
- | `repo doctor` | 判断仓库当前是否可用,并输出可保存的诊断报告 |
36
- | `repo new` | 从内置模板创建包、应用、服务、文档站或 CLI |
37
- | `repo check` | 预览或执行提交前推荐校验 |
38
- | `repo upgrade` | 同步模板最新标准资产 |
39
-
40
- 如果你是在学习 monorepo 的基础概念,可以继续看 [为什么往 monorepo 方向演进](./monorepo/index.md)。
11
+ Use [Adopt Existing Repositories](./repoctl/adopt-existing.md) when introducing repoctl to an established workspace.
@@ -3,34 +3,34 @@ layout: home
3
3
 
4
4
  hero:
5
5
  name: repoctl
6
- text: 让 pnpm monorepo 的日常操作更短、更稳
7
- tagline: 用一套 CLI 管理初始化、诊断、创建模板、提交前校验和模板资产同步。
6
+ text: Short, stable workflows for pnpm monorepos
7
+ tagline: Initialize, diagnose, scaffold, verify, and upgrade practical Turborepo workspaces from one CLI.
8
8
  image:
9
9
  src: /logo.jpg
10
10
  alt: repoctl logo
11
11
  actions:
12
12
  - theme: brand
13
- text: 快速开始
13
+ text: Get Started
14
14
  link: /repoctl/getting-started
15
15
  - theme: alt
16
- text: 命令速查
16
+ text: Commands
17
17
  link: /repoctl/commands
18
18
  - theme: alt
19
- text: AI 文档入口
19
+ text: AI Docs
20
20
  link: /ai/
21
21
 
22
22
  features:
23
- - title: 从已有仓库开始
24
- details: 安装 repoctl 后运行 setup 和 doctor,先把 workspace、根脚本、配置冲突和提交链路检查清楚。
25
- - title: 用模板创建包和应用
26
- details: repo new 支持交互式创建、指定模板、dry-run、JSON 输出和创建计划落盘。
27
- - title: 把质量门禁变成日常命令
28
- details: repo check 统一预览和执行 lint、typecheck、build、test、tsd 等推荐校验。
29
- - title: 给 AI 工具的文档入口
30
- details: 构建时自动生成 llms.txt、llms-full.txt 和页面 Markdown,让 AI 编程工具更容易读取 repoctl 文档。
23
+ - title: Adopt existing workspaces
24
+ details: Run setup and doctor to align workspace patterns, root scripts, config files, and commit hooks.
25
+ - title: Create packages and apps
26
+ details: Scaffold libraries, apps, services, docs, and CLIs with interactive prompts or explicit template keys.
27
+ - title: Make checks repeatable
28
+ details: Preview and run local verification plans that match your lint, typecheck, build, test, and tsd workflow.
29
+ - title: AI-readable documentation
30
+ details: Generate llms.txt, llms-full.txt, and Markdown page output so AI coding tools can read the repoctl docs directly.
31
31
  ---
32
32
 
33
- ## 最短路径
33
+ ## Fast Path
34
34
 
35
35
  ```bash
36
36
  pnpm add -D repoctl
@@ -40,7 +40,7 @@ pnpm exec repo new
40
40
  pnpm exec repo check
41
41
  ```
42
42
 
43
- 在由模板生成的仓库里,同一套工作流会暴露成更短的根脚本:
43
+ Generated repositories expose the same workflow as shorter root scripts:
44
44
 
45
45
  ```bash
46
46
  pnpm run repo:init
@@ -49,18 +49,15 @@ pnpm run repo:new
49
49
  pnpm run repo:check
50
50
  ```
51
51
 
52
- ## 你可以继续阅读
53
-
54
- - [repoctl 概览](./repoctl/index.md)
55
- - [快速开始](./repoctl/getting-started.md)
56
- - [接入已有仓库](./repoctl/adopt-existing.md)
57
- - [按场景选命令](./repoctl/scenarios.md)
58
- - [执行模型](./repoctl/execution-model.md)
59
- - [命令速查](./repoctl/commands.md)
60
- - [校验链路](./repoctl/checks.md)
61
- - [doctor 诊断](./repoctl/doctor.md)
62
- - [配置文件](./repoctl/config.md)
63
- - [模板与创建](./repoctl/templates.md)
64
- - [模板资产治理](./repoctl/template-assets.md)
65
- - [工作流与 CI](./repoctl/workflows.md)
66
- - [报告与自动化输出](./repoctl/reports.md)
52
+ ## Keep Reading
53
+
54
+ - [repoctl Overview](./repoctl/index.md)
55
+ - [Getting Started](./repoctl/getting-started.md)
56
+ - [Adopt Existing Repositories](./repoctl/adopt-existing.md)
57
+ - [Choose By Scenario](./repoctl/scenarios.md)
58
+ - [Command Reference](./repoctl/commands.md)
59
+ - [Configuration](./repoctl/config.md)
60
+ - [Templates](./repoctl/templates.md)
61
+ - [Workflows and CI](./repoctl/workflows.md)
62
+ - [AI Docs: llms.txt](./ai/llms-txt.md)
63
+ - [Knowledge Base](./knowledge/index.md)