Skip to content

Commit 0218dbf

Browse files
cdervclaude
andcommitted
Update CLI help text to document chrome-headless-shell tool
Use dynamic tool names in install/uninstall descriptions via installableToolNames(). Add chrome-headless-shell examples and label chromium as legacy in install, uninstall, and update commands. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 4289d71 commit 0218dbf

4 files changed

Lines changed: 26 additions & 5 deletions

File tree

src/command/install/cmd.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
selectTool,
1515
updateOrInstallTool,
1616
} from "../../tools/tools-console.ts";
17-
import { installTool } from "../../tools/tools.ts";
17+
import { installableToolNames, installTool } from "../../tools/tools.ts";
1818
import { resolveCompatibleArgs } from "../remove/cmd.ts";
1919

2020
export const installCommand = new Command()
@@ -36,14 +36,18 @@ export const installCommand = new Command()
3636
"Update system path when a tool is installed",
3737
)
3838
.description(
39-
"Installs a global dependency (TinyTex or Chromium).",
39+
`Installs a global dependency (${installableToolNames().join(", ")}).`,
4040
)
4141
.example(
4242
"Install TinyTeX",
4343
"quarto install tinytex",
4444
)
4545
.example(
46-
"Install Chromium",
46+
"Install Chrome Headless Shell",
47+
"quarto install chrome-headless-shell",
48+
)
49+
.example(
50+
"Install Chromium (legacy)",
4751
"quarto install chromium",
4852
)
4953
.example(

src/command/uninstall/cmd.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {
1313
removeTool,
1414
selectTool,
1515
} from "../../tools/tools-console.ts";
16+
import { installableToolNames } from "../../tools/tools.ts";
1617

1718
export const uninstallCommand = new Command()
1819
.name("uninstall")
@@ -26,12 +27,20 @@ export const uninstallCommand = new Command()
2627
"Update system path when a tool is installed",
2728
)
2829
.description(
29-
"Removes an extension.",
30+
`Removes an extension or global dependency (${installableToolNames().join(", ")}).`,
3031
)
3132
.example(
3233
"Remove extension using name",
3334
"quarto remove <extension-name>",
3435
)
36+
.example(
37+
"Uninstall Chrome Headless Shell",
38+
"quarto uninstall chrome-headless-shell",
39+
)
40+
.example(
41+
"Uninstall Chromium (legacy)",
42+
"quarto uninstall chromium",
43+
)
3544
.action(
3645
async (
3746
options: { prompt?: boolean; updatePath?: boolean },

src/command/update/cmd.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,11 @@ export const updateCommand = new Command()
4747
"quarto update tool tinytex",
4848
)
4949
.example(
50-
"Update Chromium",
50+
"Update Chrome Headless Shell",
51+
"quarto update tool chrome-headless-shell",
52+
)
53+
.example(
54+
"Update Chromium (legacy)",
5155
"quarto update tool chromium",
5256
)
5357
.example(

src/tools/tools.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ export function installableTools(): string[] {
6464
return Object.keys(kInstallableTools);
6565
}
6666

67+
export function installableToolNames(): string[] {
68+
return Object.values(kInstallableTools).map((tool) => tool.name);
69+
}
70+
6771
export async function printToolInfo(name: string) {
6872
name = name || "";
6973
// Run the install

0 commit comments

Comments
 (0)