argsbarg 6.2.2 → 6.3.0
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/CHANGELOG.md +14 -1
- package/README.md +2 -2
- package/docs/README.md +2 -2
- package/docs/ai-skills.md +7 -7
- package/docs/bundled-docs.md +2 -2
- package/docs/cli-program.md +4 -4
- package/docs/configure.md +36 -14
- package/docs/developing.md +7 -3
- package/docs/distribution-homebrew.md +2 -2
- package/docs/mcp.md +3 -3
- package/examples/full-example/.cursor/hooks/run-tests-on-stop.ts +56 -0
- package/examples/full-example/.cursor/hooks.json +12 -0
- package/examples/full-example/Formula/full-example.rb +1 -1
- package/examples/full-example/docs/cli-schema.json +6 -6
- package/examples/full-example/docs/cli.md +6 -6
- package/examples/full-example/docs/mcp.md +2 -2
- package/examples/full-example/docs/skill.md +1 -1
- package/examples/full-example/justfile +12 -12
- package/examples/full-example/scripts/formula-shared.ts +1 -1
- package/examples/full-example-json/.cursor/hooks/run-tests-on-stop.ts +56 -0
- package/examples/full-example-json/.cursor/hooks.json +12 -0
- package/examples/full-example-json/Formula/full-example-json.rb +1 -1
- package/examples/full-example-json/docs/cli-schema.json +27 -27
- package/examples/full-example-json/docs/cli.md +27 -27
- package/examples/full-example-json/docs/mcp.md +2 -2
- package/examples/full-example-json/docs/skill.md +1 -1
- package/examples/full-example-json/justfile +12 -12
- package/examples/full-example-json/scripts/formula-shared.ts +1 -1
- package/index.d.ts +20 -4
- package/package.json +1 -1
- package/src/builtins/builtins.test.ts +7 -7
- package/src/builtins/configure-copy.ts +2 -2
- package/src/builtins/configure.ts +4 -4
- package/src/configure/configure.test.ts +85 -12
- package/src/configure/index.ts +45 -13
- package/src/core/types.ts +21 -4
- package/src/docs/docs.test.ts +2 -2
- package/src/docs/mcp-guide.ts +2 -2
- package/src/index.ts +1 -0
- package/src/skill/generate.ts +1 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
/* Cursor stop hook: run `just test` on agent completion; follow up if it fails. */
|
|
3
|
+
|
|
4
|
+
try {
|
|
5
|
+
const empty = () => {
|
|
6
|
+
console.log("{}");
|
|
7
|
+
process.exit(0);
|
|
8
|
+
};
|
|
9
|
+
|
|
10
|
+
const input = JSON.parse(await Bun.stdin.text()) as {
|
|
11
|
+
status?: string;
|
|
12
|
+
loop_count?: number;
|
|
13
|
+
workspace_roots?: string[];
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
if (input.status !== "completed") empty();
|
|
17
|
+
|
|
18
|
+
const cwd = input.workspace_roots?.[0] ?? process.cwd();
|
|
19
|
+
if (!(await Bun.file(`${cwd}/justfile`).exists())) empty();
|
|
20
|
+
|
|
21
|
+
const diff = Bun.spawnSync(["git", "diff", "--name-only", "HEAD"], { cwd, stdout: "pipe" });
|
|
22
|
+
const CODE_FILE = /\.(t|j)sx?$/i;
|
|
23
|
+
const SKIP_PREFIX = /^(node_modules|dist|\.cursor)\//;
|
|
24
|
+
const changed = new TextDecoder()
|
|
25
|
+
.decode(diff.stdout)
|
|
26
|
+
.split("\n")
|
|
27
|
+
.some(
|
|
28
|
+
(path) =>
|
|
29
|
+
path &&
|
|
30
|
+
(path === "justfile" || (CODE_FILE.test(path) && !SKIP_PREFIX.test(path))),
|
|
31
|
+
);
|
|
32
|
+
if (!changed) empty();
|
|
33
|
+
|
|
34
|
+
const proc = Bun.spawnSync(["just", "test"], {
|
|
35
|
+
cwd,
|
|
36
|
+
env: { ...process.env, FORCE_COLOR: "0" },
|
|
37
|
+
stderr: "pipe",
|
|
38
|
+
stdout: "pipe",
|
|
39
|
+
});
|
|
40
|
+
const output =
|
|
41
|
+
new TextDecoder().decode(proc.stdout) + new TextDecoder().decode(proc.stderr);
|
|
42
|
+
|
|
43
|
+
if (proc.exitCode === 0) empty();
|
|
44
|
+
|
|
45
|
+
const lines = output.trimEnd().split("\n");
|
|
46
|
+
const tail = lines.length > 80 ? lines.slice(-80).join("\n") : output.trimEnd();
|
|
47
|
+
const n = (input.loop_count ?? 0) + 1;
|
|
48
|
+
|
|
49
|
+
console.log(
|
|
50
|
+
JSON.stringify({
|
|
51
|
+
followup_message: `Tests failed (auto-retry ${n}/20). Fix and ensure \`just test\` passes.\n\n\`\`\`\n${tail}\n\`\`\``,
|
|
52
|
+
}),
|
|
53
|
+
);
|
|
54
|
+
} catch {
|
|
55
|
+
console.log("{}");
|
|
56
|
+
}
|
|
@@ -21,10 +21,10 @@
|
|
|
21
21
|
{
|
|
22
22
|
"key": "configure",
|
|
23
23
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
24
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
24
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
25
25
|
"options": [
|
|
26
26
|
{
|
|
27
|
-
"name": "
|
|
27
|
+
"name": "refresh",
|
|
28
28
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
29
29
|
"kind": "presence"
|
|
30
30
|
},
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
},
|
|
41
41
|
{
|
|
42
42
|
"name": "yes",
|
|
43
|
-
"description": "Skip confirmation (required for --
|
|
43
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
44
44
|
"kind": "presence",
|
|
45
45
|
"shortName": "y"
|
|
46
46
|
},
|
|
@@ -254,10 +254,10 @@
|
|
|
254
254
|
{
|
|
255
255
|
"key": "configure",
|
|
256
256
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
257
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
257
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
258
258
|
"options": [
|
|
259
259
|
{
|
|
260
|
-
"name": "
|
|
260
|
+
"name": "refresh",
|
|
261
261
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
262
262
|
"kind": "presence"
|
|
263
263
|
},
|
|
@@ -273,7 +273,7 @@
|
|
|
273
273
|
},
|
|
274
274
|
{
|
|
275
275
|
"name": "yes",
|
|
276
|
-
"description": "Skip confirmation (required for --
|
|
276
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
277
277
|
"kind": "presence",
|
|
278
278
|
"shortName": "y"
|
|
279
279
|
},
|
|
@@ -509,10 +509,10 @@
|
|
|
509
509
|
{
|
|
510
510
|
"key": "configure",
|
|
511
511
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
512
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
512
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
513
513
|
"options": [
|
|
514
514
|
{
|
|
515
|
-
"name": "
|
|
515
|
+
"name": "refresh",
|
|
516
516
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
517
517
|
"kind": "presence"
|
|
518
518
|
},
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
},
|
|
529
529
|
{
|
|
530
530
|
"name": "yes",
|
|
531
|
-
"description": "Skip confirmation (required for --
|
|
531
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
532
532
|
"kind": "presence",
|
|
533
533
|
"shortName": "y"
|
|
534
534
|
},
|
|
@@ -746,10 +746,10 @@
|
|
|
746
746
|
{
|
|
747
747
|
"key": "configure",
|
|
748
748
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
749
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
749
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
750
750
|
"options": [
|
|
751
751
|
{
|
|
752
|
-
"name": "
|
|
752
|
+
"name": "refresh",
|
|
753
753
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
754
754
|
"kind": "presence"
|
|
755
755
|
},
|
|
@@ -765,7 +765,7 @@
|
|
|
765
765
|
},
|
|
766
766
|
{
|
|
767
767
|
"name": "yes",
|
|
768
|
-
"description": "Skip confirmation (required for --
|
|
768
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
769
769
|
"kind": "presence",
|
|
770
770
|
"shortName": "y"
|
|
771
771
|
},
|
|
@@ -979,10 +979,10 @@
|
|
|
979
979
|
{
|
|
980
980
|
"key": "configure",
|
|
981
981
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
982
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
982
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
983
983
|
"options": [
|
|
984
984
|
{
|
|
985
|
-
"name": "
|
|
985
|
+
"name": "refresh",
|
|
986
986
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
987
987
|
"kind": "presence"
|
|
988
988
|
},
|
|
@@ -998,7 +998,7 @@
|
|
|
998
998
|
},
|
|
999
999
|
{
|
|
1000
1000
|
"name": "yes",
|
|
1001
|
-
"description": "Skip confirmation (required for --
|
|
1001
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
1002
1002
|
"kind": "presence",
|
|
1003
1003
|
"shortName": "y"
|
|
1004
1004
|
},
|
|
@@ -1216,10 +1216,10 @@
|
|
|
1216
1216
|
{
|
|
1217
1217
|
"key": "configure",
|
|
1218
1218
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
1219
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
1219
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
1220
1220
|
"options": [
|
|
1221
1221
|
{
|
|
1222
|
-
"name": "
|
|
1222
|
+
"name": "refresh",
|
|
1223
1223
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
1224
1224
|
"kind": "presence"
|
|
1225
1225
|
},
|
|
@@ -1235,7 +1235,7 @@
|
|
|
1235
1235
|
},
|
|
1236
1236
|
{
|
|
1237
1237
|
"name": "yes",
|
|
1238
|
-
"description": "Skip confirmation (required for --
|
|
1238
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
1239
1239
|
"kind": "presence",
|
|
1240
1240
|
"shortName": "y"
|
|
1241
1241
|
},
|
|
@@ -1449,10 +1449,10 @@
|
|
|
1449
1449
|
{
|
|
1450
1450
|
"key": "configure",
|
|
1451
1451
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
1452
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
1452
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
1453
1453
|
"options": [
|
|
1454
1454
|
{
|
|
1455
|
-
"name": "
|
|
1455
|
+
"name": "refresh",
|
|
1456
1456
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
1457
1457
|
"kind": "presence"
|
|
1458
1458
|
},
|
|
@@ -1468,7 +1468,7 @@
|
|
|
1468
1468
|
},
|
|
1469
1469
|
{
|
|
1470
1470
|
"name": "yes",
|
|
1471
|
-
"description": "Skip confirmation (required for --
|
|
1471
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
1472
1472
|
"kind": "presence",
|
|
1473
1473
|
"shortName": "y"
|
|
1474
1474
|
},
|
|
@@ -1682,10 +1682,10 @@
|
|
|
1682
1682
|
{
|
|
1683
1683
|
"key": "configure",
|
|
1684
1684
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
1685
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
1685
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
1686
1686
|
"options": [
|
|
1687
1687
|
{
|
|
1688
|
-
"name": "
|
|
1688
|
+
"name": "refresh",
|
|
1689
1689
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
1690
1690
|
"kind": "presence"
|
|
1691
1691
|
},
|
|
@@ -1701,7 +1701,7 @@
|
|
|
1701
1701
|
},
|
|
1702
1702
|
{
|
|
1703
1703
|
"name": "yes",
|
|
1704
|
-
"description": "Skip confirmation (required for --
|
|
1704
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
1705
1705
|
"kind": "presence",
|
|
1706
1706
|
"shortName": "y"
|
|
1707
1707
|
},
|
|
@@ -1915,10 +1915,10 @@
|
|
|
1915
1915
|
{
|
|
1916
1916
|
"key": "configure",
|
|
1917
1917
|
"description": "Set up agent skills and MCP config for this app (binary via Homebrew).",
|
|
1918
|
-
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --
|
|
1918
|
+
"notes": "Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).\n\nHomebrew post_install runs:\n full-example-json configure --refresh --yes\n\nInteractive setup (per target):\n full-example-json configure\n\nUpgrade:\n brew upgrade full-example-json\n\nShell completions are installed by Homebrew during brew install.\nSee: https://docs.brew.sh/Shell-Completion\n\nSee what is installed:\n full-example-json configure --status\n\nUninstall:\n brew uninstall <tap>/full-example-json\n\nThe formula uninstall hook runs `configure --remove-all --yes` (skills, MCP, and app config).\n\nUse --dry to preview changes without writing files.\nUse --json for machine-readable output.",
|
|
1919
1919
|
"options": [
|
|
1920
1920
|
{
|
|
1921
|
-
"name": "
|
|
1921
|
+
"name": "refresh",
|
|
1922
1922
|
"description": "Refresh installed skills and MCP. Used by Homebrew post_install.",
|
|
1923
1923
|
"kind": "presence"
|
|
1924
1924
|
},
|
|
@@ -1934,7 +1934,7 @@
|
|
|
1934
1934
|
},
|
|
1935
1935
|
{
|
|
1936
1936
|
"name": "yes",
|
|
1937
|
-
"description": "Skip confirmation (required for --
|
|
1937
|
+
"description": "Skip confirmation (required for --refresh, --remove-all, --remove-config).",
|
|
1938
1938
|
"kind": "presence",
|
|
1939
1939
|
"shortName": "y"
|
|
1940
1940
|
},
|
|
@@ -46,7 +46,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
46
46
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
47
47
|
>
|
|
48
48
|
> Homebrew post_install runs:
|
|
49
|
-
> full-example-json configure --
|
|
49
|
+
> full-example-json configure --refresh --yes
|
|
50
50
|
>
|
|
51
51
|
> Interactive setup (per target):
|
|
52
52
|
> full-example-json configure
|
|
@@ -74,10 +74,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
74
74
|
|
|
75
75
|
| Option | Type | Required | Format / default | Description |
|
|
76
76
|
| --- | --- | --- | --- | --- |
|
|
77
|
-
| `--
|
|
77
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
78
78
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
79
79
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
80
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
80
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
81
81
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
82
82
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
83
83
|
|
|
@@ -259,7 +259,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
259
259
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
260
260
|
>
|
|
261
261
|
> Homebrew post_install runs:
|
|
262
|
-
> full-example-json configure --
|
|
262
|
+
> full-example-json configure --refresh --yes
|
|
263
263
|
>
|
|
264
264
|
> Interactive setup (per target):
|
|
265
265
|
> full-example-json configure
|
|
@@ -287,10 +287,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
287
287
|
|
|
288
288
|
| Option | Type | Required | Format / default | Description |
|
|
289
289
|
| --- | --- | --- | --- | --- |
|
|
290
|
-
| `--
|
|
290
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
291
291
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
292
292
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
293
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
293
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
294
294
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
295
295
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
296
296
|
|
|
@@ -500,7 +500,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
500
500
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
501
501
|
>
|
|
502
502
|
> Homebrew post_install runs:
|
|
503
|
-
> full-example-json configure --
|
|
503
|
+
> full-example-json configure --refresh --yes
|
|
504
504
|
>
|
|
505
505
|
> Interactive setup (per target):
|
|
506
506
|
> full-example-json configure
|
|
@@ -528,10 +528,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
528
528
|
|
|
529
529
|
| Option | Type | Required | Format / default | Description |
|
|
530
530
|
| --- | --- | --- | --- | --- |
|
|
531
|
-
| `--
|
|
531
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
532
532
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
533
533
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
534
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
534
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
535
535
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
536
536
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
537
537
|
|
|
@@ -723,7 +723,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
723
723
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
724
724
|
>
|
|
725
725
|
> Homebrew post_install runs:
|
|
726
|
-
> full-example-json configure --
|
|
726
|
+
> full-example-json configure --refresh --yes
|
|
727
727
|
>
|
|
728
728
|
> Interactive setup (per target):
|
|
729
729
|
> full-example-json configure
|
|
@@ -751,10 +751,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
751
751
|
|
|
752
752
|
| Option | Type | Required | Format / default | Description |
|
|
753
753
|
| --- | --- | --- | --- | --- |
|
|
754
|
-
| `--
|
|
754
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
755
755
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
756
756
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
757
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
757
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
758
758
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
759
759
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
760
760
|
|
|
@@ -936,7 +936,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
936
936
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
937
937
|
>
|
|
938
938
|
> Homebrew post_install runs:
|
|
939
|
-
> full-example-json configure --
|
|
939
|
+
> full-example-json configure --refresh --yes
|
|
940
940
|
>
|
|
941
941
|
> Interactive setup (per target):
|
|
942
942
|
> full-example-json configure
|
|
@@ -964,10 +964,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
964
964
|
|
|
965
965
|
| Option | Type | Required | Format / default | Description |
|
|
966
966
|
| --- | --- | --- | --- | --- |
|
|
967
|
-
| `--
|
|
967
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
968
968
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
969
969
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
970
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
970
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
971
971
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
972
972
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
973
973
|
|
|
@@ -1160,7 +1160,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1160
1160
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
1161
1161
|
>
|
|
1162
1162
|
> Homebrew post_install runs:
|
|
1163
|
-
> full-example-json configure --
|
|
1163
|
+
> full-example-json configure --refresh --yes
|
|
1164
1164
|
>
|
|
1165
1165
|
> Interactive setup (per target):
|
|
1166
1166
|
> full-example-json configure
|
|
@@ -1188,10 +1188,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1188
1188
|
|
|
1189
1189
|
| Option | Type | Required | Format / default | Description |
|
|
1190
1190
|
| --- | --- | --- | --- | --- |
|
|
1191
|
-
| `--
|
|
1191
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
1192
1192
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
1193
1193
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
1194
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
1194
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
1195
1195
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
1196
1196
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
1197
1197
|
|
|
@@ -1373,7 +1373,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1373
1373
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
1374
1374
|
>
|
|
1375
1375
|
> Homebrew post_install runs:
|
|
1376
|
-
> full-example-json configure --
|
|
1376
|
+
> full-example-json configure --refresh --yes
|
|
1377
1377
|
>
|
|
1378
1378
|
> Interactive setup (per target):
|
|
1379
1379
|
> full-example-json configure
|
|
@@ -1401,10 +1401,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1401
1401
|
|
|
1402
1402
|
| Option | Type | Required | Format / default | Description |
|
|
1403
1403
|
| --- | --- | --- | --- | --- |
|
|
1404
|
-
| `--
|
|
1404
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
1405
1405
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
1406
1406
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
1407
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
1407
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
1408
1408
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
1409
1409
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
1410
1410
|
|
|
@@ -1586,7 +1586,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1586
1586
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
1587
1587
|
>
|
|
1588
1588
|
> Homebrew post_install runs:
|
|
1589
|
-
> full-example-json configure --
|
|
1589
|
+
> full-example-json configure --refresh --yes
|
|
1590
1590
|
>
|
|
1591
1591
|
> Interactive setup (per target):
|
|
1592
1592
|
> full-example-json configure
|
|
@@ -1614,10 +1614,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1614
1614
|
|
|
1615
1615
|
| Option | Type | Required | Format / default | Description |
|
|
1616
1616
|
| --- | --- | --- | --- | --- |
|
|
1617
|
-
| `--
|
|
1617
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
1618
1618
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
1619
1619
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
1620
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
1620
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
1621
1621
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
1622
1622
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
1623
1623
|
|
|
@@ -1799,7 +1799,7 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1799
1799
|
> Set up agent artifacts after the binary is installed via Homebrew (see README for tap install).
|
|
1800
1800
|
>
|
|
1801
1801
|
> Homebrew post_install runs:
|
|
1802
|
-
> full-example-json configure --
|
|
1802
|
+
> full-example-json configure --refresh --yes
|
|
1803
1803
|
>
|
|
1804
1804
|
> Interactive setup (per target):
|
|
1805
1805
|
> full-example-json configure
|
|
@@ -1827,10 +1827,10 @@ Set up agent skills and MCP config for this app (binary via Homebrew).
|
|
|
1827
1827
|
|
|
1828
1828
|
| Option | Type | Required | Format / default | Description |
|
|
1829
1829
|
| --- | --- | --- | --- | --- |
|
|
1830
|
-
| `--
|
|
1830
|
+
| `--refresh` | flag | optional | — | Refresh installed skills and MCP. Used by Homebrew post_install. |
|
|
1831
1831
|
| `--remove-all` | flag | optional | — | Remove all detected agent artifacts (skills and MCP). |
|
|
1832
1832
|
| `--status` | flag | optional | — | Print what is currently installed (read-only). |
|
|
1833
|
-
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --
|
|
1833
|
+
| `--yes` (`-y`) | flag | optional | — | Skip confirmation (required for --refresh, --remove-all, --remove-config). |
|
|
1834
1834
|
| `--dry` | flag | optional | — | Show what would change without writing files. |
|
|
1835
1835
|
| `--json` | flag | optional | — | Print changed paths or status JSON on stdout. |
|
|
1836
1836
|
|
|
@@ -8,12 +8,12 @@ full-example-json exposes an MCP server with features similar to the CLI.
|
|
|
8
8
|
|
|
9
9
|
### `.agents` auto-install
|
|
10
10
|
|
|
11
|
-
When `mcpServer.enabled` is set, `configure --
|
|
11
|
+
When `mcpServer.enabled` is set, `configure --refresh` merges this server into `~/.agents/mcp.json` per the https://dotagentsprotocol.com.
|
|
12
12
|
|
|
13
13
|
Install the CLI first so `full-example-json` is on your PATH (e.g. `brew install full-example-json`).
|
|
14
14
|
|
|
15
15
|
```bash
|
|
16
|
-
full-example-json configure --
|
|
16
|
+
full-example-json configure --refresh --yes
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
Writes or updates `~/.agents/mcp.json` with a `mcpServers` entry for this app.
|
|
@@ -43,7 +43,7 @@ For full detail, open `reference.md` in this skill directory (same as `full-exam
|
|
|
43
43
|
|
|
44
44
|
Install follows the https://dotagentsprotocol.com:
|
|
45
45
|
|
|
46
|
-
- Auto-install: `full-example-json configure --
|
|
46
|
+
- Auto-install: `full-example-json configure --refresh --yes` when `skill.enabled` → `~/.agents/skills/full-example-json/`
|
|
47
47
|
- Cursor and most coding agents read `~/.agents/skills/` natively
|
|
48
48
|
|
|
49
49
|
**Claude Code (manual):** symlink or copy into Claude's skill directory:
|
|
@@ -77,16 +77,16 @@ http:
|
|
|
77
77
|
install: install-local
|
|
78
78
|
|
|
79
79
|
# Refresh skills and MCP without reinstalling the formula
|
|
80
|
-
|
|
81
|
-
just run configure --
|
|
80
|
+
refresh-artifacts:
|
|
81
|
+
just run configure --refresh --yes
|
|
82
82
|
|
|
83
83
|
# Dev install: build, stage dev formula, brew install, restore release formula
|
|
84
84
|
install-local: build
|
|
85
|
-
@brew untap {{tap}} 2>/dev/null || true
|
|
85
|
+
@NONINTERACTIVE=1 brew untap {{tap}} 2>/dev/null || true
|
|
86
86
|
mkdir -p {{tap_parent}}
|
|
87
87
|
ln -sfn '{{justfile_directory()}}' {{tap_path}}
|
|
88
88
|
bun scripts/dev-formula.ts install
|
|
89
|
-
brew install --formula {{tap}}/{{cli_key}}
|
|
89
|
+
brew install --force --formula {{tap}}/{{cli_key}}
|
|
90
90
|
bun scripts/dev-formula.ts reset
|
|
91
91
|
@echo ""
|
|
92
92
|
@echo "Next: {{cli_key}} configure"
|
|
@@ -133,10 +133,10 @@ release *ARGS:
|
|
|
133
133
|
|
|
134
134
|
# Install release formula from tap and run formula test
|
|
135
135
|
test-release:
|
|
136
|
-
brew untap {{tap}} 2>/dev/null || true
|
|
136
|
+
NONINTERACTIVE=1 brew untap {{tap}} 2>/dev/null || true
|
|
137
137
|
mkdir -p {{tap_parent}}
|
|
138
138
|
ln -sfn '{{justfile_directory()}}' {{tap_path}}
|
|
139
|
-
brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
139
|
+
NONINTERACTIVE=1 brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
140
140
|
brew install --formula {{tap}}/{{cli_key}}
|
|
141
141
|
brew test {{cli_key}}
|
|
142
142
|
|
|
@@ -157,15 +157,15 @@ uninstall-config:
|
|
|
157
157
|
|
|
158
158
|
# Remove formula and untap
|
|
159
159
|
uninstall-formula:
|
|
160
|
-
@brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
161
|
-
@brew uninstall --formula {{tap}}/{{cli_key}}-local 2>/dev/null || true
|
|
162
|
-
@brew untap {{tap}} 2>/dev/null || true
|
|
160
|
+
@NONINTERACTIVE=1 brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
161
|
+
@NONINTERACTIVE=1 brew uninstall --formula {{tap}}/{{cli_key}}-local 2>/dev/null || true
|
|
162
|
+
@NONINTERACTIVE=1 brew untap {{tap}} 2>/dev/null || true
|
|
163
163
|
|
|
164
164
|
# Remove release formula (does not untap)
|
|
165
165
|
uninstall-release:
|
|
166
|
-
@brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
166
|
+
@NONINTERACTIVE=1 brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
167
167
|
|
|
168
168
|
# Remove release formula and untap
|
|
169
169
|
uninstall-release-tap:
|
|
170
|
-
@brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
171
|
-
@brew untap {{tap}} 2>/dev/null || true
|
|
170
|
+
@NONINTERACTIVE=1 brew uninstall --formula {{tap}}/{{cli_key}} 2>/dev/null || true
|
|
171
|
+
@NONINTERACTIVE=1 brew untap {{tap}} 2>/dev/null || true
|
|
@@ -20,7 +20,7 @@ export const formulaInstallRuby = `def install
|
|
|
20
20
|
end`;
|
|
21
21
|
|
|
22
22
|
export const formulaPostInstallRuby = `def post_install
|
|
23
|
-
system bin/"${key}", "configure", "--
|
|
23
|
+
system bin/"${key}", "configure", "--refresh", "--yes"
|
|
24
24
|
end`;
|
|
25
25
|
|
|
26
26
|
export const formulaUninstallRuby = `def uninstall
|
package/index.d.ts
CHANGED
|
@@ -535,21 +535,37 @@ export interface CliCompletionConfig {
|
|
|
535
535
|
}
|
|
536
536
|
/** Opt-in agent skill install to `~/.agents/skills/<key>/` (default: disabled). */
|
|
537
537
|
export interface CliSkillConfig {
|
|
538
|
-
/** When `true`, install and
|
|
538
|
+
/** When `true`, install and refresh the agent skill via `configure --refresh`. Default false when omitted. */
|
|
539
539
|
enabled?: boolean;
|
|
540
540
|
}
|
|
541
|
+
/** Context for {@link CliConfigureConfig} lifecycle hooks. */
|
|
542
|
+
export interface ConfigureHookContext {
|
|
543
|
+
program: CliProgram;
|
|
544
|
+
/** When true, the configure run is `--dry` (hook should not write files). */
|
|
545
|
+
dry: boolean;
|
|
546
|
+
paths: {
|
|
547
|
+
agentsSkillDir: string;
|
|
548
|
+
agentsMcpPath: string;
|
|
549
|
+
mcpName: string;
|
|
550
|
+
skillDirName: string;
|
|
551
|
+
};
|
|
552
|
+
}
|
|
541
553
|
/** @experimental */
|
|
542
554
|
export interface CliConfigureConfig {
|
|
543
555
|
/** When `false`, hide/disable `configure` (default: enabled). */
|
|
544
556
|
enabled?: boolean;
|
|
545
|
-
/** Per-artifact gates for configure
|
|
557
|
+
/** Per-artifact gates for configure refresh and interactive wizard. See {@link resolveEffectiveInstallTargets}. */
|
|
546
558
|
targets?: CliConfigureTargets;
|
|
559
|
+
/** Runs after framework artifacts are installed/refreshed (`configure --refresh`). */
|
|
560
|
+
afterRefresh?: (ctx: ConfigureHookContext) => void | Promise<void>;
|
|
561
|
+
/** Runs before framework artifacts are removed (`configure --remove-all`). */
|
|
562
|
+
beforeRemoveAll?: (ctx: ConfigureHookContext) => void | Promise<void>;
|
|
547
563
|
}
|
|
548
564
|
/** Boolean or structured gate for one install artifact. */
|
|
549
565
|
export type InstallTargetSpec = boolean | {
|
|
550
566
|
/** When false, artifact is never installed (even with scoped CLI flags). Default true. */
|
|
551
567
|
enabled?: boolean;
|
|
552
|
-
/** When true, included in `configure --
|
|
568
|
+
/** When true, included in `configure --refresh`. Default varies by key. */
|
|
553
569
|
includedInAll?: boolean;
|
|
554
570
|
};
|
|
555
571
|
export interface ResolvedInstallTarget {
|
|
@@ -560,7 +576,7 @@ export interface ResolvedInstallTarget {
|
|
|
560
576
|
export interface CliConfigureTargets {
|
|
561
577
|
/** App binary status only (Homebrew PATH); no self-install. */
|
|
562
578
|
app?: InstallTargetSpec;
|
|
563
|
-
/** App config: interactive wizard step in `configure`. Default not in
|
|
579
|
+
/** App config: interactive wizard step in `configure`. Default not in refresh. */
|
|
564
580
|
configure?: InstallTargetSpec;
|
|
565
581
|
}
|
|
566
582
|
/**
|