coherence-cli 0.6.0 → 0.6.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/bin/cc.mjs +8 -2
  2. package/package.json +1 -1
package/bin/cc.mjs CHANGED
@@ -31,9 +31,15 @@ async function checkForUpdate() {
31
31
  const latest = data.version;
32
32
  if (latest && latest !== LOCAL_VERSION && latest > LOCAL_VERSION) {
33
33
  console.log(
34
- `\n\x1b[33m Update available: ${LOCAL_VERSION} → ${latest}\x1b[0m` +
35
- `\n Run: npm i -g coherence-cli@${latest}\n`,
34
+ `\n\x1b[33m Update available: ${LOCAL_VERSION} → ${latest} — auto-updating...\x1b[0m`,
36
35
  );
36
+ const { execSync } = await import("node:child_process");
37
+ try {
38
+ execSync(`npm i -g coherence-cli@${latest}`, { stdio: "pipe" });
39
+ console.log(`\x1b[32m ✓ Updated to v${latest}\x1b[0m\n`);
40
+ } catch {
41
+ console.log(`\x1b[31m ✗ Auto-update failed. Run: npm i -g coherence-cli@${latest}\x1b[0m\n`);
42
+ }
37
43
  }
38
44
  } catch {
39
45
  // Silent — don't block the CLI for a version check
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "coherence-cli",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "description": "Coherence Network CLI \u2014 trace ideas from inception to payout, with fair attribution, coherence scoring, and 37 identity providers. No signup needed.",
5
5
  "type": "module",
6
6
  "bin": {