create-ai-memory 0.16.2 → 0.16.3
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/bin/create-ai-memory.js +24 -1
- package/package.json +1 -1
package/bin/create-ai-memory.js
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Usage:
|
|
11
11
|
* npm create ai-memory@latest # into ~/ai-memory
|
|
12
12
|
* npx create-ai-memory ~/code/ai-memory # into a directory you choose
|
|
13
|
+
* npx create-ai-memory --version | --help
|
|
13
14
|
*/
|
|
14
15
|
'use strict';
|
|
15
16
|
|
|
@@ -19,7 +20,29 @@ const { join, resolve } = require('node:path');
|
|
|
19
20
|
const { homedir } = require('node:os');
|
|
20
21
|
|
|
21
22
|
const pkgRoot = resolve(__dirname, '..'); // bundled tool
|
|
22
|
-
const
|
|
23
|
+
const USAGE = 'Usage: create-ai-memory [install-dir] (default: ~/ai-memory)\n' +
|
|
24
|
+
' create-ai-memory --version | --help';
|
|
25
|
+
|
|
26
|
+
// Flags are handled before anything touches the disk. The first argument used
|
|
27
|
+
// to be taken as the install directory unconditionally, so `--version` created
|
|
28
|
+
// ./--version and ran the interactive installer inside it. Any other leading
|
|
29
|
+
// dash is rejected rather than guessed at: a directory name starting with `-`
|
|
30
|
+
// can still be passed as ./-name.
|
|
31
|
+
const arg = process.argv[2];
|
|
32
|
+
if (arg === '--version' || arg === '-v') {
|
|
33
|
+
console.log(require(join(pkgRoot, 'package.json')).version);
|
|
34
|
+
process.exit(0);
|
|
35
|
+
}
|
|
36
|
+
if (arg === '--help' || arg === '-h') {
|
|
37
|
+
console.log(USAGE);
|
|
38
|
+
process.exit(0);
|
|
39
|
+
}
|
|
40
|
+
if (arg && arg.startsWith('-')) {
|
|
41
|
+
console.error(`create-ai-memory: unknown option ${arg}\n${USAGE}`);
|
|
42
|
+
process.exit(2);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
const dest = resolve(arg || join(homedir(), 'ai-memory'));
|
|
23
46
|
|
|
24
47
|
// Files that make up the tool; copied verbatim from the package into dest.
|
|
25
48
|
//
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-ai-memory",
|
|
3
|
-
"version": "0.16.
|
|
3
|
+
"version": "0.16.3",
|
|
4
4
|
"description": "Persistent, harness-agnostic session memory for AI coding CLIs (Claude Code, Codex, Gemini, Cursor, opencode, omp). One Markdown vault, any harness.",
|
|
5
5
|
"bin": {
|
|
6
6
|
"create-ai-memory": "bin/create-ai-memory.js",
|