patchcord 0.3.59 → 0.3.60

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.
Files changed (2) hide show
  1. package/bin/patchcord.mjs +20 -7
  2. package/package.json +1 -1
package/bin/patchcord.mjs CHANGED
@@ -63,11 +63,11 @@ if (cmd === "help" || cmd === "--help" || cmd === "-h") {
63
63
  console.log(`patchcord — agent messaging for AI coding agents
64
64
 
65
65
  Usage:
66
- npx patchcord@latest Full setup (global + project) — run in your project folder
67
- npx patchcord@latest --full Same + full statusline (model, context%, git)
68
- npx patchcord@latest skill apply Fetch custom skill from web console
69
-
70
- That's it. One command does everything.`);
66
+ npx patchcord@latest Setup via browser (patchcord.dev)
67
+ npx patchcord@latest --token <token> Self-hosted / CI setup
68
+ npx patchcord@latest --token <token> --server <url> Self-hosted with custom server
69
+ npx patchcord@latest --full Same + full statusline
70
+ npx patchcord@latest skill apply Fetch custom skill from web console`);
71
71
  process.exit(0);
72
72
  }
73
73
 
@@ -77,7 +77,7 @@ if (cmd === "plugin-path") {
77
77
  }
78
78
 
79
79
  // ── main flow: global setup + project setup (or just install/agent for back-compat) ──
80
- if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd === "--no-browser") {
80
+ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd === "--no-browser" || cmd === "--server") {
81
81
  const flags = cmd?.startsWith("--") ? process.argv.slice(2) : process.argv.slice(3);
82
82
  const fullStatusline = flags.includes("--full");
83
83
  const { readFileSync, writeFileSync } = await import("fs");
@@ -268,7 +268,20 @@ if (!cmd || cmd === "install" || cmd === "agent" || cmd === "--token" || cmd ===
268
268
  let apiUrl = "https://api.patchcord.dev";
269
269
  let clientType = "";
270
270
 
271
- // --token bypass for power users / CI
271
+ // --server flag for self-hosters
272
+ const serverFlag = flags.find(f => f.startsWith("--server="))?.split("=")[1]
273
+ || (flags.includes("--server") ? flags[flags.indexOf("--server") + 1] : "");
274
+ if (serverFlag) {
275
+ if (!isSafeUrl(serverFlag)) {
276
+ console.error("Invalid server URL. Must start with https:// or http://");
277
+ rl.close();
278
+ process.exit(1);
279
+ }
280
+ serverUrl = serverFlag.replace(/\/+$/, "");
281
+ apiUrl = serverUrl;
282
+ }
283
+
284
+ // --token bypass for power users / CI / self-hosters
272
285
  const tokenFlag = flags.find(f => f.startsWith("--token="))?.split("=")[1]
273
286
  || (flags.includes("--token") ? flags[flags.indexOf("--token") + 1] : "");
274
287
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "patchcord",
3
- "version": "0.3.59",
3
+ "version": "0.3.60",
4
4
  "description": "Cross-machine agent messaging for Claude Code and Codex",
5
5
  "author": "ppravdin",
6
6
  "license": "MIT",