brain-memory 0.1.0-beta.3 → 0.1.0-beta.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/CHANGELOG.md +319 -0
- package/README.md +379 -95
- package/SECURITY.md +61 -0
- package/assets/brand/README.md +28 -0
- package/assets/brand/icon-dark.svg +19 -0
- package/assets/brand/icon-light.svg +20 -0
- package/assets/brand/linkedin_cover.png +0 -0
- package/assets/brand/linkedin_cover_light.png +0 -0
- package/assets/brand/mark-dark.svg +19 -0
- package/assets/brand/mark-light.svg +20 -0
- package/assets/brand/png/icon-dark-1024.png +0 -0
- package/assets/brand/png/icon-dark-128.png +0 -0
- package/assets/brand/png/icon-dark-256.png +0 -0
- package/assets/brand/png/icon-dark-512.png +0 -0
- package/assets/brand/png/icon-dark-64.png +0 -0
- package/assets/brand/png/icon-light-1024.png +0 -0
- package/assets/brand/png/icon-light-128.png +0 -0
- package/assets/brand/png/icon-light-256.png +0 -0
- package/assets/brand/png/icon-light-512.png +0 -0
- package/assets/brand/png/icon-light-64.png +0 -0
- package/assets/brand/png/mark-dark-1024.png +0 -0
- package/assets/brand/png/mark-light-1024.png +0 -0
- package/assets/icon.png +0 -0
- package/assets/icon.svg +19 -0
- package/bin/brain.js +111 -0
- package/bin/cloud-sync.js +150 -0
- package/bin/forget.js +122 -0
- package/bin/install.js +229 -254
- package/bin/memorize.js +458 -0
- package/bin/pin.js +44 -0
- package/bin/recall.js +251 -0
- package/bin/reinforce.js +187 -0
- package/bin/session-start.js +298 -0
- package/bin/skill.js +67 -0
- package/bin/unpin.js +38 -0
- package/commands/brain/forget.md +245 -15
- package/commands/brain/memorize.md +76 -144
- package/commands/brain/pin.md +79 -0
- package/commands/brain/remember.md +48 -105
- package/commands/brain/skills.md +60 -0
- package/commands/brain/sleep.md +69 -28
- package/commands/brain/status.md +24 -10
- package/commands/brain/sync.md +386 -0
- package/package.json +22 -8
- package/prompts/antigravity.md +180 -0
- package/prompts/claude.md +124 -20
- package/prompts/openai.md +124 -20
- package/prompts/opencode.md +179 -0
- package/src/cloud-sync.js +534 -0
- package/src/crypto.js +130 -0
- package/src/export-import.js +200 -0
- package/src/git-sync.js +444 -0
- package/src/index-manager.js +219 -18
- package/src/installer.js +444 -0
- package/src/pinning.js +124 -0
- package/src/scorer.js +22 -9
- package/src/skills.js +208 -0
- package/src/tfidf.js +501 -0
- package/commands/brain/consolidate.md +0 -153
- package/commands/brain/explore.md +0 -79
- package/commands/brain/init.md +0 -157
- package/commands/brain/review.md +0 -130
- package/commands/brain/sunshine.md +0 -337
- package/hooks/session-end.md +0 -48
- package/hooks/session-start.md +0 -48
- package/prompts/gemini.md +0 -76
package/bin/recall.js
ADDED
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Brain Memory — Deterministic Recall Engine
|
|
5
|
+
*
|
|
6
|
+
* CLI tool that replaces agent-driven scoring with deterministic computation.
|
|
7
|
+
* The agent calls this instead of manually computing the v4 formula.
|
|
8
|
+
*
|
|
9
|
+
* Usage:
|
|
10
|
+
* brain recall "async race conditions"
|
|
11
|
+
* brain recall "database pooling" --project my-app --task implementing --top 5
|
|
12
|
+
* brain recall --context # Session-start mode: auto-detect context
|
|
13
|
+
* brain recall --reindex # Rebuild search index from all memories
|
|
14
|
+
*
|
|
15
|
+
* Output: JSON array of scored results, sorted by score descending.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const fs = require('fs');
|
|
19
|
+
const path = require('path');
|
|
20
|
+
const os = require('os');
|
|
21
|
+
|
|
22
|
+
const {
|
|
23
|
+
readSearchIndex,
|
|
24
|
+
writeSearchIndex,
|
|
25
|
+
search,
|
|
26
|
+
bm25Search,
|
|
27
|
+
rebuildIndex,
|
|
28
|
+
createSearchIndex,
|
|
29
|
+
isSearchIndexStale,
|
|
30
|
+
} = require('../src/tfidf');
|
|
31
|
+
|
|
32
|
+
const {
|
|
33
|
+
readIndex,
|
|
34
|
+
readAssociations,
|
|
35
|
+
getBrainDir,
|
|
36
|
+
} = require('../src/index-manager');
|
|
37
|
+
|
|
38
|
+
const {
|
|
39
|
+
rankMemories,
|
|
40
|
+
} = require('../src/scorer');
|
|
41
|
+
|
|
42
|
+
function main() {
|
|
43
|
+
const args = parseArgs(process.argv.slice(2));
|
|
44
|
+
|
|
45
|
+
const brainDir = getBrainDir();
|
|
46
|
+
|
|
47
|
+
if (!fs.existsSync(path.join(brainDir, 'index.json'))) {
|
|
48
|
+
console.error(JSON.stringify({ error: 'Brain not initialized. Reinstall with `npx brain-memory`, or run /brain:sync to create it.' }));
|
|
49
|
+
process.exit(1);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
// Reindex mode
|
|
53
|
+
if (args.reindex) {
|
|
54
|
+
return handleReindex(brainDir);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Need a query for search
|
|
58
|
+
if (!args.query && !args.context) {
|
|
59
|
+
console.error(JSON.stringify({ error: 'Usage: brain recall "query" or brain recall --context' }));
|
|
60
|
+
process.exit(1);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
let index;
|
|
64
|
+
try {
|
|
65
|
+
index = readIndex();
|
|
66
|
+
} catch (err) {
|
|
67
|
+
console.error(JSON.stringify({
|
|
68
|
+
error: `Corrupt index.json in ~/.brain/ — ${err.message}. Fix the JSON manually or restore from sync/backup.`,
|
|
69
|
+
}));
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
if (!index || !index.memories || Object.keys(index.memories).length === 0) {
|
|
73
|
+
console.log(JSON.stringify([]));
|
|
74
|
+
return;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
// Ensure search index exists
|
|
78
|
+
let searchIndex;
|
|
79
|
+
try {
|
|
80
|
+
searchIndex = readSearchIndex(brainDir);
|
|
81
|
+
} catch (_) {
|
|
82
|
+
searchIndex = null;
|
|
83
|
+
}
|
|
84
|
+
// Rebuild when ABSENT *or* STALE. The search index drifts out of sync with
|
|
85
|
+
// index.json whenever memories change outside memorize's addDocument path
|
|
86
|
+
// (forget, sleep/consolidate, sync pull, manual edit) — and a present-but-
|
|
87
|
+
// empty index silently makes every relevance score 0. Compare the doc set,
|
|
88
|
+
// not just presence.
|
|
89
|
+
if (isSearchIndexStale(searchIndex, index)) {
|
|
90
|
+
searchIndex = rebuildIndex(brainDir, index);
|
|
91
|
+
writeSearchIndex(brainDir, searchIndex);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
// Context mode: build query from project context
|
|
95
|
+
const query = args.context
|
|
96
|
+
? buildContextQuery(args)
|
|
97
|
+
: args.query;
|
|
98
|
+
|
|
99
|
+
// Compute relevance scores (BM25 — length-normalized, TF-saturated; better
|
|
100
|
+
// than raw TF-IDF cosine at surfacing long, detailed memories under noise).
|
|
101
|
+
const tfidfScores = bm25Search(searchIndex, query);
|
|
102
|
+
|
|
103
|
+
// Build memory list from index
|
|
104
|
+
const memories = Object.entries(index.memories).map(([id, entry]) => ({
|
|
105
|
+
id,
|
|
106
|
+
...entry,
|
|
107
|
+
}));
|
|
108
|
+
|
|
109
|
+
// Load associations for spreading activation
|
|
110
|
+
let associations;
|
|
111
|
+
try {
|
|
112
|
+
associations = readAssociations();
|
|
113
|
+
} catch (_) {
|
|
114
|
+
associations = null;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// Build recall context
|
|
118
|
+
const recallContext = {};
|
|
119
|
+
if (args.project) recallContext.project = args.project;
|
|
120
|
+
if (args.task) recallContext.task_type = args.task;
|
|
121
|
+
if (args.topics) recallContext.topics = args.topics.split(',');
|
|
122
|
+
|
|
123
|
+
// Rank using scorer.js with TF-IDF as the relevance function
|
|
124
|
+
const ranked = rankMemories(
|
|
125
|
+
memories,
|
|
126
|
+
(mem) => tfidfScores[mem.id] || 0,
|
|
127
|
+
{
|
|
128
|
+
associations: associations || undefined,
|
|
129
|
+
recallContext: Object.keys(recallContext).length > 0 ? recallContext : undefined,
|
|
130
|
+
}
|
|
131
|
+
);
|
|
132
|
+
|
|
133
|
+
// Return top N
|
|
134
|
+
const top = args.top || 10;
|
|
135
|
+
const results = ranked.slice(0, top).map((mem) => ({
|
|
136
|
+
id: mem.id,
|
|
137
|
+
title: mem.title || path.basename(mem.path, '.md'),
|
|
138
|
+
path: mem.path,
|
|
139
|
+
type: mem.type,
|
|
140
|
+
score: mem.score,
|
|
141
|
+
relevance: mem.relevance,
|
|
142
|
+
decayed_strength: mem.decayed_strength,
|
|
143
|
+
context_match: mem.context_match,
|
|
144
|
+
spreading_bonus: mem.spreading_bonus,
|
|
145
|
+
confidence: mem.confidence,
|
|
146
|
+
tags: mem.tags,
|
|
147
|
+
}));
|
|
148
|
+
|
|
149
|
+
console.log(JSON.stringify(results, null, 2));
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* The TF-IDF search index is stale if it is missing, has a different document
|
|
154
|
+
* count than the live index, or is missing any indexed memory id. Catches the
|
|
155
|
+
* empty-index and add/remove/rename drift cases (in-place same-id body edits
|
|
156
|
+
* are not detected by count alone — acceptable until a version/mtime check).
|
|
157
|
+
*/
|
|
158
|
+
/**
|
|
159
|
+
* Rebuild the search index from all memories.
|
|
160
|
+
*/
|
|
161
|
+
function handleReindex(brainDir) {
|
|
162
|
+
let index;
|
|
163
|
+
try {
|
|
164
|
+
index = readIndex();
|
|
165
|
+
} catch (err) {
|
|
166
|
+
console.error(JSON.stringify({
|
|
167
|
+
error: `Corrupt index.json in ~/.brain/ — ${err.message}. Fix the JSON manually or restore from sync/backup.`,
|
|
168
|
+
}));
|
|
169
|
+
process.exit(1);
|
|
170
|
+
}
|
|
171
|
+
if (!index) {
|
|
172
|
+
console.error(JSON.stringify({ error: 'No index.json found.' }));
|
|
173
|
+
process.exit(1);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
const searchIndex = rebuildIndex(brainDir, index);
|
|
177
|
+
writeSearchIndex(brainDir, searchIndex);
|
|
178
|
+
|
|
179
|
+
console.log(JSON.stringify({
|
|
180
|
+
reindexed: true,
|
|
181
|
+
documents: searchIndex.doc_count,
|
|
182
|
+
terms: Object.keys(searchIndex.df).length,
|
|
183
|
+
}));
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* Build a query from context when no explicit query is given.
|
|
188
|
+
* Uses project name and topics as search terms.
|
|
189
|
+
*/
|
|
190
|
+
function buildContextQuery(args) {
|
|
191
|
+
const parts = [];
|
|
192
|
+
if (args.project) parts.push(args.project);
|
|
193
|
+
if (args.topics) parts.push(args.topics);
|
|
194
|
+
if (args.task) parts.push(args.task);
|
|
195
|
+
|
|
196
|
+
// If still empty, use a broad query
|
|
197
|
+
return parts.length > 0 ? parts.join(' ') : '*';
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Parse CLI arguments.
|
|
202
|
+
*/
|
|
203
|
+
function parseArgs(argv) {
|
|
204
|
+
const args = {
|
|
205
|
+
query: null,
|
|
206
|
+
project: null,
|
|
207
|
+
task: null,
|
|
208
|
+
topics: null,
|
|
209
|
+
top: 10,
|
|
210
|
+
context: false,
|
|
211
|
+
reindex: false,
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
const positional = [];
|
|
215
|
+
|
|
216
|
+
for (let i = 0; i < argv.length; i++) {
|
|
217
|
+
switch (argv[i]) {
|
|
218
|
+
case '--project':
|
|
219
|
+
args.project = argv[++i];
|
|
220
|
+
break;
|
|
221
|
+
case '--task':
|
|
222
|
+
args.task = argv[++i];
|
|
223
|
+
break;
|
|
224
|
+
case '--topics':
|
|
225
|
+
args.topics = argv[++i];
|
|
226
|
+
break;
|
|
227
|
+
case '--top':
|
|
228
|
+
args.top = parseInt(argv[++i], 10);
|
|
229
|
+
break;
|
|
230
|
+
case '--context':
|
|
231
|
+
args.context = true;
|
|
232
|
+
break;
|
|
233
|
+
case '--reindex':
|
|
234
|
+
args.reindex = true;
|
|
235
|
+
break;
|
|
236
|
+
default:
|
|
237
|
+
if (!argv[i].startsWith('--')) {
|
|
238
|
+
positional.push(argv[i]);
|
|
239
|
+
}
|
|
240
|
+
break;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
if (positional.length > 0) {
|
|
245
|
+
args.query = positional.join(' ');
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
return args;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
main();
|
package/bin/reinforce.js
ADDED
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Brain Memory — Deterministic Reinforcement Engine
|
|
5
|
+
*
|
|
6
|
+
* Applies spaced reinforcement and Hebbian co-retrieval strengthening
|
|
7
|
+
* to recalled memories. The agent calls this after presenting recall
|
|
8
|
+
* results instead of manually updating frontmatter.
|
|
9
|
+
*
|
|
10
|
+
* Usage:
|
|
11
|
+
* brain reinforce mem_123 mem_456 mem_789
|
|
12
|
+
* brain reinforce mem_123 --project my-app
|
|
13
|
+
*
|
|
14
|
+
* Effects:
|
|
15
|
+
* - Spaced reinforcement boost to each memory's strength
|
|
16
|
+
* - Decay rate improvement (more forgetting-resistant)
|
|
17
|
+
* - access_count++, last_accessed = now
|
|
18
|
+
* - Hebbian co-retrieval: strengthens association edges between all pairs
|
|
19
|
+
* - Updates index.json, associations.json, and memory files
|
|
20
|
+
*/
|
|
21
|
+
|
|
22
|
+
const fs = require('fs');
|
|
23
|
+
const path = require('path');
|
|
24
|
+
const os = require('os');
|
|
25
|
+
|
|
26
|
+
const {
|
|
27
|
+
readIndex,
|
|
28
|
+
writeIndex,
|
|
29
|
+
readAssociations,
|
|
30
|
+
writeAssociations,
|
|
31
|
+
reinforceEdge,
|
|
32
|
+
getBrainDir,
|
|
33
|
+
} = require('../src/index-manager');
|
|
34
|
+
|
|
35
|
+
const {
|
|
36
|
+
reinforceStrength,
|
|
37
|
+
improveDecayRate,
|
|
38
|
+
} = require('../src/scorer');
|
|
39
|
+
|
|
40
|
+
function main() {
|
|
41
|
+
const args = parseArgs(process.argv.slice(2));
|
|
42
|
+
|
|
43
|
+
if (args.memoryIds.length === 0) {
|
|
44
|
+
console.error(JSON.stringify({ error: 'Usage: brain reinforce <mem_id1> [mem_id2] ...' }));
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
const brainDir = getBrainDir();
|
|
49
|
+
let index;
|
|
50
|
+
try {
|
|
51
|
+
index = readIndex();
|
|
52
|
+
} catch (err) {
|
|
53
|
+
console.error(JSON.stringify({
|
|
54
|
+
error: `Corrupt index.json in ~/.brain/ — ${err.message}. Fix the JSON manually or restore from sync/backup.`,
|
|
55
|
+
}));
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (!index) {
|
|
60
|
+
console.error(JSON.stringify({ error: 'Brain not initialized.' }));
|
|
61
|
+
process.exit(1);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
const now = new Date();
|
|
65
|
+
const nowISO = now.toISOString();
|
|
66
|
+
const reinforced = [];
|
|
67
|
+
|
|
68
|
+
// Apply spaced reinforcement to each memory
|
|
69
|
+
for (const memId of args.memoryIds) {
|
|
70
|
+
const entry = index.memories[memId];
|
|
71
|
+
if (!entry) continue;
|
|
72
|
+
|
|
73
|
+
const lastAccessed = new Date(entry.last_accessed || entry.created);
|
|
74
|
+
const daysSince = (now - lastAccessed) / (1000 * 60 * 60 * 24);
|
|
75
|
+
const accessCount = entry.access_count || 0;
|
|
76
|
+
|
|
77
|
+
// Compute boost
|
|
78
|
+
const oldStrength = entry.strength;
|
|
79
|
+
const newStrength = reinforceStrength(oldStrength, daysSince, accessCount);
|
|
80
|
+
const newDecayRate = improveDecayRate(entry.decay_rate);
|
|
81
|
+
|
|
82
|
+
// Update index entry
|
|
83
|
+
entry.strength = Math.round(newStrength * 1000) / 1000;
|
|
84
|
+
entry.decay_rate = Math.round(newDecayRate * 10000) / 10000;
|
|
85
|
+
entry.last_accessed = nowISO;
|
|
86
|
+
entry.access_count = accessCount + 1;
|
|
87
|
+
|
|
88
|
+
// Update the memory file's frontmatter on disk
|
|
89
|
+
updateMemoryFile(brainDir, entry.path, {
|
|
90
|
+
strength: entry.strength,
|
|
91
|
+
decay_rate: entry.decay_rate,
|
|
92
|
+
last_accessed: nowISO,
|
|
93
|
+
access_count: entry.access_count,
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
reinforced.push({
|
|
97
|
+
id: memId,
|
|
98
|
+
old_strength: oldStrength,
|
|
99
|
+
new_strength: entry.strength,
|
|
100
|
+
boost: Math.round((newStrength - oldStrength) * 1000) / 1000,
|
|
101
|
+
decay_rate: entry.decay_rate,
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Save index
|
|
106
|
+
writeIndex(index);
|
|
107
|
+
|
|
108
|
+
// Hebbian co-retrieval: strengthen edges between all pairs
|
|
109
|
+
let edgesReinforced = 0;
|
|
110
|
+
if (args.memoryIds.length > 1) {
|
|
111
|
+
let associations = readAssociations() || { version: 1, edges: {} };
|
|
112
|
+
|
|
113
|
+
for (let i = 0; i < args.memoryIds.length; i++) {
|
|
114
|
+
for (let j = i + 1; j < args.memoryIds.length; j++) {
|
|
115
|
+
const idA = args.memoryIds[i];
|
|
116
|
+
const idB = args.memoryIds[j];
|
|
117
|
+
// Only reinforce if both exist in index
|
|
118
|
+
if (index.memories[idA] && index.memories[idB]) {
|
|
119
|
+
reinforceEdge(associations, idA, idB, 'co_retrieval');
|
|
120
|
+
edgesReinforced++;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
writeAssociations(associations);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
console.log(JSON.stringify({
|
|
129
|
+
reinforced,
|
|
130
|
+
edges_reinforced: edgesReinforced,
|
|
131
|
+
}, null, 2));
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Update a memory file's YAML frontmatter fields on disk.
|
|
136
|
+
*
|
|
137
|
+
* @param {string} brainDir - Path to ~/.brain/
|
|
138
|
+
* @param {string} memPath - Relative path to memory file
|
|
139
|
+
* @param {Object} updates - Fields to update in frontmatter
|
|
140
|
+
*/
|
|
141
|
+
function updateMemoryFile(brainDir, memPath, updates) {
|
|
142
|
+
const fullPath = path.join(brainDir, memPath);
|
|
143
|
+
try {
|
|
144
|
+
let content = fs.readFileSync(fullPath, 'utf-8');
|
|
145
|
+
|
|
146
|
+
// Find frontmatter boundaries
|
|
147
|
+
const firstDash = content.indexOf('---');
|
|
148
|
+
const secondDash = content.indexOf('---', firstDash + 3);
|
|
149
|
+
if (firstDash === -1 || secondDash === -1) return;
|
|
150
|
+
|
|
151
|
+
let frontmatter = content.slice(firstDash + 3, secondDash);
|
|
152
|
+
|
|
153
|
+
// Update each field in the YAML
|
|
154
|
+
for (const [key, value] of Object.entries(updates)) {
|
|
155
|
+
const regex = new RegExp(`^(${key}:\\s*).*$`, 'm');
|
|
156
|
+
const formatted = typeof value === 'string' ? `"${value}"` : String(value);
|
|
157
|
+
if (regex.test(frontmatter)) {
|
|
158
|
+
frontmatter = frontmatter.replace(regex, `$1${formatted}`);
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
content = content.slice(0, firstDash + 3) + frontmatter + content.slice(secondDash);
|
|
163
|
+
fs.writeFileSync(fullPath, content);
|
|
164
|
+
} catch { /* skip if file not readable/writable */ }
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Parse CLI arguments.
|
|
169
|
+
*/
|
|
170
|
+
function parseArgs(argv) {
|
|
171
|
+
const args = {
|
|
172
|
+
memoryIds: [],
|
|
173
|
+
project: null,
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
for (let i = 0; i < argv.length; i++) {
|
|
177
|
+
if (argv[i] === '--project') {
|
|
178
|
+
args.project = argv[++i];
|
|
179
|
+
} else if (!argv[i].startsWith('--')) {
|
|
180
|
+
args.memoryIds.push(argv[i]);
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return args;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
main();
|