metame-cli 1.4.29 → 1.4.30
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/README.md +5 -0
- package/index.js +17 -6
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -228,6 +228,11 @@ metame
|
|
|
228
228
|
|
|
229
229
|
> **First time?** Just run `metame` and talk naturally. The interview and setup are conversational — no commands to memorize.
|
|
230
230
|
|
|
231
|
+
**Update MetaMe:**
|
|
232
|
+
```bash
|
|
233
|
+
npm install -g metame-cli
|
|
234
|
+
```
|
|
235
|
+
|
|
231
236
|
> **What does system registration mean?**
|
|
232
237
|
> Once registered, MetaMe runs in the background automatically — screen locked, lid closed, woken from sleep — as long as the machine is on. Scheduled tasks fire on time. No terminal window needed.
|
|
233
238
|
|
package/index.js
CHANGED
|
@@ -25,6 +25,13 @@ function spawnClaude(args, options) {
|
|
|
25
25
|
return spawn('claude', args, options);
|
|
26
26
|
}
|
|
27
27
|
|
|
28
|
+
// Quick flags (before heavy init)
|
|
29
|
+
const pkgVersion = require('./package.json').version;
|
|
30
|
+
if (process.argv.includes('-V') || process.argv.includes('--version')) {
|
|
31
|
+
console.log(`metame/${pkgVersion}`);
|
|
32
|
+
process.exit(0);
|
|
33
|
+
}
|
|
34
|
+
|
|
28
35
|
// ---------------------------------------------------------
|
|
29
36
|
// 1. CONFIGURATION
|
|
30
37
|
// ---------------------------------------------------------
|
|
@@ -771,7 +778,6 @@ try {
|
|
|
771
778
|
|
|
772
779
|
|
|
773
780
|
|
|
774
|
-
const pkgVersion = require('./package.json').version;
|
|
775
781
|
console.log(`🔮 MetaMe v${pkgVersion}: Link Established.`);
|
|
776
782
|
|
|
777
783
|
// Memory system status — show live stats without blocking launch
|
|
@@ -828,7 +834,7 @@ try {
|
|
|
828
834
|
// ---------------------------------------------------------
|
|
829
835
|
// 4.9 AUTO-UPDATE CHECK (non-blocking)
|
|
830
836
|
// ---------------------------------------------------------
|
|
831
|
-
const CURRENT_VERSION =
|
|
837
|
+
const CURRENT_VERSION = pkgVersion;
|
|
832
838
|
|
|
833
839
|
// Fire-and-forget: check npm for newer version and auto-update
|
|
834
840
|
(async () => {
|
|
@@ -845,13 +851,18 @@ const CURRENT_VERSION = require('./package.json').version;
|
|
|
845
851
|
});
|
|
846
852
|
|
|
847
853
|
if (latest && latest !== CURRENT_VERSION) {
|
|
848
|
-
console.log(`📦 MetaMe ${latest}
|
|
854
|
+
console.log(`📦 MetaMe ${latest} available (current ${CURRENT_VERSION}), updating...`);
|
|
849
855
|
const { execSync } = require('child_process');
|
|
850
856
|
try {
|
|
851
|
-
execSync('npm
|
|
852
|
-
|
|
857
|
+
execSync('npm install -g metame-cli@latest', {
|
|
858
|
+
stdio: 'pipe',
|
|
859
|
+
timeout: 60000,
|
|
860
|
+
...(process.platform === 'win32' ? { shell: process.env.COMSPEC || true } : {}),
|
|
861
|
+
});
|
|
862
|
+
console.log(`✅ Updated to ${latest}. Restart metame to use the new version.`);
|
|
853
863
|
} catch (e) {
|
|
854
|
-
|
|
864
|
+
const msg = e.stderr ? e.stderr.toString().trim().split('\n').pop() : '';
|
|
865
|
+
console.log(`⚠️ Auto-update failed${msg ? ': ' + msg : ''}. Run manually: npm install -g metame-cli`);
|
|
855
866
|
}
|
|
856
867
|
}
|
|
857
868
|
} catch { /* network unavailable, skip silently */ }
|