Skip to content

Commit 18a3178

Browse files
committed
docs: prefer managed/Scoop on Windows; avoid winget and Chocolatey
Recommend GitHub-tracking install and upgrade paths only. Status and ready-check upgrade actions prefer Update/Install Patchloom managed over Open Releases so users do not stick on lagging community packages. Signed-off-by: Sebastien Tardif <sebtardif@ncf.ca>
1 parent dc32f4c commit 18a3178

7 files changed

Lines changed: 117 additions & 36 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ test/
5151
batchApply.test.ts Batch template and operation count parsing (16 tests)
5252
binary.test.ts Binary discovery, managed install, compatibility, workspace env (59 tests)
5353
binaryDiscovery.test.ts Real executable discovery on PATH (13 tests)
54-
initializeProject.test.ts Status display, agents file classification, formatError (37 tests)
54+
initializeProject.test.ts Status display, agents file classification, formatError (39 tests)
5555
managedLifecycle.test.ts Managed install with real file I/O (22 tests)
5656
mcpConfig.test.ts MCP config with real temp directories (12 tests)
5757
outputChannel.test.ts Output channel logging wrapper (10 tests)

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,16 @@ Or search for **Patchloom** in the Extensions view (`Ctrl+Shift+X` / `Cmd+Shift+
2525

2626
## Get started in 30 seconds
2727

28-
1. Install the [Patchloom CLI](https://github.com/patchloom/patchloom) (or run **Patchloom: Install Patchloom** from the command palette)
28+
1. Install the [Patchloom CLI](https://github.com/patchloom/patchloom) (or run **Patchloom: Install Patchloom** from the command palette; recommended: tracks GitHub Releases with checksum verification)
2929
```sh
3030
brew install patchloom/tap/patchloom # macOS / Linux (Homebrew)
3131
npm install -g patchloom # npm (Node.js)
3232
curl -LsSf https://github.com/patchloom/patchloom/releases/latest/download/patchloom-installer.sh | sh # shell script
3333
cargo install patchloom # from source
3434
scoop bucket add patchloom https://github.com/patchloom/scoop-bucket
35-
scoop install patchloom # Windows (Scoop; preferred Windows channel)
36-
winget install Patchloom.Patchloom # Windows (WinGet; run winget source update if the package is missing)
37-
choco install patchloom # Windows (Chocolatey; often lags moderation)
35+
scoop install patchloom # Windows (Scoop; preferred PATH channel)
3836
```
37+
On Windows, prefer the extension managed installer or Scoop. Avoid winget and Chocolatey for install or upgrade: both lag GitHub Releases and often leave you on an old CLI.
3938
2. Open a project and run **Patchloom: Setup Workspace**
4039

4140
<p align="center">
@@ -175,8 +174,14 @@ The extension detects outdated CLI builds and warns with upgrade guidance. It re
175174
**Patchloom not found**
176175
Set `patchloom.path` in settings, or add the CLI to your `PATH`.
177176

178-
**CLI compatibility warning**
179-
Run `Patchloom: Open Releases` to download the latest release. The extension requires 0.3.0 or newer; **0.28.0** is recommended.
177+
**CLI compatibility warning / upgrade path**
178+
The extension requires Patchloom **0.3.0** or newer; **0.28.0** is recommended. Prefer channels that track GitHub Releases the same day:
179+
180+
1. **Patchloom: Update Patchloom** (or **Install Patchloom**) for the extension managed install (checksum-verified download from GitHub Releases)
181+
2. **Scoop** on Windows: `scoop update patchloom` after `scoop install patchloom`
182+
3. Homebrew / npm / cargo / the official installer script on macOS and Linux
183+
184+
Do **not** rely on winget or Chocolatey to stay current. Those community packages lag moderation and Microsoft publish, so upgrades often stay stuck on older CLI versions.
180185

181186
**Path rejected by workspace guard**
182187
Quick Actions and Batch Apply pass `--contain` so paths stay inside the open workspace folder. On CLI 0.18+, sandbox escapes report `error_kind: guard_rejected` (not a generic `invalid_input`). Keep targets under the workspace root, or open the folder that owns the files.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
{
163163
"id": "installCli",
164164
"title": "Install the Patchloom CLI",
165-
"description": "Install the Patchloom CLI via the managed installer, Homebrew, or cargo.\n\n[Install Patchloom](command:patchloom.installBinary)",
165+
"description": "Install the Patchloom CLI via the managed installer (recommended), Scoop on Windows, Homebrew, or cargo. Avoid winget and Chocolatey; they lag releases.\n\n[Install Patchloom](command:patchloom.installBinary)",
166166
"media": {
167167
"markdown": "walkthrough/install.md"
168168
},

src/binary/patchloom.ts

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,23 @@ export async function ensurePatchloomReadyOrNotify(
182182

183183
if (patchloomNeedsUpgrade(status)) {
184184
const vscode = await import("vscode");
185+
// Prefer managed install/update (GitHub Releases) over lagging community packages.
186+
const canUpdateManaged = status.source === "managed" || status.managedInstall?.exists === true;
187+
const canInstallManaged = status.managedInstall !== undefined;
188+
const primaryAction = canUpdateManaged
189+
? "Update Patchloom"
190+
: canInstallManaged
191+
? "Install Patchloom"
192+
: "Open Releases";
185193
const choice = await vscode.window.showWarningMessage(
186194
`${status.compatibilityMessage}${contextSuffix ? `\n\n${contextSuffix}` : ""}`,
187-
"Open Releases"
195+
primaryAction
188196
);
189-
if (choice === "Open Releases") {
197+
if (choice === "Update Patchloom") {
198+
await vscode.commands.executeCommand("patchloom.updateBinary");
199+
} else if (choice === "Install Patchloom") {
200+
await vscode.commands.executeCommand("patchloom.installBinary");
201+
} else if (choice === "Open Releases") {
190202
await vscode.commands.executeCommand("patchloom.openPatchloomReleases");
191203
}
192204
return null;

src/status/details.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,20 @@ export function preferredStatusAction(status: PatchloomStatus, workspaceReadines
5757
}
5858

5959
if (patchloomNeedsUpgrade(status)) {
60+
// Prefer managed install/update so users stay on GitHub Releases (not lagging
61+
// community packages such as winget/Chocolatey).
62+
if (status.source === "managed" || status.managedInstall?.exists) {
63+
return {
64+
title: "Update Patchloom",
65+
command: "patchloom.updateBinary"
66+
};
67+
}
68+
if (status.managedInstall) {
69+
return {
70+
title: "Install Patchloom",
71+
command: "patchloom.installBinary"
72+
};
73+
}
6074
return {
6175
title: "Open Releases",
6276
command: "patchloom.openPatchloomReleases"

test/unit/initializeProject.test.ts

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,65 @@ test("buildStatusDetails surfaces managed install failure diagnostics", () => {
344344
assert.match(details, /Managed install diagnostic: Checksum mismatch/);
345345
});
346346

347-
test("preferredStatusAction points outdated CLI users to releases", () => {
347+
test("preferredStatusAction points outdated PATH CLI users to managed install", () => {
348+
const action = preferredStatusAction({
349+
ready: true,
350+
source: "path",
351+
message: "Using Patchloom from PATH.",
352+
binaryPath: "/usr/local/bin/patchloom",
353+
version: "patchloom 0.0.9",
354+
detectedVersion: "0.0.9",
355+
compatibility: "unsupported",
356+
minimumSupportedVersion: MINIMUM_SUPPORTED_PATCHLOOM_VERSION,
357+
compatibilityMessage: `Patchloom 0.0.9 is older than the minimum supported version ${MINIMUM_SUPPORTED_PATCHLOOM_VERSION}.`,
358+
managedInstall: {
359+
exists: false,
360+
binaryPath: "/managed/managed-bin/patchloom",
361+
target: {
362+
platform: "darwin",
363+
arch: "arm64",
364+
targetTriple: "aarch64-apple-darwin",
365+
archiveFormat: ".tar.xz"
366+
}
367+
}
368+
});
369+
370+
assert.deepEqual(action, {
371+
title: "Install Patchloom",
372+
command: "patchloom.installBinary"
373+
});
374+
});
375+
376+
test("preferredStatusAction points outdated managed CLI users to update", () => {
377+
const action = preferredStatusAction({
378+
ready: true,
379+
source: "managed",
380+
message: "Using managed Patchloom install.",
381+
binaryPath: "/managed/managed-bin/patchloom",
382+
version: "patchloom 0.0.9",
383+
detectedVersion: "0.0.9",
384+
compatibility: "unsupported",
385+
minimumSupportedVersion: MINIMUM_SUPPORTED_PATCHLOOM_VERSION,
386+
compatibilityMessage: `Patchloom 0.0.9 is older than the minimum supported version ${MINIMUM_SUPPORTED_PATCHLOOM_VERSION}.`,
387+
managedInstall: {
388+
exists: true,
389+
binaryPath: "/managed/managed-bin/patchloom",
390+
target: {
391+
platform: "darwin",
392+
arch: "arm64",
393+
targetTriple: "aarch64-apple-darwin",
394+
archiveFormat: ".tar.xz"
395+
}
396+
}
397+
});
398+
399+
assert.deepEqual(action, {
400+
title: "Update Patchloom",
401+
command: "patchloom.updateBinary"
402+
});
403+
});
404+
405+
test("preferredStatusAction falls back to releases when managed install unavailable", () => {
348406
const action = preferredStatusAction({
349407
ready: true,
350408
source: "path",

walkthrough/install.md

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,43 @@
11
# Install the Patchloom CLI
22

3-
Patchloom needs the CLI binary to work. Choose one of these methods:
3+
Patchloom needs the CLI binary to work. Prefer channels that track
4+
GitHub Releases promptly (same day as the tag).
45

5-
## Managed Install (Recommended)
6+
## Managed Install (Recommended on all platforms)
67

78
Click **Install Patchloom** above to download and install the CLI
89
automatically. The extension handles download, checksum verification,
9-
and installation.
10+
and installation from GitHub Releases.
1011

11-
## Homebrew
12+
To upgrade later, run **Patchloom: Update Patchloom** (managed install
13+
only). That path always pulls the latest GitHub release.
1214

13-
```bash
14-
brew install patchloom/tap/patchloom
15-
```
16-
17-
## npm
18-
19-
```bash
20-
npm install -g patchloom
21-
# or one-shot: npx patchloom --version
22-
```
23-
24-
## Scoop (Windows, preferred)
15+
## Scoop (preferred Windows PATH install)
2516

2617
```bash
2718
scoop bucket add patchloom https://github.com/patchloom/scoop-bucket
2819
scoop install patchloom
20+
scoop update patchloom
2921
```
3022

31-
Scoop tracks GitHub Releases promptly. Prefer it when you manage Windows installs yourself.
23+
Scoop tracks the project release bucket. Use it when you want the CLI on
24+
`PATH` yourself. Avoid winget and Chocolatey for install or upgrade:
25+
both lag GitHub Releases and often leave you on an old version.
3226

33-
## WinGet (Windows)
27+
## Homebrew (macOS / Linux)
3428

3529
```bash
36-
winget install Patchloom.Patchloom
30+
brew install patchloom/tap/patchloom
31+
brew upgrade patchloom
3732
```
3833

39-
After a new release, you may need `winget source update` before the package appears. Microsoft publish can lag the GitHub tag by a short window.
40-
41-
## Chocolatey (Windows)
34+
## npm
4235

4336
```bash
44-
choco install patchloom
37+
npm install -g patchloom
38+
# or one-shot: npx patchloom --version
4539
```
4640

47-
Community moderation often lags Scoop and GitHub portable assets.
48-
4941
## Cargo
5042

5143
```bash

0 commit comments

Comments
 (0)