@icebreakers/monorepo-templates 1.0.2 → 1.0.3

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 (50) hide show
  1. package/assets/.github/workflows/release.yml +42 -2
  2. package/assets/commitlint.config.ts +1 -3
  3. package/assets/eslint.config.js +2 -14
  4. package/assets/lint-staged.config.js +1 -3
  5. package/assets/package.json +8 -6
  6. package/assets/stylelint.config.js +1 -3
  7. package/assets/tsconfig.json +2 -1
  8. package/assets/vitest.config.ts +1 -3
  9. package/assets-data.mjs +0 -1
  10. package/dist/cli.d.mts +1 -0
  11. package/dist/cli.mjs +12 -0
  12. package/dist/index.mjs +1 -260
  13. package/dist/prepare-CtCifHGT.mjs +306 -0
  14. package/package.json +2 -2
  15. package/templates/client/package.json +1 -1
  16. package/templates/vitepress/.vitepress/config.ts +142 -69
  17. package/templates/vitepress/en/index.md +57 -0
  18. package/templates/vitepress/en/knowledge/monorepo.md +37 -0
  19. package/templates/vitepress/en/repoctl/adopt-existing.md +131 -0
  20. package/templates/vitepress/en/repoctl/aliases.md +71 -0
  21. package/templates/vitepress/en/repoctl/commands.md +120 -0
  22. package/templates/vitepress/en/repoctl/config.md +69 -0
  23. package/templates/vitepress/en/repoctl/getting-started.md +116 -0
  24. package/templates/vitepress/en/repoctl/index.md +74 -0
  25. package/templates/vitepress/en/repoctl/scenarios.md +117 -0
  26. package/templates/vitepress/en/repoctl/templates.md +128 -0
  27. package/templates/vitepress/en/repoctl/troubleshooting.md +96 -0
  28. package/templates/vitepress/en/repoctl/workflows.md +89 -0
  29. package/templates/vitepress/getting-started.md +21 -224
  30. package/templates/vitepress/index.md +41 -176
  31. package/templates/vitepress/monorepo/commands.md +13 -283
  32. package/templates/vitepress/monorepo/manage.md +16 -3
  33. package/templates/vitepress/monorepo/publish.md +52 -6
  34. package/templates/vitepress/monorepo/templates.md +14 -60
  35. package/templates/vitepress/monorepo/troubleshooting.md +14 -220
  36. package/templates/vitepress/repoctl/adopt-existing.md +135 -0
  37. package/templates/vitepress/repoctl/aliases.md +71 -0
  38. package/templates/vitepress/repoctl/commands.md +154 -0
  39. package/templates/vitepress/repoctl/config.md +81 -0
  40. package/templates/vitepress/repoctl/getting-started.md +122 -0
  41. package/templates/vitepress/repoctl/index.md +74 -0
  42. package/templates/vitepress/repoctl/scenarios.md +119 -0
  43. package/templates/vitepress/repoctl/templates.md +156 -0
  44. package/templates/vitepress/repoctl/troubleshooting.md +98 -0
  45. package/templates/vitepress/repoctl/workflows.md +105 -0
  46. package/templates/vitepress/tools/changeset.md +11 -0
  47. package/templates/vitepress/tools/husky.md +17 -0
  48. package/templates/vitepress/tools/lint-staged.md +10 -0
  49. package/templates/vitepress/tools/pnpm.md +26 -0
  50. package/templates/vitepress/tools/turborepo.md +17 -0
@@ -0,0 +1,131 @@
1
+ # Adopt Existing Repositories
2
+
3
+ repoctl is not only for newly generated repositories. It can be adopted gradually in existing pnpm workspaces by using diagnostics and conservative asset syncs.
4
+
5
+ ## Good Candidates
6
+
7
+ A repository is a good fit when:
8
+
9
+ - It already uses pnpm, or is ready to move to pnpm.
10
+ - It has a root `package.json`.
11
+ - It can use workspace folders such as `apps/*`, `packages/*`, or `examples/*`.
12
+ - The team wants stable daily entries such as `setup`, `doctor`, `new`, and `check`.
13
+
14
+ If the repository is not yet a pnpm workspace, start with a minimal `pnpm-workspace.yaml`:
15
+
16
+ ```yaml
17
+ packages:
18
+ - apps/*
19
+ - packages/*
20
+ ```
21
+
22
+ ## Step 1: Install And Setup
23
+
24
+ ```bash
25
+ pnpm add -D repoctl
26
+ pnpm exec repo setup --yes
27
+ ```
28
+
29
+ `setup --yes` uses safe defaults. It adds recommended scripts and workspace patterns, but it does not blindly overwrite existing README, package.json, pnpm-workspace.yaml, or tooling files.
30
+
31
+ ## Step 2: Save The First Diagnostic Report
32
+
33
+ ```bash
34
+ pnpm exec repo doctor --markdown --redact --out reports/doctor-before.md
35
+ pnpm exec repo doctor --json --out reports/doctor-before.json
36
+ ```
37
+
38
+ Prefer saving the first report as a PR comment or CI artifact instead of relying only on terminal output.
39
+
40
+ Watch these checks:
41
+
42
+ | Check | Common Issue |
43
+ | ---------------------------- | ----------------------------------------------------------------- |
44
+ | `package-json` | Current directory is not the repository root |
45
+ | `workspace-manifest` | `pnpm-workspace.yaml` is missing |
46
+ | `node-version` | Root package has no `engines.node`, or the version does not match |
47
+ | `tool-package` | `repoctl` is not installed |
48
+ | `root-scripts` | `setup/new/check/doctor` scripts are missing |
49
+ | `config-file` | `repoctl.config.ts` and `monorepo.config.ts` coexist |
50
+ | `commit-hooks` | Husky and lint-staged are only partially configured |
51
+ | `workspace-package-coverage` | Some package.json files are not covered by workspace patterns |
52
+
53
+ ## Step 3: Sync Conservatively
54
+
55
+ ```bash
56
+ pnpm exec repo upgrade --no-overwrite
57
+ pnpm exec repo doctor --markdown --redact --out reports/doctor-after.md
58
+ ```
59
+
60
+ Use `--no-overwrite` for the first adoption pass. It syncs missing assets while preserving changed managed files.
61
+
62
+ ## Step 4: Preview Verification
63
+
64
+ ```bash
65
+ pnpm exec repo check --dry-run
66
+ pnpm exec repo check --json --out reports/check-plan.json
67
+ pnpm exec repo check --markdown --redact --out reports/check-plan.md
68
+ ```
69
+
70
+ Review the plan before wiring hooks or CI.
71
+
72
+ ## Step 5: Use Root Scripts
73
+
74
+ After `setup`, team docs can use:
75
+
76
+ ```bash
77
+ pnpm doctor
78
+ pnpm new
79
+ pnpm check
80
+ ```
81
+
82
+ CI and automation should still prefer explicit commands:
83
+
84
+ ```bash
85
+ pnpm exec repo doctor --strict
86
+ pnpm exec repo check --full
87
+ ```
88
+
89
+ ## Step 6: Resolve Legacy Config
90
+
91
+ ### Config Conflicts
92
+
93
+ Keep only:
94
+
95
+ ```txt
96
+ repoctl.config.ts
97
+ ```
98
+
99
+ `monorepo.config.ts` is for compatibility with older projects.
100
+
101
+ ### Local Tooling Loader
102
+
103
+ If `doctor` reports local source tooling loaders, migrate with:
104
+
105
+ ```bash
106
+ pnpm exec repo upgrade --yes
107
+ ```
108
+
109
+ ### Workspace Pattern Gaps
110
+
111
+ Run:
112
+
113
+ ```bash
114
+ pnpm exec repo setup --yes
115
+ ```
116
+
117
+ or manually extend `pnpm-workspace.yaml`.
118
+
119
+ ## Recommended PR Shape
120
+
121
+ 1. Install `repoctl` and add root scripts.
122
+ 2. Attach `doctor-before` and `doctor-after` reports.
123
+ 3. Sync or migrate tooling config.
124
+ 4. Wire hooks and CI.
125
+ 5. Verify scaffolding paths with `repo new --dry-run`.
126
+
127
+ ## Keep Reading
128
+
129
+ - [Workflows and CI](./workflows.md)
130
+ - [Troubleshooting](./troubleshooting.md)
131
+ - [Configuration](./config.md)
@@ -0,0 +1,71 @@
1
+ # Command Aliases
2
+
3
+ repoctl keeps several aliases for terminal convenience. Team docs should still prefer full commands because they are easier for new users to read.
4
+
5
+ ## Binary Aliases
6
+
7
+ The `repoctl` package exposes these bins:
8
+
9
+ ```bash
10
+ repo
11
+ repoctl
12
+ monorepo
13
+ rc
14
+ mo
15
+ ```
16
+
17
+ The docs recommend `repo`.
18
+
19
+ Compatibility entry points remain available:
20
+
21
+ ```bash
22
+ repoctl doctor
23
+ monorepo doctor
24
+ rc doctor
25
+ mo doctor
26
+ ```
27
+
28
+ ## Top-Level Aliases
29
+
30
+ | Recommended | Alias | Purpose |
31
+ | ---------------- | ----------- | ----------------------------- |
32
+ | `repo setup` | `repo init` | Initialize workspace defaults |
33
+ | `repo upgrade` | `repo sync` | Sync standard template assets |
34
+ | `repo templates` | `repo tpl` | Inspect or check templates |
35
+
36
+ ## Group Aliases
37
+
38
+ | Full Command | Alias |
39
+ | ------------------------------ | --------------- |
40
+ | `repo workspace` | `repo ws` |
41
+ | `repo workspace upgrade` | `repo ws up` |
42
+ | `repo workspace list` | `repo ws ls` |
43
+ | `repo workspace clean` | `repo ws rm` |
44
+ | `repo tooling` | `repo tg` |
45
+ | `repo tooling init` | `repo tg i` |
46
+ | `repo package` | `repo pkg` |
47
+ | `repo package create` | `repo pkg new` |
48
+ | `repo verify` | `repo v` |
49
+ | `repo verify pre-push` | `repo v push` |
50
+ | `repo verify pre-commit` | `repo v commit` |
51
+ | `repo verify commit-msg` | `repo v msg` |
52
+ | `repo verify staged-typecheck` | `repo v tc` |
53
+ | `repo env` | `repo e` |
54
+ | `repo env info` | `repo e i` |
55
+ | `repo env snapshot` | `repo e s` |
56
+ | `repo env paths` | `repo e p` |
57
+ | `repo env support` | `repo e b` |
58
+ | `repo env mirror` | `repo e m` |
59
+ | `repo config` | `repo cfg` |
60
+ | `repo config inspect` | `repo cfg i` |
61
+ | `repo skills` | `repo sk` |
62
+ | `repo skills sync` | `repo sk s` |
63
+ | `repo ai prompt` | `repo ai p` |
64
+ | `repo ai prompt create` | `repo ai p new` |
65
+
66
+ ## Recommendation
67
+
68
+ - Use full commands in onboarding docs.
69
+ - Use root scripts in project README files.
70
+ - Use short aliases in maintainer scripts only when the surrounding docs explain them.
71
+ - Prefer full commands in CI logs.
@@ -0,0 +1,120 @@
1
+ # Command Reference
2
+
3
+ This page focuses on high-value repoctl commands and options.
4
+
5
+ ## Main Entry
6
+
7
+ ```bash
8
+ pnpm exec repo setup
9
+ pnpm exec repo doctor
10
+ pnpm exec repo templates
11
+ pnpm exec repo new
12
+ pnpm exec repo check
13
+ ```
14
+
15
+ Generated repositories also expose:
16
+
17
+ ```bash
18
+ pnpm setup
19
+ pnpm doctor
20
+ pnpm new
21
+ pnpm check
22
+ ```
23
+
24
+ ## `repo setup`
25
+
26
+ ```bash
27
+ repo setup
28
+ repo setup --yes
29
+ repo setup --preset minimal
30
+ repo setup --preset standard --force
31
+ repo setup --overwrite
32
+ ```
33
+
34
+ Use it to initialize recommended workspace defaults. It skips existing managed files by default, appends missing workspace patterns, and supports non-interactive CI usage with `--yes`.
35
+
36
+ ## `repo doctor`
37
+
38
+ ```bash
39
+ repo doctor
40
+ repo doctor --strict
41
+ repo doctor --json --out reports/doctor.json
42
+ repo doctor --markdown --redact --out reports/doctor.md
43
+ ```
44
+
45
+ Use it to check root workspace files, Node compatibility, CLI dependency presence, root scripts, config conflicts, and commit hooks.
46
+
47
+ `--strict` treats warnings as failures. `--redact` removes local absolute paths from shareable reports.
48
+
49
+ ## `repo templates`
50
+
51
+ ```bash
52
+ repo templates
53
+ repo templates tsdown
54
+ repo templates --category library
55
+ repo templates --check
56
+ repo templates --json
57
+ repo templates --markdown --out docs/templates.md
58
+ ```
59
+
60
+ Use it to discover built-in template keys, inspect metadata, verify template health, or generate machine-readable output.
61
+
62
+ ## `repo new`
63
+
64
+ ```bash
65
+ repo new
66
+ repo new sdk --template tsdown
67
+ repo new docs --template vitepress
68
+ repo new docs --template vitepress --dry-run
69
+ repo new docs --template vitepress --json --out plans/docs.json
70
+ ```
71
+
72
+ Use it to create packages and apps. Explicit template keys are validated first; invalid keys fail with suggestions instead of silently falling back.
73
+
74
+ ## `repo check`
75
+
76
+ ```bash
77
+ repo check
78
+ repo check --staged
79
+ repo check --full
80
+ repo check --edit-file .git/COMMIT_EDITMSG
81
+ repo check --dry-run
82
+ repo check --json --out reports/check-plan.json
83
+ repo check --markdown --redact --out reports/check-plan.md
84
+ ```
85
+
86
+ Use it to preview or run the recommended local verification flow. `--staged` is closer to pre-commit; `--full` is closer to pre-push.
87
+
88
+ ## `repo upgrade`
89
+
90
+ ```bash
91
+ repo upgrade
92
+ repo upgrade --yes
93
+ repo upgrade --overwrite
94
+ repo upgrade --no-overwrite
95
+ repo upgrade --core
96
+ repo upgrade -i
97
+ repo upgrade -s
98
+ ```
99
+
100
+ Use it to sync standard assets and scripts. `--core` skips GitHub-related assets. `--no-overwrite` preserves changed files.
101
+
102
+ ## Grouped Commands
103
+
104
+ ```bash
105
+ repo ws ls
106
+ repo ws ls --json --out reports/workspaces.json
107
+ repo ws up
108
+ repo tg init --all
109
+ repo verify pre-commit
110
+ repo verify pre-push
111
+ repo env support --markdown --redact --out reports/support.md
112
+ repo config inspect
113
+ repo skills sync --codex
114
+ ```
115
+
116
+ ## Keep Reading
117
+
118
+ - [Workflows and CI](./workflows.md)
119
+ - [Troubleshooting](./troubleshooting.md)
120
+ - [Command Aliases](./aliases.md)
@@ -0,0 +1,69 @@
1
+ # Configuration
2
+
3
+ repoctl recommends one root config file:
4
+
5
+ ```txt
6
+ repoctl.config.ts
7
+ ```
8
+
9
+ `monorepo.config.ts` remains supported for compatibility, but the two files cannot coexist. `repo doctor` reports the conflict as a blocking issue.
10
+
11
+ ## Minimal Config
12
+
13
+ ```ts
14
+ import { defineMonorepoConfig } from 'repoctl'
15
+
16
+ export default defineMonorepoConfig({
17
+ commands: {
18
+ create: {
19
+ defaultTemplate: 'tsdown',
20
+ },
21
+ },
22
+ })
23
+ ```
24
+
25
+ After setting `commands.create.defaultTemplate`, this command can create a package without asking for the template:
26
+
27
+ ```bash
28
+ repo new utils
29
+ ```
30
+
31
+ ## Common Config
32
+
33
+ ```ts
34
+ import { defineMonorepoConfig } from 'repoctl'
35
+
36
+ export default defineMonorepoConfig({
37
+ commands: {
38
+ init: {
39
+ preset: 'standard',
40
+ },
41
+ create: {
42
+ defaultTemplate: 'tsdown',
43
+ },
44
+ clean: {
45
+ autoConfirm: true,
46
+ },
47
+ upgrade: {
48
+ skipOverwrite: true,
49
+ },
50
+ },
51
+ })
52
+ ```
53
+
54
+ | Option | Purpose |
55
+ | --------------------------------- | ----------------------------------------------- |
56
+ | `commands.init.preset` | Default setup preset |
57
+ | `commands.create.defaultTemplate` | Default template for `repo new <name>` |
58
+ | `commands.clean.autoConfirm` | Whether clean commands confirm by default |
59
+ | `commands.upgrade.skipOverwrite` | Whether upgrade preserves changed managed files |
60
+
61
+ ## Inspect Config
62
+
63
+ ```bash
64
+ repo config inspect
65
+ repo cfg i --json --out reports/config.json
66
+ repo cfg i --markdown --redact --out reports/config.md
67
+ ```
68
+
69
+ Use `--redact` before sharing reports in issues, PRs, or external support channels.
@@ -0,0 +1,116 @@
1
+ # Getting Started
2
+
3
+ This guide follows the order you would use when adding repoctl to a workspace.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js 20 or newer.
8
+ - pnpm. Corepack is recommended: `corepack enable`.
9
+ - Git. `repo doctor` reads repository metadata and checks the commit workflow.
10
+
11
+ ```bash
12
+ node -v
13
+ pnpm -v
14
+ git --version
15
+ ```
16
+
17
+ ## Install
18
+
19
+ ```bash
20
+ pnpm add -D repoctl
21
+ ```
22
+
23
+ If the repository was generated from this template, the dependency and root scripts may already be present.
24
+
25
+ ## Initialize Defaults
26
+
27
+ ```bash
28
+ pnpm install
29
+ pnpm exec repo setup
30
+ pnpm exec repo doctor
31
+ ```
32
+
33
+ | Command | Purpose |
34
+ | -------------- | --------------------------------------------------------------------------- |
35
+ | `pnpm install` | Install workspace dependencies and local links |
36
+ | `repo setup` | Add recommended scripts, workspace patterns, and tooling entries |
37
+ | `repo doctor` | Check root files, Node version, CLI dependency, config conflicts, and hooks |
38
+
39
+ Fix blocking issues reported by `doctor`, then run it again.
40
+
41
+ ## Create A Package
42
+
43
+ List templates first:
44
+
45
+ ```bash
46
+ pnpm exec repo templates
47
+ ```
48
+
49
+ Create a TypeScript library:
50
+
51
+ ```bash
52
+ pnpm exec repo new sdk --template tsdown
53
+ ```
54
+
55
+ Preview before writing files:
56
+
57
+ ```bash
58
+ pnpm exec repo new sdk --template tsdown --dry-run
59
+ pnpm exec repo new sdk --template tsdown --json --out plans/sdk.json
60
+ ```
61
+
62
+ `--json` and `--out` imply `--dry-run`, which makes them suitable for CI, editor integrations, and scripts.
63
+
64
+ ## Use Short Root Scripts
65
+
66
+ After `repo setup`, daily commands can be shorter:
67
+
68
+ ```bash
69
+ pnpm setup
70
+ pnpm doctor
71
+ pnpm new sdk --template tsdown
72
+ pnpm check
73
+ ```
74
+
75
+ | Root script | Equivalent CLI |
76
+ | ------------- | ----------------------- |
77
+ | `pnpm setup` | `pnpm exec repo setup` |
78
+ | `pnpm doctor` | `pnpm exec repo doctor` |
79
+ | `pnpm new` | `pnpm exec repo new` |
80
+ | `pnpm check` | `pnpm exec repo check` |
81
+
82
+ ## Verify Before Committing
83
+
84
+ ```bash
85
+ pnpm build
86
+ pnpm lint
87
+ pnpm typecheck
88
+ pnpm test
89
+ ```
90
+
91
+ Or use the repoctl verification entry:
92
+
93
+ ```bash
94
+ pnpm check
95
+ pnpm exec repo check --dry-run
96
+ pnpm exec repo check --json --out reports/check-plan.json
97
+ ```
98
+
99
+ ## Sync Template Assets
100
+
101
+ ```bash
102
+ pnpm exec repo upgrade
103
+ pnpm exec repo upgrade --no-overwrite
104
+ pnpm exec repo upgrade --yes
105
+ ```
106
+
107
+ - `--no-overwrite` preserves changed managed files.
108
+ - `--yes` or `--overwrite` is for explicit automated overwrites.
109
+ - Non-TTY environments do not open interactive prompts.
110
+
111
+ ## Next Steps
112
+
113
+ - Adopt an existing repository: [Adopt Existing Repositories](./adopt-existing.md).
114
+ - Set team defaults: [Configuration](./config.md).
115
+ - Inspect template keys: [Templates](./templates.md).
116
+ - Share diagnostic output: [Troubleshooting](./troubleshooting.md).
@@ -0,0 +1,74 @@
1
+ # repoctl Overview
2
+
3
+ `repoctl` is the user-facing package name for this monorepo toolkit. Its recommended command is `repo`.
4
+
5
+ The CLI does not replace pnpm, Turborepo, or changesets. It gives teams a stable layer for common monorepo actions: setup, diagnostics, scaffolding, local verification, and template asset upgrades.
6
+
7
+ ## When To Use It
8
+
9
+ | Goal | Command |
10
+ | ----------------------------------------------------- | ------------------------ |
11
+ | Add recommended scripts and workspace defaults | `pnpm exec repo setup` |
12
+ | Check whether a repository is ready to develop | `pnpm exec repo doctor` |
13
+ | Create a package, app, docs site, service, or CLI | `pnpm exec repo new` |
14
+ | Reproduce the recommended pre-commit or pre-push flow | `pnpm exec repo check` |
15
+ | Sync newer standard assets from the template | `pnpm exec repo upgrade` |
16
+ | Persist output for CI, editors, or issue reports | `--json --out <file>` |
17
+
18
+ ## Recommended Command Layers
19
+
20
+ ### Root Scripts
21
+
22
+ ```bash
23
+ pnpm setup
24
+ pnpm doctor
25
+ pnpm new
26
+ pnpm check
27
+ ```
28
+
29
+ These are the best commands for day-to-day team docs.
30
+
31
+ ### Explicit CLI Calls
32
+
33
+ ```bash
34
+ pnpm exec repo setup
35
+ pnpm exec repo doctor
36
+ pnpm exec repo templates
37
+ pnpm exec repo new sdk --template tsdown
38
+ pnpm exec repo check --dry-run
39
+ ```
40
+
41
+ Use this form in CI, scripts, troubleshooting docs, and reproducible examples.
42
+
43
+ ### Grouped Commands
44
+
45
+ ```bash
46
+ pnpm exec repo ws ls
47
+ pnpm exec repo tg init --all
48
+ pnpm exec repo env support --markdown --redact
49
+ pnpm exec repo config inspect
50
+ ```
51
+
52
+ Grouped commands are for maintainers and automation that need finer control.
53
+
54
+ ## Compatibility
55
+
56
+ The package still supports compatibility entry points:
57
+
58
+ ```bash
59
+ pnpm exec repoctl doctor
60
+ pnpm exec repoctl new
61
+ ```
62
+
63
+ The docs prefer `repo` so new users only need to remember one command name.
64
+
65
+ ## Keep Reading
66
+
67
+ - [Getting Started](./getting-started.md)
68
+ - [Choose By Scenario](./scenarios.md)
69
+ - [Command Reference](./commands.md)
70
+ - [Configuration](./config.md)
71
+ - [Templates](./templates.md)
72
+ - [Workflows and CI](./workflows.md)
73
+ - [Troubleshooting](./troubleshooting.md)
74
+ - [Command Aliases](./aliases.md)
@@ -0,0 +1,117 @@
1
+ # Choose By Scenario
2
+
3
+ Start here when you know what you want to do, but not which repoctl command to use.
4
+
5
+ ## I Just Opened A Repository
6
+
7
+ ```bash
8
+ pnpm install
9
+ pnpm doctor
10
+ ```
11
+
12
+ If `pnpm doctor` does not exist yet:
13
+
14
+ ```bash
15
+ pnpm add -D repoctl
16
+ pnpm exec repo setup --yes
17
+ pnpm exec repo doctor
18
+ ```
19
+
20
+ Keep reading: [Getting Started](./getting-started.md).
21
+
22
+ ## I Want To Adopt repoctl In An Existing Repo
23
+
24
+ ```bash
25
+ pnpm add -D repoctl
26
+ pnpm exec repo setup --yes
27
+ pnpm exec repo doctor --markdown --redact --out reports/doctor-before.md
28
+ pnpm exec repo upgrade --no-overwrite
29
+ pnpm exec repo doctor --markdown --redact --out reports/doctor-after.md
30
+ ```
31
+
32
+ Keep reading: [Adopt Existing Repositories](./adopt-existing.md).
33
+
34
+ ## I Want To Create A Package Or App
35
+
36
+ ```bash
37
+ pnpm exec repo templates
38
+ pnpm exec repo new sdk --template tsdown
39
+ pnpm exec repo new docs --template vitepress --dry-run
40
+ ```
41
+
42
+ For daily development, root scripts also work:
43
+
44
+ ```bash
45
+ pnpm new sdk --template tsdown
46
+ ```
47
+
48
+ Keep reading: [Templates](./templates.md).
49
+
50
+ ## I Want To Check Before Committing
51
+
52
+ ```bash
53
+ pnpm check
54
+ pnpm exec repo check --dry-run
55
+ pnpm exec repo check --full
56
+ ```
57
+
58
+ Save the plan when automation needs it:
59
+
60
+ ```bash
61
+ pnpm exec repo check --json --out reports/check-plan.json
62
+ pnpm exec repo check --markdown --redact --out reports/check-plan.md
63
+ ```
64
+
65
+ Keep reading: [Workflows and CI](./workflows.md).
66
+
67
+ ## I Want To Debug CI Or Another Machine
68
+
69
+ ```bash
70
+ pnpm exec repo doctor --markdown --redact --out reports/doctor.md
71
+ pnpm exec repo env support --markdown --redact --out reports/support.md
72
+ pnpm exec repo env snapshot --json --out reports/snapshot.json
73
+ ```
74
+
75
+ Keep reading: [Troubleshooting](./troubleshooting.md).
76
+
77
+ ## I Want To Sync Standard Assets
78
+
79
+ ```bash
80
+ pnpm exec repo upgrade --no-overwrite
81
+ pnpm exec repo upgrade --yes
82
+ pnpm exec repo upgrade --core
83
+ ```
84
+
85
+ | Goal | Command |
86
+ | ------------------------------------------ | ----------------------------- |
87
+ | First adoption pass, preserve local config | `repo upgrade --no-overwrite` |
88
+ | Explicitly overwrite managed assets | `repo upgrade --yes` |
89
+ | Sync only core config | `repo upgrade --core` |
90
+
91
+ ## I Want To Inspect Workspace Structure
92
+
93
+ ```bash
94
+ pnpm exec repo ws ls
95
+ pnpm exec repo ws ls --json --out reports/workspaces.json
96
+ pnpm exec repo ws ls --markdown --redact --out reports/workspaces.md
97
+ ```
98
+
99
+ ## I Want To Inspect Config
100
+
101
+ ```bash
102
+ pnpm exec repo config inspect
103
+ pnpm exec repo cfg i --json --out reports/config.json
104
+ ```
105
+
106
+ Keep reading: [Configuration](./config.md).
107
+
108
+ ## I Want Shorter Commands
109
+
110
+ ```bash
111
+ repo tpl
112
+ repo ws ls
113
+ repo e support --markdown --redact
114
+ repo cfg i
115
+ ```
116
+
117
+ Keep reading: [Command Aliases](./aliases.md).