patchcord 0.5.49 → 0.5.51
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/bin/patchcord.mjs +20 -7
- package/package.json +1 -1
package/bin/patchcord.mjs
CHANGED
|
@@ -70,13 +70,17 @@ if (cmd === "help" || cmd === "--help" || cmd === "-h") {
|
|
|
70
70
|
console.log(`patchcord — agent messaging for AI coding agents
|
|
71
71
|
|
|
72
72
|
Usage:
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
73
|
+
patchcord Setup via browser (patchcord.dev)
|
|
74
|
+
patchcord --token <token> Self-hosted / CI setup
|
|
75
|
+
patchcord --token <token> --server <url> Self-hosted with custom server
|
|
76
|
+
patchcord --full Same + full statusline
|
|
77
|
+
patchcord --rename <new-name> [--tool <slug>] Rename this agent (paste from dashboard)
|
|
78
|
+
patchcord subscribe Start the realtime listener
|
|
79
|
+
patchcord update Update to the latest version
|
|
80
|
+
patchcord --version Show installed version
|
|
81
|
+
patchcord --help Show this help
|
|
82
|
+
|
|
83
|
+
First install: npx patchcord@latest`);
|
|
80
84
|
process.exit(0);
|
|
81
85
|
}
|
|
82
86
|
|
|
@@ -298,9 +302,16 @@ if (cmd === "subscribe") {
|
|
|
298
302
|
// works the same as the space-form (--token foo). The internal flag parsing below
|
|
299
303
|
// supports both. Non-flag commands (channel, init, skill, help, plugin-path) have
|
|
300
304
|
// their own branches above and below.
|
|
305
|
+
if (cmd === "update" || cmd === "--update") {
|
|
306
|
+
const { spawnSync: _spawn } = await import("child_process");
|
|
307
|
+
const r = _spawn("npx", ["--min-release-age=0", "patchcord@latest", "--update-only"], { stdio: "inherit" });
|
|
308
|
+
process.exit(r.status ?? (r.signal ? 1 : 0));
|
|
309
|
+
}
|
|
310
|
+
|
|
301
311
|
if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
302
312
|
const flags = cmd?.startsWith("--") ? process.argv.slice(2) : process.argv.slice(3);
|
|
303
313
|
const fullStatusline = flags.includes("--full");
|
|
314
|
+
const updateOnly = flags.includes("--update-only");
|
|
304
315
|
let wasPluginInstalled = false;
|
|
305
316
|
const { readFileSync, writeFileSync, unlinkSync, rmSync, chmodSync, copyFileSync } = await import("fs");
|
|
306
317
|
|
|
@@ -609,6 +620,8 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd?.startsWith("--")) {
|
|
|
609
620
|
console.log(`${dim}No Claude Code or Codex CLI detected — skipping global setup.${r}`);
|
|
610
621
|
}
|
|
611
622
|
|
|
623
|
+
if (updateOnly) process.exit(0);
|
|
624
|
+
|
|
612
625
|
// ── project setup (inline, not a separate command) ──────────
|
|
613
626
|
const cwd = process.cwd();
|
|
614
627
|
const { createInterface } = await import("readline");
|