karajan-code 1.9.0 → 1.9.1

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/package.json +1 -1
  2. package/src/cli.js +23 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "karajan-code",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "Local multi-agent coding orchestrator with TDD, SonarQube, and code review pipeline",
5
5
  "type": "module",
6
6
  "license": "AGPL-3.0",
package/src/cli.js CHANGED
@@ -187,6 +187,29 @@ program
187
187
  });
188
188
  });
189
189
 
190
+ program
191
+ .command("update")
192
+ .description("Update karajan-code to the latest version from npm")
193
+ .action(async () => {
194
+ const { execaCommand } = await import("execa");
195
+ console.log(`Current version: ${PKG_VERSION}`);
196
+ console.log("Checking for updates...");
197
+ try {
198
+ const { stdout } = await execaCommand("npm view karajan-code version");
199
+ const latest = stdout.trim();
200
+ if (latest === PKG_VERSION) {
201
+ console.log(`Already on the latest version (${PKG_VERSION}).`);
202
+ return;
203
+ }
204
+ console.log(`Updating ${PKG_VERSION} → ${latest}...`);
205
+ await execaCommand("npm install -g karajan-code@latest", { stdio: "inherit" });
206
+ console.log(`Updated to ${latest}. Restart Claude to pick up the new MCP server.`);
207
+ } catch (err) {
208
+ console.error(`Update failed: ${err.message}`);
209
+ process.exit(1);
210
+ }
211
+ });
212
+
190
213
  const sonar = program.command("sonar").description("Manage SonarQube container");
191
214
  sonar.command("status").action(async () => sonarCommand({ action: "status" }));
192
215
  sonar.command("start").action(async () => sonarCommand({ action: "start" }));