@icebreakers/monorepo-templates 1.3.5 → 2.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/assets/.agents/skills/repoctl/SKILL.md +63 -0
- package/assets/.agents/skills/repoctl/references/commands.md +243 -0
- package/assets/.agents/skills/repoctl/references/config.md +67 -0
- package/assets/.agents/skills/repoctl/references/templates.md +46 -0
- package/assets/.github/workflows/ci.yml +1 -1
- package/assets/.github/workflows/release.yml +7 -0
- package/assets/AGENTS.md +31 -42
- package/assets/CLAUDE.md +14 -0
- package/assets/package.json +9 -49
- package/assets/pnpm-workspace.yaml +5 -5
- package/assets-data.mjs +2 -0
- package/dist/cli.mjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{prepare-DlR-vvls.mjs → prepare-zIcRa4-K.mjs} +27 -6
- package/package.json +6 -4
- package/templates/cli/dev/index.ts +4 -2
- package/templates/cli/package.json +4 -1
- package/templates/client/package.json +19 -14
- package/templates/server/package.json +7 -4
- package/templates/server/src/node-entry.ts +2 -2
- package/templates/server/tsconfig.json +2 -1
- package/templates/tsdown/package.json +5 -2
- package/templates/vitepress/.vitepress/config.ts +1 -0
- package/templates/vitepress/.vitepress/seo.ts +12 -0
- package/templates/vitepress/.vitepress/theme/components/HomePage.vue +25 -0
- package/templates/vitepress/ai/create.md +45 -0
- package/templates/vitepress/ai/index.md +13 -0
- package/templates/vitepress/index.md +1 -1
- package/templates/vitepress/learn/tools/repoctl-vs-pnpm-turborepo.md +16 -0
- package/templates/vitepress/package.json +9 -6
- package/templates/vitepress/public/robots.txt +5 -0
- package/templates/vitepress/scripts/check-locales.ts +2 -2
- package/templates/vitepress/start/index.md +3 -1
- package/templates/vitepress/start/install-repoctl.md +16 -0
- package/templates/vitepress/start/install.md +1 -1
- package/templates/vitepress/start/what-is-repoctl.md +18 -0
- package/templates/vitepress/tasks/adopt-existing.md +1 -1
- package/templates/vitepress/tsconfig.json +1 -0
- package/templates/vitepress/zh/ai/create.md +45 -0
- package/templates/vitepress/zh/ai/index.md +1 -0
- package/templates/vitepress/zh/index.md +1 -1
- package/templates/vitepress/zh/learn/tools/repoctl-vs-pnpm-turborepo.md +16 -0
- package/templates/vitepress/zh/start/index.md +3 -1
- package/templates/vitepress/zh/start/install-repoctl.md +16 -0
- package/templates/vitepress/zh/start/install.md +1 -1
- package/templates/vitepress/zh/start/what-is-repoctl.md +16 -0
- package/templates/vitepress/zh/tasks/adopt-existing.md +1 -1
- package/templates/vue-lib/package.json +9 -6
- package/templates/vue-lib/tsconfig.node.json +1 -1
- package/templates/vue-lib/vite.config.ts +2 -2
- package/templates/vue-lib/vite.shared.config.ts +2 -2
package/dist/cli.mjs
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-
|
|
1
|
+
import { a as toPublishGitignorePath, c as assetsDir, d as templatesDir, f as assetTargets$1, i as isGitignoreFile, l as packageDir, n as createTemplateCopyFilter, o as toWorkspaceGitignorePath, p as getAssetTargets$1, r as shouldSkipTemplatePath, s as templateChoices$1, t as prepareAssets, u as skeletonDir } from "./prepare-zIcRa4-K.mjs";
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import fs, { access, open, rm } from "node:fs/promises";
|
|
4
4
|
import exec from "nanoexec";
|
|
@@ -19,6 +19,8 @@ const coreAssetTargets = [
|
|
|
19
19
|
"repoctl.config.ts",
|
|
20
20
|
"package.json",
|
|
21
21
|
"AGENTS.md",
|
|
22
|
+
"CLAUDE.md",
|
|
23
|
+
".agents",
|
|
22
24
|
"pnpm-workspace.yaml",
|
|
23
25
|
"tsconfig.json",
|
|
24
26
|
"turbo.json",
|
|
@@ -204,11 +206,23 @@ function removeSourceRepoReleaseToolingBuildStepContent(content) {
|
|
|
204
206
|
}
|
|
205
207
|
function sanitizePublishedWorkspaceContent(content) {
|
|
206
208
|
const workspace = YAML.parse(content);
|
|
207
|
-
if (!workspace
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
209
|
+
if (!workspace || typeof workspace !== "object") return content;
|
|
210
|
+
let changed = false;
|
|
211
|
+
if (workspace.versioning && typeof workspace.versioning === "object") {
|
|
212
|
+
delete workspace.versioning["fixed"];
|
|
213
|
+
delete workspace.versioning["ignore"];
|
|
214
|
+
delete workspace.versioning["lanes"];
|
|
215
|
+
changed = true;
|
|
216
|
+
}
|
|
217
|
+
if ("catalog" in workspace) {
|
|
218
|
+
delete workspace.catalog;
|
|
219
|
+
changed = true;
|
|
220
|
+
}
|
|
221
|
+
if ("catalogs" in workspace) {
|
|
222
|
+
delete workspace.catalogs;
|
|
223
|
+
changed = true;
|
|
224
|
+
}
|
|
225
|
+
return changed ? YAML.stringify(workspace) : content;
|
|
212
226
|
}
|
|
213
227
|
async function pathExists(targetPath) {
|
|
214
228
|
try {
|
|
@@ -272,12 +286,13 @@ async function copyEntry(from, to, overwriteExisting, filter) {
|
|
|
272
286
|
throw error;
|
|
273
287
|
}
|
|
274
288
|
}
|
|
289
|
+
const publishedAgentSourceFiles = /* @__PURE__ */ new Set(["AGENTS.md", "CLAUDE.md"]);
|
|
275
290
|
async function copyAssets(repoRoot, overwriteExisting) {
|
|
276
291
|
const monorepoAssetRoot = path$1.resolve(repoRoot, "packages/monorepo/assets");
|
|
277
292
|
for (const target of assetTargets) {
|
|
278
293
|
const packageAsset = path$1.join(monorepoAssetRoot, toPublishGitignorePath(target));
|
|
279
294
|
const repoAsset = path$1.join(repoRoot, target);
|
|
280
|
-
const from = await pathExists(repoAsset) ?
|
|
295
|
+
const from = publishedAgentSourceFiles.has(target) || !await pathExists(repoAsset) ? packageAsset : repoAsset;
|
|
281
296
|
if (!await pathExists(from)) continue;
|
|
282
297
|
const to = path$1.join(assetsDir, toPublishGitignorePath(target));
|
|
283
298
|
const stats = await fs.stat(from);
|
|
@@ -295,6 +310,11 @@ async function writePublishedToolingConfigs() {
|
|
|
295
310
|
if (await pathExists(targetPath)) await fs.writeFile(targetPath, content);
|
|
296
311
|
}));
|
|
297
312
|
}
|
|
313
|
+
async function writePublishedAgentSkill(repoRoot, overwriteExisting) {
|
|
314
|
+
const skillFrom = path$1.join(repoRoot, "packages/monorepo/resources/skills/repoctl");
|
|
315
|
+
if (!await pathExists(skillFrom)) return;
|
|
316
|
+
await copyEntry(skillFrom, path$1.join(assetsDir, ".agents", "skills", "repoctl"), overwriteExisting);
|
|
317
|
+
}
|
|
298
318
|
async function sanitizePublishedWorkspace() {
|
|
299
319
|
const workspacePath = path$1.join(assetsDir, "pnpm-workspace.yaml");
|
|
300
320
|
if (!await pathExists(workspacePath)) return;
|
|
@@ -344,6 +364,7 @@ async function prepareAssets(options = {}) {
|
|
|
344
364
|
await sanitizePublishedWorkspace();
|
|
345
365
|
await removePublishedReleaseState();
|
|
346
366
|
await writePublishedToolingConfigs();
|
|
367
|
+
await writePublishedAgentSkill(repoRoot, overwriteExisting);
|
|
347
368
|
await removeSourceRepoReleaseToolingBuildStep();
|
|
348
369
|
await removeSourceRepoWorkerTypeChecks();
|
|
349
370
|
await copyTemplates(repoRoot, overwriteExisting);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@icebreakers/monorepo-templates",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "2.0.1",
|
|
5
5
|
"description": "Built-in project templates and managed workspace assets for repoctl",
|
|
6
6
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
"main": "./dist/index.mjs",
|
|
36
36
|
"types": "./dist/index.d.mts",
|
|
37
37
|
"files": [
|
|
38
|
+
"README.md",
|
|
38
39
|
"assets",
|
|
39
40
|
"assets-data.mjs",
|
|
40
41
|
"dist",
|
|
@@ -42,7 +43,7 @@
|
|
|
42
43
|
"templates"
|
|
43
44
|
],
|
|
44
45
|
"engines": {
|
|
45
|
-
"node": ">=
|
|
46
|
+
"node": ">=22.13.0"
|
|
46
47
|
},
|
|
47
48
|
"dependencies": {
|
|
48
49
|
"@inquirer/checkbox": "^5.2.5",
|
|
@@ -50,10 +51,11 @@
|
|
|
50
51
|
"@inquirer/select": "^5.2.5",
|
|
51
52
|
"commander": "^15.0.0",
|
|
52
53
|
"nanoexec": "^1.1.0",
|
|
53
|
-
"yaml": "^2.9.
|
|
54
|
+
"yaml": "^2.9.1"
|
|
54
55
|
},
|
|
55
56
|
"publishConfig": {
|
|
56
|
-
"access": "public"
|
|
57
|
+
"access": "public",
|
|
58
|
+
"registry": "https://registry.npmjs.org"
|
|
57
59
|
},
|
|
58
60
|
"scripts": {
|
|
59
61
|
"dev": "tsdown --watch --sourcemap",
|
|
@@ -24,8 +24,11 @@
|
|
|
24
24
|
"bin": {
|
|
25
25
|
"ice": "./dev/index.ts"
|
|
26
26
|
},
|
|
27
|
+
"engines": {
|
|
28
|
+
"node": ">=22.13.0"
|
|
29
|
+
},
|
|
27
30
|
"scripts": {
|
|
28
|
-
"start": "
|
|
31
|
+
"start": "node --experimental-strip-types src/index.ts",
|
|
29
32
|
"dev": "tsdown --watch --sourcemap",
|
|
30
33
|
"build": "tsdown",
|
|
31
34
|
"lint": "eslint .",
|
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
"version": "0.0.1",
|
|
5
5
|
"private": true,
|
|
6
6
|
"description": "Internal Vue and Cloudflare application template shipped with repoctl",
|
|
7
|
+
"author": "ice breaker <hi@sonofmagic.top>",
|
|
8
|
+
"license": "MIT",
|
|
7
9
|
"homepage": "https://repoctl.icebreaker.top",
|
|
8
10
|
"repository": {
|
|
9
11
|
"type": "git",
|
|
@@ -19,6 +21,9 @@
|
|
|
19
21
|
"cloudflare",
|
|
20
22
|
"template"
|
|
21
23
|
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22.13.0"
|
|
26
|
+
},
|
|
22
27
|
"scripts": {
|
|
23
28
|
"dev": "pnpm cf-typegen && vite --host",
|
|
24
29
|
"build": "pnpm cf-typegen && vue-tsc -b && vite build",
|
|
@@ -32,37 +37,37 @@
|
|
|
32
37
|
},
|
|
33
38
|
"dependencies": {
|
|
34
39
|
"@faker-js/faker": "^10.6.0",
|
|
35
|
-
"@tanstack/vue-query": "^5.
|
|
36
|
-
"@tanstack/vue-query-devtools": "^6.1
|
|
40
|
+
"@tanstack/vue-query": "^5.103.1",
|
|
41
|
+
"@tanstack/vue-query-devtools": "^6.2.1",
|
|
37
42
|
"@tanstack/vue-table": "^9.2.4",
|
|
38
|
-
"@tanstack/vue-virtual": "^3.13.
|
|
39
|
-
"@trpc/client": "^11.
|
|
43
|
+
"@tanstack/vue-virtual": "^3.13.39",
|
|
44
|
+
"@trpc/client": "^11.19.0",
|
|
40
45
|
"clsx": "^2.1.1",
|
|
41
46
|
"pinia": "^4.0.3",
|
|
42
|
-
"tailwind-merge": "^3.
|
|
47
|
+
"tailwind-merge": "^3.7.0",
|
|
43
48
|
"tailwind-variants": "^3.3.1",
|
|
44
|
-
"vue": "^3.5.
|
|
45
|
-
"vue-i18n": "^11.4.
|
|
49
|
+
"vue": "^3.5.43",
|
|
50
|
+
"vue-i18n": "^11.4.12",
|
|
46
51
|
"vue-router": "^5.3.1"
|
|
47
52
|
},
|
|
48
53
|
"devDependencies": {
|
|
49
|
-
"@cloudflare/vite-plugin": "^1.54.
|
|
54
|
+
"@cloudflare/vite-plugin": "^1.54.11",
|
|
50
55
|
"@hono/node-server": "^2.1.1",
|
|
51
56
|
"@hono/trpc-server": "^0.4.2",
|
|
52
57
|
"@tailwindcss/vite": "^4.3.3",
|
|
53
|
-
"@trpc/server": "^11.
|
|
54
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
58
|
+
"@trpc/server": "^11.19.0",
|
|
59
|
+
"@vitejs/plugin-vue": "^6.0.9",
|
|
55
60
|
"@vitejs/plugin-vue-jsx": "^5.1.6",
|
|
56
61
|
"@vue/tsconfig": "^0.9.1",
|
|
57
62
|
"consola": "^3.4.2",
|
|
58
|
-
"hono": "^4.13.
|
|
63
|
+
"hono": "^4.13.8",
|
|
59
64
|
"tailwindcss": "^4.3.3",
|
|
60
65
|
"typescript": "~6.0.3",
|
|
61
|
-
"vite": "^8.
|
|
66
|
+
"vite": "^8.3.0",
|
|
62
67
|
"vite-plugin-vue-devtools": "^8.2.1",
|
|
63
68
|
"vite-tsconfig-paths": "^6.1.1",
|
|
64
69
|
"vue-tsc": "3.3.11",
|
|
65
|
-
"wrangler": "^4.
|
|
66
|
-
"zod": "^4.5
|
|
70
|
+
"wrangler": "^4.133.0",
|
|
71
|
+
"zod": "^4.6.5"
|
|
67
72
|
}
|
|
68
73
|
}
|
|
@@ -30,13 +30,16 @@
|
|
|
30
30
|
"files": [
|
|
31
31
|
"dist"
|
|
32
32
|
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">=22.13.0"
|
|
35
|
+
},
|
|
33
36
|
"scripts": {
|
|
34
37
|
"dev": "pnpm cf-typegen && wrangler dev",
|
|
35
38
|
"build": "pnpm cf-typegen && tsdown",
|
|
36
39
|
"build:watch": "tsdown --watch --sourcemap",
|
|
37
40
|
"node:build:watch": "pnpm build:watch",
|
|
38
41
|
"node:build": "pnpm build",
|
|
39
|
-
"node:dev": "
|
|
42
|
+
"node:dev": "node --watch --experimental-strip-types src/node-entry.ts",
|
|
40
43
|
"node:start": "node dist/node-entry.mjs",
|
|
41
44
|
"test": "vitest run",
|
|
42
45
|
"test:dev": "vitest",
|
|
@@ -63,9 +66,9 @@
|
|
|
63
66
|
"devDependencies": {
|
|
64
67
|
"@hono/node-server": "^2.1.1",
|
|
65
68
|
"consola": "^3.4.2",
|
|
66
|
-
"hono": "^4.13.
|
|
69
|
+
"hono": "^4.13.8",
|
|
67
70
|
"tsdown": "0.23.0",
|
|
68
|
-
"wrangler": "^4.
|
|
69
|
-
"zod": "^4.5
|
|
71
|
+
"wrangler": "^4.133.0",
|
|
72
|
+
"zod": "^4.6.5"
|
|
70
73
|
}
|
|
71
74
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { serve } from '@hono/node-server'
|
|
2
2
|
import { consola } from 'consola'
|
|
3
3
|
import { logger } from 'hono/logger'
|
|
4
|
-
import { app } from './app'
|
|
5
|
-
import { port } from './config'
|
|
4
|
+
import { app } from './app.ts'
|
|
5
|
+
import { port } from './config.ts'
|
|
6
6
|
|
|
7
7
|
app.use(logger())
|
|
8
8
|
serve({
|
|
@@ -41,6 +41,10 @@
|
|
|
41
41
|
"files": [
|
|
42
42
|
"dist"
|
|
43
43
|
],
|
|
44
|
+
"publishConfig": {},
|
|
45
|
+
"engines": {
|
|
46
|
+
"node": ">=22.13.0"
|
|
47
|
+
},
|
|
44
48
|
"scripts": {
|
|
45
49
|
"dev": "tsdown -w",
|
|
46
50
|
"build": "tsdown",
|
|
@@ -51,6 +55,5 @@
|
|
|
51
55
|
"lint:fix": "eslint . --fix",
|
|
52
56
|
"typecheck": "tsc -p tsconfig.json",
|
|
53
57
|
"tsd": "pnpm build && tsd --files test-d/**/*.test-d.ts"
|
|
54
|
-
}
|
|
55
|
-
"publishConfig": {}
|
|
58
|
+
}
|
|
56
59
|
}
|
|
@@ -9,6 +9,7 @@ export default withMermaid(defineConfig({
|
|
|
9
9
|
outDir: '.vitepress/dist',
|
|
10
10
|
srcExclude: ['CHANGELOG.md', 'learn/packages/examples/**', 'zh/learn/packages/examples/**'],
|
|
11
11
|
title: 'repoctl',
|
|
12
|
+
titleTemplate: ':title — Official CLI for pnpm and Turborepo Monorepos',
|
|
12
13
|
description: 'A practical CLI guide for setting up, checking, and maintaining pnpm and Turborepo monorepos.',
|
|
13
14
|
lastUpdated: true,
|
|
14
15
|
cleanUrls: true,
|
|
@@ -29,6 +29,14 @@ export function createPageHead({ page, title, description }: TransformContext):
|
|
|
29
29
|
const socialImageAlt = isChinese
|
|
30
30
|
? 'repoctl:面向 pnpm 与 Turborepo monorepo 的任务型 CLI'
|
|
31
31
|
: 'repoctl: task-first CLI for pnpm and Turborepo monorepos'
|
|
32
|
+
const jsonLd = {
|
|
33
|
+
'@context': 'https://schema.org',
|
|
34
|
+
'@graph': [
|
|
35
|
+
{ '@type': 'Organization', 'name': 'repoctl', 'url': siteOrigin, 'logo': `${siteOrigin}/brand/repoctl-mark.svg`, 'sameAs': ['https://github.com/sonofmagic/repoctl', 'https://www.npmjs.com/package/repoctl'] },
|
|
36
|
+
{ '@type': 'SoftwareApplication', 'name': 'repoctl', 'applicationCategory': 'DeveloperApplication', 'operatingSystem': 'macOS, Linux, Windows', 'url': siteOrigin, description, 'sameAs': ['https://github.com/sonofmagic/repoctl', 'https://www.npmjs.com/package/repoctl'], 'offers': { '@type': 'Offer', 'price': '0', 'priceCurrency': 'USD' } },
|
|
37
|
+
{ '@type': 'WebSite', 'name': 'repoctl', 'url': siteOrigin, 'potentialAction': { '@type': 'SearchAction', 'target': `${siteOrigin}/reference/commands?q={search_term_string}`, 'query-input': 'required name=search_term_string' } },
|
|
38
|
+
],
|
|
39
|
+
}
|
|
32
40
|
|
|
33
41
|
return [
|
|
34
42
|
['link', { rel: 'canonical', href: canonical }],
|
|
@@ -45,10 +53,14 @@ export function createPageHead({ page, title, description }: TransformContext):
|
|
|
45
53
|
['meta', { property: 'og:image:width', content: '1200' }],
|
|
46
54
|
['meta', { property: 'og:image:height', content: '630' }],
|
|
47
55
|
['meta', { property: 'og:image:alt', content: socialImageAlt }],
|
|
56
|
+
['meta', { property: 'og:image:type', content: 'image/png' }],
|
|
57
|
+
['meta', { name: 'author', content: 'repoctl contributors' }],
|
|
58
|
+
['meta', { name: 'application-name', content: 'repoctl' }],
|
|
48
59
|
['meta', { name: 'twitter:card', content: 'summary_large_image' }],
|
|
49
60
|
['meta', { name: 'twitter:title', content: title }],
|
|
50
61
|
['meta', { name: 'twitter:description', content: description }],
|
|
51
62
|
['meta', { name: 'twitter:image', content: socialImage }],
|
|
52
63
|
['meta', { name: 'twitter:image:alt', content: socialImageAlt }],
|
|
64
|
+
['script', { type: 'application/ld+json' }, JSON.stringify(jsonLd)],
|
|
53
65
|
]
|
|
54
66
|
}
|
|
@@ -5,6 +5,19 @@ import { homeContent } from '../../home/content'
|
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{ locale: DocsLocale }>()
|
|
7
7
|
const content = computed(() => homeContent[props.locale])
|
|
8
|
+
const faq = computed(() => props.locale === 'zh'
|
|
9
|
+
? [
|
|
10
|
+
['repoctl 是什么?', 'repoctl 是面向 pnpm 与 Turborepo monorepo 的任务型 CLI,用于初始化、诊断、创建、校验和发布工作区。'],
|
|
11
|
+
['如何安装 repoctl?', '在项目中运行 pnpm add -D repoctl,然后使用 pnpm exec repo init 和 pnpm exec repo doctor。'],
|
|
12
|
+
['repoctl 与 pnpm、Turborepo 是什么关系?', 'pnpm 和 Turborepo 负责包管理与任务编排,repoctl 负责把团队约定、检查和日常操作组织成可复用任务。'],
|
|
13
|
+
['repo doctor 与 repo check 有什么区别?', 'repo doctor 诊断仓库健康状况,repo check 规划并执行 lint、类型、构建和测试校验。'],
|
|
14
|
+
]
|
|
15
|
+
: [
|
|
16
|
+
['What is repoctl?', 'repoctl is a task-first CLI for initializing, diagnosing, creating, checking, and releasing pnpm and Turborepo monorepos.'],
|
|
17
|
+
['How do I install repoctl?', 'Run pnpm add -D repoctl, then use pnpm exec repo init and pnpm exec repo doctor.'],
|
|
18
|
+
['How does repoctl relate to pnpm and Turborepo?', 'pnpm and Turborepo provide package management and task orchestration; repoctl turns repository conventions and checks into reusable tasks.'],
|
|
19
|
+
['What is the difference between repo doctor and repo check?', 'repo doctor diagnoses repository health, while repo check plans and runs lint, type, build, and test checks.'],
|
|
20
|
+
])
|
|
8
21
|
</script>
|
|
9
22
|
|
|
10
23
|
<template>
|
|
@@ -108,5 +121,17 @@ const content = computed(() => homeContent[props.locale])
|
|
|
108
121
|
</a>
|
|
109
122
|
</div>
|
|
110
123
|
</section>
|
|
124
|
+
<section class="repoctl-home__section repoctl-home__faq" aria-labelledby="repoctl-faq-title">
|
|
125
|
+
<h2 id="repoctl-faq-title">
|
|
126
|
+
{{ props.locale === 'zh' ? '常见问题' : 'Frequently asked questions' }}
|
|
127
|
+
</h2>
|
|
128
|
+
<details v-for="item in faq" :key="item[0]">
|
|
129
|
+
<summary>{{ item[0] }}</summary>
|
|
130
|
+
<p>{{ item[1] }}</p>
|
|
131
|
+
</details>
|
|
132
|
+
<script type="application/ld+json">
|
|
133
|
+
{{ JSON.stringify({ '@context': 'https://schema.org', '@type': 'FAQPage', "mainEntity": faq.map(item => ({ '@type': 'Question', "name": item[0], "acceptedAnswer": { '@type': 'Answer', "text": item[1] } })) }) }}
|
|
134
|
+
</script>
|
|
135
|
+
</section>
|
|
111
136
|
</main>
|
|
112
137
|
</template>
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Non-interactive recipe for AI agents to create a repoctl workspace with pnpm create repoctl --yes.
|
|
3
|
+
outline: deep
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Create a project with repoctl (AI)
|
|
7
|
+
|
|
8
|
+
Use this page when an agent is asked to create a new project with repoctl.
|
|
9
|
+
|
|
10
|
+
## Empty directory
|
|
11
|
+
|
|
12
|
+
Do not prompt. Run:
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
pnpm create repoctl <dir> -- --yes --templates <keys>
|
|
16
|
+
cd <dir>
|
|
17
|
+
pnpm install
|
|
18
|
+
pnpm exec repo init
|
|
19
|
+
pnpm exec repo doctor
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
`npm create repoctl@latest <dir> -- --yes --templates <keys>` and
|
|
23
|
+
`npx create-repoctl <dir> --yes --templates <keys>` are equivalent.
|
|
24
|
+
`pnpm create` and `npm create` need the extra `--` before flags.
|
|
25
|
+
|
|
26
|
+
## Template keys
|
|
27
|
+
|
|
28
|
+
| User intent | `--templates` / `repo new --template` |
|
|
29
|
+
| ------------------------ | ------------------------------------- |
|
|
30
|
+
| Vue / full-stack web app | `vue-hono` |
|
|
31
|
+
| API / Hono service | `hono-server` |
|
|
32
|
+
| TypeScript library / SDK | `tsdown` |
|
|
33
|
+
| Vue component library | `vue-lib` |
|
|
34
|
+
| Documentation site | `vitepress` |
|
|
35
|
+
| CLI | `cli` |
|
|
36
|
+
|
|
37
|
+
Omit `--templates` when the intent is unclear. After init, create a package with:
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm exec repo new <name> --template <key>
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Existing workspace
|
|
44
|
+
|
|
45
|
+
If `pnpm-workspace.yaml` and a `repoctl` dependency already exist, do not run create. Use `repo new` instead, then `pnpm exec repo check`.
|
|
@@ -4,6 +4,18 @@ outline: deep
|
|
|
4
4
|
|
|
5
5
|
# AI Documentation
|
|
6
6
|
|
|
7
|
+
## Product facts
|
|
8
|
+
|
|
9
|
+
| Field | Value |
|
|
10
|
+
| ------------- | ---------------------------------------------------- |
|
|
11
|
+
| Product | repoctl, task-first CLI for monorepos |
|
|
12
|
+
| Official site | https://repoctl.icebreaker.top |
|
|
13
|
+
| Source | https://github.com/sonofmagic/repoctl |
|
|
14
|
+
| npm package | `repoctl` — https://www.npmjs.com/package/repoctl |
|
|
15
|
+
| Install | `pnpm add -D repoctl` |
|
|
16
|
+
| Core commands | `repo init`, `repo doctor`, `repo new`, `repo check` |
|
|
17
|
+
| Works with | pnpm workspaces and Turborepo |
|
|
18
|
+
|
|
7
19
|
repoctl publishes AI-readable documentation alongside the human site.
|
|
8
20
|
|
|
9
21
|
## Recommended Entrypoints
|
|
@@ -11,6 +23,7 @@ repoctl publishes AI-readable documentation alongside the human site.
|
|
|
11
23
|
- `/llms.txt`: compact English index and product summary.
|
|
12
24
|
- `/llms-full.txt`: combined page content when a larger context is appropriate.
|
|
13
25
|
- `/zh/`: Simplified Chinese documentation.
|
|
26
|
+
- [Create a project](./create.md): non-interactive `pnpm create repoctl --yes` recipe.
|
|
14
27
|
- [llms.txt Guide](./llms-txt.md): usage and maintenance rules.
|
|
15
28
|
|
|
16
29
|
## Using It In AI Tools
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: repoctl, pnpm, and Turborepo
|
|
3
|
+
description: Understand how repoctl complements pnpm and Turborepo in a modern monorepo toolchain.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# repoctl, pnpm, and Turborepo
|
|
7
|
+
|
|
8
|
+
pnpm manages packages and dependencies. Turborepo orchestrates tasks and caching. repoctl provides repository workflows, conventions, diagnostics, templates, checks, reports, and release steps.
|
|
9
|
+
|
|
10
|
+
| Tool | Primary responsibility |
|
|
11
|
+
| --------- | -------------------------------------------- |
|
|
12
|
+
| pnpm | Workspace packages and dependency management |
|
|
13
|
+
| Turborepo | Task pipelines and caching |
|
|
14
|
+
| repoctl | Repository operations and guided checks |
|
|
15
|
+
|
|
16
|
+
See [what repoctl is](/start/what-is-repoctl) and [install repoctl](/start/install-repoctl).
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
"private": true,
|
|
6
6
|
"description": "Documentation website for repoctl",
|
|
7
7
|
"author": "ice breaker <hi@sonofmagic.top>",
|
|
8
|
+
"license": "MIT",
|
|
8
9
|
"homepage": "https://repoctl.icebreaker.top",
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
@@ -20,9 +21,12 @@
|
|
|
20
21
|
"vitepress",
|
|
21
22
|
"monorepo"
|
|
22
23
|
],
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22.13.0"
|
|
26
|
+
},
|
|
23
27
|
"scripts": {
|
|
24
28
|
"dev": "vitepress dev",
|
|
25
|
-
"check:locales": "
|
|
29
|
+
"check:locales": "node --experimental-strip-types scripts/check-locales.ts",
|
|
26
30
|
"build": "pnpm run check:locales && vitepress build",
|
|
27
31
|
"preview": "vitepress preview",
|
|
28
32
|
"deploy": "wrangler deploy",
|
|
@@ -33,7 +37,7 @@
|
|
|
33
37
|
"typecheck": "vue-tsc -p tsconfig.json --noEmit"
|
|
34
38
|
},
|
|
35
39
|
"dependencies": {
|
|
36
|
-
"vue": "^3.5.
|
|
40
|
+
"vue": "^3.5.43"
|
|
37
41
|
},
|
|
38
42
|
"devDependencies": {
|
|
39
43
|
"@braintree/sanitize-url": "^7.1.2",
|
|
@@ -42,13 +46,12 @@
|
|
|
42
46
|
"cytoscape-cose-bilkent": "^4.1.0",
|
|
43
47
|
"dayjs": "^1.11.23",
|
|
44
48
|
"debug": "^4.4.3",
|
|
45
|
-
"mermaid": "^
|
|
49
|
+
"mermaid": "^12.0.0",
|
|
46
50
|
"tailwindcss": "^4.3.3",
|
|
47
|
-
"tsx": "^4.23.13",
|
|
48
51
|
"vitepress": "^1.6.4",
|
|
49
|
-
"vitepress-plugin-llms": "^1.
|
|
52
|
+
"vitepress-plugin-llms": "^1.14.0",
|
|
50
53
|
"vitepress-plugin-mermaid": "^2.0.17",
|
|
51
54
|
"vue-tsc": "^3.3.11",
|
|
52
|
-
"wrangler": "^4.
|
|
55
|
+
"wrangler": "^4.133.0"
|
|
53
56
|
}
|
|
54
57
|
}
|
|
@@ -2,8 +2,8 @@ import type { DocsLocale } from '../.vitepress/navigation/routes'
|
|
|
2
2
|
import { readdir, readFile, stat } from 'node:fs/promises'
|
|
3
3
|
import path from 'node:path'
|
|
4
4
|
import process from 'node:process'
|
|
5
|
-
import { homeContent } from '../.vitepress/home/content'
|
|
6
|
-
import { routePath, routeSections } from '../.vitepress/navigation/routes'
|
|
5
|
+
import { homeContent } from '../.vitepress/home/content.ts'
|
|
6
|
+
import { routePath, routeSections } from '../.vitepress/navigation/routes.ts'
|
|
7
7
|
|
|
8
8
|
const root = process.cwd()
|
|
9
9
|
const ignoredDirectories = new Set(['.vitepress', 'node_modules'])
|
|
@@ -5,6 +5,8 @@ Use this section when repoctl is new to you. The shortest useful path is to inst
|
|
|
5
5
|
## Pick your first move
|
|
6
6
|
|
|
7
7
|
- [Install and initialize](./install.md) if this is your first repoctl command.
|
|
8
|
+
- [What is repoctl?](./what-is-repoctl.md) for the product overview.
|
|
9
|
+
- [Install repoctl](./install-repoctl.md) for the shortest setup path.
|
|
8
10
|
- [Run the first diagnosis](./diagnose.md) if repoctl is already installed.
|
|
9
11
|
- [Choose the next task](./choose-next.md) after you have a diagnosis.
|
|
10
12
|
|
|
@@ -23,4 +25,4 @@ The CLI works with pnpm workspaces and understands Turborepo task graphs. It doe
|
|
|
23
25
|
|
|
24
26
|
## Before you continue
|
|
25
27
|
|
|
26
|
-
You need Node.js 22.
|
|
28
|
+
You need Node.js 22.13 or newer and pnpm available on your path. Run commands from the repository root so repoctl can read the workspace configuration.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: Install repoctl
|
|
3
|
+
description: Install repoctl in a pnpm monorepo, initialize managed defaults, and run your first repository diagnosis.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Install repoctl
|
|
7
|
+
|
|
8
|
+
Install repoctl as a development dependency so every teammate and CI job uses the same version.
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pnpm add -D repoctl
|
|
12
|
+
pnpm exec repo init
|
|
13
|
+
pnpm exec repo doctor
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Continue with [checks](/tasks/checks) or [adopting an existing workspace](/tasks/adopt-existing).
|
|
@@ -4,7 +4,7 @@ This guide follows the order you would use when adding repoctl to a workspace.
|
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
|
-
- Node.js
|
|
7
|
+
- Node.js 22.13 or newer.
|
|
8
8
|
- pnpm. Corepack is recommended: `corepack enable`.
|
|
9
9
|
- Git. `repo doctor` reads repository metadata and checks the commit workflow.
|
|
10
10
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: What is repoctl?
|
|
3
|
+
description: repoctl is the official task-first CLI for initializing, diagnosing, and maintaining pnpm and Turborepo monorepos.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# What is repoctl?
|
|
7
|
+
|
|
8
|
+
repoctl is a task-first CLI for teams that build and maintain pnpm or Turborepo monorepos. It turns repository conventions into repeatable commands for initialization, diagnosis, project creation, checks, reports, and releases.
|
|
9
|
+
|
|
10
|
+
## Start with repoctl
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pnpm add -D repoctl
|
|
14
|
+
pnpm exec repo init
|
|
15
|
+
pnpm exec repo doctor
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Read the [installation guide](/start/install-repoctl) or [command reference](/reference/commands).
|
|
@@ -8,7 +8,7 @@ Use this task when a workspace already has scripts, hooks, or configuration that
|
|
|
8
8
|
|
|
9
9
|
- Run commands from the workspace root.
|
|
10
10
|
- Commit or stash unrelated local changes.
|
|
11
|
-
- Confirm that Node.js 22.
|
|
11
|
+
- Confirm that Node.js 22.13 or newer and pnpm are available.
|
|
12
12
|
|
|
13
13
|
## Smallest Command
|
|
14
14
|
|