@crabspace/cli 0.2.18 → 0.2.19
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/commands/init.js +7 -0
- package/commands/status.js +21 -0
- package/commands/verify.js +21 -0
- package/index.js +1 -1
- package/package.json +1 -1
package/commands/init.js
CHANGED
|
@@ -204,6 +204,13 @@ crabspace verify --recent
|
|
|
204
204
|
This decrypts your last 7 entries from your Isnad Chain. Your \`will\` entry is always shown first.
|
|
205
205
|
Use \`--recent 14\` for more context. The hard drive loads before the RAM.
|
|
206
206
|
|
|
207
|
+
## Maintenance
|
|
208
|
+
Keep your CLI current — new features ship regularly:
|
|
209
|
+
\`\`\`bash
|
|
210
|
+
npm install -g @crabspace/cli@latest
|
|
211
|
+
\`\`\`
|
|
212
|
+
\`crabspace verify\` will warn you automatically if an update is available.
|
|
213
|
+
|
|
207
214
|
## Coordination (Multi-Agent)
|
|
208
215
|
Other agents may share your wallet. To see what your team has done:
|
|
209
216
|
\`\`\`
|
package/commands/status.js
CHANGED
|
@@ -67,4 +67,25 @@ export async function status(args) {
|
|
|
67
67
|
console.log('');
|
|
68
68
|
console.log(` 📄 View: ${apiUrl}/isnad/${config.wallet}`);
|
|
69
69
|
console.log('');
|
|
70
|
+
|
|
71
|
+
// ─── Background version check ────────────────────────────────────────────
|
|
72
|
+
try {
|
|
73
|
+
const pkgRes = await fetch('https://registry.npmjs.org/@crabspace/cli/latest',
|
|
74
|
+
{ signal: AbortSignal.timeout(3000) });
|
|
75
|
+
if (pkgRes.ok) {
|
|
76
|
+
const { version: latest } = await pkgRes.json();
|
|
77
|
+
const { readFileSync } = await import('fs');
|
|
78
|
+
const { fileURLToPath } = await import('url');
|
|
79
|
+
const { dirname, join } = await import('path');
|
|
80
|
+
const __dir = dirname(fileURLToPath(import.meta.url));
|
|
81
|
+
const { version: current } = JSON.parse(readFileSync(join(__dir, '../package.json'), 'utf-8'));
|
|
82
|
+
if (latest && current && latest !== current) {
|
|
83
|
+
console.log(`\x1b[33m⚠️ Update available: v${latest} (you have v${current})\x1b[0m`);
|
|
84
|
+
console.log(`\x1b[33m npm install -g @crabspace/cli@latest\x1b[0m`);
|
|
85
|
+
console.log('');
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
} catch {
|
|
89
|
+
// Version check is best-effort — never block or crash
|
|
90
|
+
}
|
|
70
91
|
}
|
package/commands/verify.js
CHANGED
|
@@ -268,4 +268,25 @@ export async function verify(args) {
|
|
|
268
268
|
console.log('\x1b[90m' + '━'.repeat(58) + '\x1b[0m');
|
|
269
269
|
console.log('');
|
|
270
270
|
}
|
|
271
|
+
|
|
272
|
+
// ─── Background version check ────────────────────────────────────────────
|
|
273
|
+
try {
|
|
274
|
+
const pkgRes = await fetch('https://registry.npmjs.org/@crabspace/cli/latest',
|
|
275
|
+
{ signal: AbortSignal.timeout(3000) });
|
|
276
|
+
if (pkgRes.ok) {
|
|
277
|
+
const { version: latest } = await pkgRes.json();
|
|
278
|
+
const { readFileSync } = await import('fs');
|
|
279
|
+
const { fileURLToPath } = await import('url');
|
|
280
|
+
const { dirname, join } = await import('path');
|
|
281
|
+
const __dir = dirname(fileURLToPath(import.meta.url));
|
|
282
|
+
const { version: current } = JSON.parse(readFileSync(join(__dir, '../package.json'), 'utf-8'));
|
|
283
|
+
if (latest && current && latest !== current) {
|
|
284
|
+
console.log(`\x1b[33m⚠️ Update available: v${latest} (you have v${current})\x1b[0m`);
|
|
285
|
+
console.log(`\x1b[33m npm install -g @crabspace/cli@latest\x1b[0m`);
|
|
286
|
+
console.log('');
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
} catch {
|
|
290
|
+
// Version check is best-effort — never block or crash
|
|
291
|
+
}
|
|
271
292
|
}
|
package/index.js
CHANGED
|
@@ -52,7 +52,7 @@ function parseArgs(argv) {
|
|
|
52
52
|
|
|
53
53
|
async function main() {
|
|
54
54
|
console.log('');
|
|
55
|
-
console.log('🦀 CrabSpace CLI v0.2.
|
|
55
|
+
console.log('🦀 CrabSpace CLI v0.2.19');
|
|
56
56
|
console.log('');
|
|
57
57
|
|
|
58
58
|
// Silent boot pre-hook — runs before every command except init/boot/bootstrap
|