Commit 99d4b1d
feat: one-command bootstrap (bootstrap.ps1 + mur doctor/upgrade + dotnet-tool mur) (#425)
* feat(mur): pack as dotnet global tool + doctor and upgrade verbs
Lays the CLI groundwork for one-command bootstrap:
- Reactor.Cli.csproj now packs as a dotnet global tool
(PackAsTool, ToolCommandName=mur, PackageId=Microsoft.UI.Reactor.Cli),
so `dotnet tool install -g` puts `mur` on PATH cross-shell with no
per-arch $env:Path edits. The legacy bin/<arch>/ mirror is kept for
existing PATH-based installs.
- `mur doctor` — verifies .NET 10+ SDK, mur resolvability, local-nupkgs/
feed currency, the reactorapp template registration, and the Claude
plugin. Each FAIL prints a copy-pasteable remediation.
- `mur upgrade` — re-packs the in-source framework + ProjectTemplates,
reinstalls the template (uninstall-first to bypass the template-engine
cache), and refreshes the Claude plugin. Does not update `mur` itself
(a process can't replace its own binary mid-run); prints the bump-mur
command on completion.
- pack-local / --regen-api repo-root discovery now prefers CWD before
AppContext.BaseDirectory, so a globally-installed `mur` (living under
~/.dotnet/tools) still resolves the source checkout the user is in.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* feat(bootstrap): one-command setup script for source checkouts
bootstrap.ps1 collapses the six-step Setup in getting-started.md into a
single command. It does pre-flight (.NET SDK check), packs `mur` as a
global-tool nupkg, runs `dotnet tool install/update -g`, runs `mur
pack-local` (framework + ProjectTemplates → local-nupkgs/), installs the
`dotnet new reactorapp` template (uninstall-first to dodge the
template-engine cache), and drops the Claude Code plugin under
~/.claude/plugins/reactor (symlink when allowed, copy fallback).
Idempotent — safe to re-run after `git pull` to refresh everything. For
a lighter-weight refresh that leaves `mur` itself in place, run
`mur upgrade`.
Flags: -SkipPlugin, -SkipMurInstall, -Configuration. Detects host arch
from $env:PROCESSOR_ARCHITECTURE so the SignaturesGen apphost build step
matches the machine. Prepends ~/.dotnet/tools to $env:Path in-process so
the same shell can use `mur` immediately (no "open a new shell" beat).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs(getting-started): rewrite Setup around bootstrap.ps1 + mur upgrade
Replaces the six-step manual Setup (clone → build → PATH-munge → new
shell → pack-local → template install + symlink dance) with two
commands: `git clone` + `./bootstrap.ps1`.
New sections:
- "After `git pull`" — recommends `mur upgrade` (lightweight) vs.
re-running `bootstrap.ps1` (also bumps the `mur` global tool).
- "Verify the install" — points at `mur doctor`, which is the right
first move when `dotnet new reactorapp` misbehaves.
Updates the NU1101 caveat to reflect the new flow (re-run bootstrap or
`mur upgrade`, not "re-run pack-local"), and notes that `mur upgrade`
handles the template-engine cache for you.
Regenerated docs/guide/getting-started.md from the edited template.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* docs: add Quick start to README + Manual setup section to getting-started
README "Quick start" was a one-line link to docs/guide; replace it with
the actual `git clone` + `./bootstrap.ps1` + `dotnet new reactorapp`
sequence so readers can copy-paste from the repo home page, then link to
the manual walkthrough for readers who want the no-magic path.
getting-started.md.dt gains a "Manual setup" section after "Verify the
install" that walks through exactly what bootstrap.ps1 does, step by
step:
1. dotnet --list-sdks (prerequisite check)
2. git clone + cd
3. dotnet pack src/Reactor.Cli (as global-tool nupkg)
4. dotnet tool install -g (+ in-process PATH prepend)
5. mur pack-local (framework + ProjectTemplates → local-nupkgs)
6. dotnet new uninstall + install (template, cache-bust)
7. symlink/copy plugins/reactor → ~/.claude/plugins/reactor
8. mur doctor verify
Plus a "Refreshing after git pull" note (re-run steps 5 + 6; only do 3 +
4 when the CLI itself changed) and a "Why a global tool vs bin/<arch>/?"
explainer pointing at the legacy mirror layout for users who'd rather
PATH-mount the build output.
Rendered docs/guide/getting-started.md mirrors the template addition.
Re-running `mur docs compile` against the rest of the doc currently
loses the inline todo/calculator code samples (snippet sources broken
locally — pre-existing pipeline state, unrelated to this PR), so the
rendered file was edited to add just the new Manual setup section
rather than committing a degraded full-recompile.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
* fix(bootstrap): docs tier-drift, fail-fast SDK, harden upgrade RunDotnet
CI fix:
- Adding the "Manual setup" section pushed the existing element-reference
table past the rendered page's midpoint, tripping
REACTOR_DOC_TIER_005 ("no reference table found in the first half of
the page") in both Docs tier-drift and Docs compile (--ci). Adds an
8-row "step → what it produces" summary table at the top of the
Manual setup section — sits well before the midpoint and serves as a
genuine cross-reference. `mur docs check-tier --topic getting-started`
is now clean apart from the pre-existing W001 winui-ref warning.
PR review feedback (Copilot):
- DoctorCommand header: correct the exit-code contract (non-zero on
FAILs only, not on WARNs) and align the "Checks (in order)" list
with what the command actually emits (separate framework / template
nupkg checks, repo-checkout warn behavior, `dotnet new` template
check runs unconditionally).
- DoctorCommand "skipping ... template checks" warn message: clarify
that only the local-feed nupkg checks are skipped when run outside a
source checkout — the `dotnet new` template check still runs.
- UpgradeCommand.RunDotnet: wrap Process.Start in try/catch and handle
a null return so `mur upgrade` fails gracefully with a clear message
+ non-zero exit when `dotnet` is missing from PATH, instead of bare
null-deref via `Process.Start(psi)!`.
- bootstrap.ps1: fail fast when no .NET 10+ SDK is detected, dumping
the actual `dotnet --list-sdks` output, instead of printing a yellow
warning and continuing into a later, less-actionable pack failure.
Not addressed in this commit:
- Adding unit tests for the doctor/upgrade verbs. Deferred — out of
scope for the CI-fix turn. Captured in a follow-up below.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e476287 commit 99d4b1d
9 files changed
Lines changed: 1223 additions & 130 deletions
File tree
- docs
- _pipeline/templates
- guide
- src/Reactor.Cli
- Doctor
- Pack
- Upgrade
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
73 | 73 | | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
74 | 78 | | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
75 | 87 | | |
76 | 88 | | |
77 | 89 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
0 commit comments