@clawcard/cli 2.0.5 → 2.0.6

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/splash.js +9 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clawcard/cli",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "The ClawCard CLI — manage your agent keys, billing, and setup from the terminal",
5
5
  "bin": {
6
6
  "clawcard": "./bin/clawcard.mjs"
package/src/splash.js CHANGED
@@ -48,20 +48,19 @@ export async function performAutoUpdate() {
48
48
  console.log(` Updating to v${latest}...`);
49
49
 
50
50
  try {
51
- execSync("npm i -g @clawcard/cli@latest", {
51
+ execSync("npm cache clean --force 2>/dev/null; npm i -g @clawcard/cli@latest", {
52
52
  stdio: "pipe",
53
53
  timeout: 60000,
54
54
  });
55
- console.log(` Updated to v${latest}`);
55
+ console.log(` Updated to v${latest}. Restarting...\n`);
56
56
 
57
- // Refresh installed SKILL.md files
58
- if (existsSync(SKILL_SOURCE)) {
59
- for (const target of SKILL_TARGETS) {
60
- if (existsSync(target)) {
61
- copyFileSync(SKILL_SOURCE, target);
62
- }
63
- }
64
- }
57
+ // Re-run the same command with the updated CLI
58
+ const { spawnSync } = await import("child_process");
59
+ const result = spawnSync(process.argv[0], process.argv.slice(1), {
60
+ stdio: "inherit",
61
+ env: process.env,
62
+ });
63
+ process.exit(result.status ?? 0);
65
64
  } catch {
66
65
  // update failed — continue normally
67
66
  }