crbro-memory 1.0.1 β†’ 1.2.0

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 CHANGED
@@ -1,122 +1,121 @@
1
- # 🧠 CRBRO β€” Persistent Neural Memory for AI
2
-
3
- **CRBRO** is a local MCP (Model Context Protocol) server that gives your AI assistant **persistent long-term memory** across sessions. It uses a biological neural architecture β€” cortex, synapses, hippocampus β€” to store, connect, and retrieve knowledge automatically.
4
-
5
- Part of the **[Synthetica Decks](https://synthetica-decks.web.app)** Zero Deck.
6
-
7
- ## Features
8
-
9
- - **🧬 Biological Architecture** β€” Knowledge organized as neurons (cortex), connections (synapses), and session memory (hippocampus)
10
- - **πŸ” Hybrid Search** β€” Powered by [Orama](https://orama.com/) for fast BM25 + fuzzy text search
11
- - **πŸ”₯ Heat Scores** β€” Automatic relevance tracking based on frequency, recency, and connectivity
12
- - **πŸ—ΊοΈ Global Map** β€” Cluster detection and cross-domain bridge identification *(premium)*
13
- - **πŸ“¦ Zero Dependencies** β€” Pure Node.js, no Python, no Docker, no external databases
14
- - **πŸ’Ύ File-Based** β€” All data stored as readable JSON files in `~/.crbro/`
15
- - **πŸ”Œ MCP Native** β€” Works with Claude Desktop, Cursor, Windsurf, and any MCP-compatible client
16
-
17
- ## Quick Start
18
-
19
- ### 1. Initialize
20
-
21
- ```bash
22
- npx crbro-memory init
23
- ```
24
-
25
- ### 2. Add to your MCP config
26
-
27
- **Claude Desktop** (`~/AppData/Roaming/Claude/claude_desktop_config.json`):
28
- ```json
29
- {
30
- "mcpServers": {
31
- "crbro": {
32
- "command": "npx",
33
- "args": ["-y", "crbro-memory"]
34
- }
35
- }
36
- }
37
- ```
38
-
39
- **Cursor** (`.cursor/mcp.json`):
40
- ```json
41
- {
42
- "mcpServers": {
43
- "crbro": {
44
- "command": "npx",
45
- "args": ["-y", "crbro-memory"]
46
- }
47
- }
48
- }
49
- ```
50
-
51
- ### 3. Start using it
52
-
53
- Your AI will now have access to 15 memory tools. Start any session with `crbro_boot`.
54
-
55
- ## Tools
56
-
57
- ### Free (always available)
58
-
59
- | Tool | Description |
60
- |------|-------------|
61
- | `crbro_boot` | Boot the brain at session start β€” loads hot topics and context |
62
- | `crbro_status` | Brain status β€” neurons, synapses, sessions count |
63
- | `crbro_learn` | Store a fact, decision, pattern, or preference |
64
- | `crbro_neuron` | Read a specific neuron (topic) with all its knowledge |
65
- | `crbro_neurons` | List neurons with optional filters (domain, type, heat) |
66
- | `crbro_recall` | Search the brain using hybrid text search |
67
- | `crbro_connect` | Create or strengthen a connection between neurons |
68
- | `crbro_connections` | Get all connections for a neuron |
69
- | `crbro_session_log` | Log a session summary |
70
- | `crbro_sessions` | List recent sessions |
71
- | `crbro_context` | Read/update active working context |
72
- | `crbro_hot_topics` | Get the most active topics by heat score |
73
- | `crbro_consolidate` | End-of-session consolidation |
74
-
75
- ### Premium (requires Synthetica Zero Deck license)
76
-
77
- | Tool | Description |
78
- |------|-------------|
79
- | `crbro_global_map` | View the neural network β€” clusters and cross-domain bridges |
80
- | `crbro_maintenance` | Full brain maintenance β€” archive, prune, rebuild |
81
-
82
- ## Architecture
83
-
84
- ```
85
- ~/.crbro/
86
- β”œβ”€β”€ manifest.json ← Brain metadata
87
- β”œβ”€β”€ cortex/ ← One JSON per neuron (topic)
88
- β”‚ β”œβ”€β”€ project_octochat.json
89
- β”‚ └── tech_firebase.json
90
- β”œβ”€β”€ synapses/ ← One JSON per connection
91
- β”‚ └── syn_octochat__firebase.json
92
- β”œβ”€β”€ hippocampus/ ← One JSON per session
93
- β”‚ └── session_2026-05-06.json
94
- β”œβ”€β”€ prefrontal/ ← Working memory
95
- β”‚ β”œβ”€β”€ active_context.json
96
- β”‚ β”œβ”€β”€ hot_topics.json
97
- β”‚ └── global_map.json
98
- β”œβ”€β”€ archives/ ← Cold neurons
99
- └── .search/ ← Orama search index
100
- └── orama.index.json
101
- ```
102
-
103
- ## Heat Score Algorithm
104
-
105
- Each neuron has a heat score (0.0 - 1.0) calculated from:
106
-
107
- - **Frequency (35%)** β€” How often the neuron is accessed
108
- - **Recency (40%)** β€” When it was last accessed (today = 1.0, >3 months = 0.05)
109
- - **Connectivity (25%)** β€” How many synapses connect to it
110
-
111
- ## CLI Commands
112
-
113
- ```bash
114
- npx crbro-memory # Start MCP server
115
- npx crbro-memory init # Initialize brain
116
- npx crbro-memory status # Show brain status
117
- npx crbro-memory --help # Help
118
- ```
119
-
120
- ## License
121
-
122
- MIT β€” Part of [Synthetica Decks](https://synthetica-decks.web.app) by Octonove Agency.
1
+ # 🧠 CRBRO β€” Persistent Neural Memory for AI
2
+
3
+ **CRBRO** is a local MCP (Model Context Protocol) server that gives your AI assistant **persistent long-term memory** across sessions. It uses a biological neural architecture β€” cortex, synapses, hippocampus β€” to store, connect, and retrieve knowledge automatically.
4
+
5
+
6
+ ## Features
7
+
8
+ - **🧬 Biological Architecture** β€” Knowledge organized as neurons (cortex), connections (synapses), and session memory (hippocampus)
9
+ - **πŸ” Hybrid Search** β€” Powered by [Orama](https://orama.com/) for fast BM25 + fuzzy text search
10
+ - **πŸ”₯ Heat Scores** β€” Automatic relevance tracking based on frequency, recency, and connectivity
11
+ - **πŸ—ΊοΈ Global Map** β€” Cluster detection and cross-domain bridge identification *(premium)*
12
+ - **πŸ“¦ Zero Dependencies** β€” Pure Node.js, no Python, no Docker, no external databases
13
+ - **πŸ’Ύ File-Based** β€” All data stored as readable JSON files in `~/.crbro/`
14
+ - **πŸ”Œ MCP Native** β€” Works with Claude Desktop, Cursor, Windsurf, and any MCP-compatible client
15
+
16
+ ## Quick Start
17
+
18
+ ### 1. Initialize
19
+
20
+ ```bash
21
+ npx crbro-memory init
22
+ ```
23
+
24
+ ### 2. Add to your MCP config
25
+
26
+ **Claude Desktop** (`~/AppData/Roaming/Claude/claude_desktop_config.json`):
27
+ ```json
28
+ {
29
+ "mcpServers": {
30
+ "crbro": {
31
+ "command": "npx",
32
+ "args": ["-y", "crbro-memory"]
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ **Cursor** (`.cursor/mcp.json`):
39
+ ```json
40
+ {
41
+ "mcpServers": {
42
+ "crbro": {
43
+ "command": "npx",
44
+ "args": ["-y", "crbro-memory"]
45
+ }
46
+ }
47
+ }
48
+ ```
49
+
50
+ ### 3. Start using it
51
+
52
+ Your AI will now have access to 15 memory tools. Start any session with `crbro_boot`.
53
+
54
+ ## Tools
55
+
56
+ ### Free (always available)
57
+
58
+ | Tool | Description |
59
+ |------|-------------|
60
+ | `crbro_boot` | Boot the brain at session start β€” loads hot topics and context |
61
+ | `crbro_status` | Brain status β€” neurons, synapses, sessions count |
62
+ | `crbro_learn` | Store a fact, decision, pattern, or preference |
63
+ | `crbro_neuron` | Read a specific neuron (topic) with all its knowledge |
64
+ | `crbro_neurons` | List neurons with optional filters (domain, type, heat) |
65
+ | `crbro_recall` | Search the brain using hybrid text search |
66
+ | `crbro_connect` | Create or strengthen a connection between neurons |
67
+ | `crbro_connections` | Get all connections for a neuron |
68
+ | `crbro_session_log` | Log a session summary |
69
+ | `crbro_sessions` | List recent sessions |
70
+ | `crbro_context` | Read/update active working context |
71
+ | `crbro_hot_topics` | Get the most active topics by heat score |
72
+ | `crbro_consolidate` | End-of-session consolidation |
73
+
74
+ ### Premium (requires Synthetica Zero Deck license)
75
+
76
+ | Tool | Description |
77
+ |------|-------------|
78
+ | `crbro_global_map` | View the neural network β€” clusters and cross-domain bridges |
79
+ | `crbro_maintenance` | Full brain maintenance β€” archive, prune, rebuild |
80
+
81
+ ## Architecture
82
+
83
+ ```
84
+ ~/.crbro/
85
+ β”œβ”€β”€ manifest.json ← Brain metadata
86
+ β”œβ”€β”€ cortex/ ← One JSON per neuron (topic)
87
+ β”‚ β”œβ”€β”€ project_octochat.json
88
+ β”‚ └── tech_firebase.json
89
+ β”œβ”€β”€ synapses/ ← One JSON per connection
90
+ β”‚ └── syn_octochat__firebase.json
91
+ β”œβ”€β”€ hippocampus/ ← One JSON per session
92
+ β”‚ └── session_2026-05-06.json
93
+ β”œβ”€β”€ prefrontal/ ← Working memory
94
+ β”‚ β”œβ”€β”€ active_context.json
95
+ β”‚ β”œβ”€β”€ hot_topics.json
96
+ β”‚ └── global_map.json
97
+ β”œβ”€β”€ archives/ ← Cold neurons
98
+ └── .search/ ← Orama search index
99
+ └── orama.index.json
100
+ ```
101
+
102
+ ## Heat Score Algorithm
103
+
104
+ Each neuron has a heat score (0.0 - 1.0) calculated from:
105
+
106
+ - **Frequency (35%)** β€” How often the neuron is accessed
107
+ - **Recency (40%)** β€” When it was last accessed (today = 1.0, >3 months = 0.05)
108
+ - **Connectivity (25%)** β€” How many synapses connect to it
109
+
110
+ ## CLI Commands
111
+
112
+ ```bash
113
+ npx crbro-memory # Start MCP server
114
+ npx crbro-memory init # Initialize brain
115
+ npx crbro-memory status # Show brain status
116
+ npx crbro-memory --help # Help
117
+ ```
118
+
119
+ ## License
120
+
121
+ MIT β€” Part of Octonove Agency.
package/bin/crbro.js CHANGED
@@ -2,98 +2,337 @@
2
2
 
3
3
  // ─── CRBRO CLI ───────────────────────────────────────────────────
4
4
  // Command-line interface for CRBRO memory system
5
+ // Supports: init, status, activate, mine, setup-miner, miner-status,
6
+ // remove-miner, and MCP server mode (default)
7
+
8
+ import { platform, homedir } from 'os';
9
+ import { join } from 'path';
10
+ import { existsSync } from 'fs';
5
11
 
6
12
  const args = process.argv.slice(2);
7
13
  const command = args[0];
8
14
 
15
+ // ─── IDE Detection ──────────────────────────────────────────────
16
+ const IDE_CONFIGS = [
17
+ {
18
+ name: 'Antigravity (Google Gemini)',
19
+ id: 'antigravity',
20
+ configPath: () => join(homedir(), '.gemini', 'antigravity', 'mcp_config.json'),
21
+ configFormat: 'mcpServers',
22
+ },
23
+ {
24
+ name: 'Cursor',
25
+ id: 'cursor',
26
+ configPath: () => join(homedir(), '.cursor', 'mcp.json'),
27
+ configFormat: 'mcpServers',
28
+ },
29
+ {
30
+ name: 'Windsurf',
31
+ id: 'windsurf',
32
+ configPath: () => join(homedir(), '.windsurf', 'mcp.json'),
33
+ configFormat: 'mcpServers',
34
+ },
35
+ {
36
+ name: 'Claude Desktop',
37
+ id: 'claude-desktop',
38
+ configPath: () => {
39
+ if (platform() === 'win32') {
40
+ return join(process.env.APPDATA || '', 'Claude', 'claude_desktop_config.json');
41
+ }
42
+ return join(homedir(), 'Library', 'Application Support', 'Claude', 'claude_desktop_config.json');
43
+ },
44
+ configFormat: 'mcpServers',
45
+ },
46
+ {
47
+ name: 'Claude Code (user scope)',
48
+ id: 'claude-code',
49
+ configPath: () => join(homedir(), '.claude.json'),
50
+ configFormat: 'mcpServers',
51
+ },
52
+ {
53
+ name: 'VS Code + Continue',
54
+ id: 'continue',
55
+ configPath: () => join(homedir(), '.continue', 'config.json'),
56
+ configFormat: 'mcpServers',
57
+ },
58
+ {
59
+ name: 'ChatGPT Desktop',
60
+ id: 'chatgpt',
61
+ configPath: () => {
62
+ if (platform() === 'win32') {
63
+ return join(process.env.APPDATA || '', 'ChatGPT', 'mcp_config.json');
64
+ }
65
+ return join(homedir(), 'Library', 'Application Support', 'ChatGPT', 'mcp_config.json');
66
+ },
67
+ configFormat: 'mcpServers',
68
+ },
69
+ ];
70
+
71
+ function detectIDEs() {
72
+ const detected = [];
73
+ for (const ide of IDE_CONFIGS) {
74
+ try {
75
+ const configPath = ide.configPath();
76
+ if (existsSync(configPath)) {
77
+ detected.push({ ...ide, configPath: configPath, exists: true });
78
+ } else {
79
+ // Check if the parent directory exists (IDE installed but no config yet)
80
+ const parentDir = configPath.split(/[/\\]/).slice(0, -1).join(platform() === 'win32' ? '\\' : '/');
81
+ if (existsSync(parentDir)) {
82
+ detected.push({ ...ide, configPath: configPath, exists: false });
83
+ }
84
+ }
85
+ } catch { /* skip */ }
86
+ }
87
+ return detected;
88
+ }
89
+
90
+ function generateMCPSnippet(envVars) {
91
+ return JSON.stringify({
92
+ "crbro": {
93
+ "command": "npx",
94
+ "args": ["-y", "crbro-memory"],
95
+ ...(envVars ? { "env": envVars } : {})
96
+ }
97
+ }, null, 2);
98
+ }
99
+
100
+ // ─── Commands ───────────────────────────────────────────────────
101
+
9
102
  if (command === 'init') {
10
- // Initialize brain
103
+ // ─── Initialize brain + IDE detection ──────────────────────────
11
104
  import('../dist/engine/brain.js').then(async ({ Brain }) => {
12
105
  const brain = new Brain();
13
106
  const manifest = await brain.initialize();
14
- console.log('🧠 CRBRO brain initialized!');
15
- console.log(` Path: ${manifest.brain_path}`);
107
+
16
108
  console.log('');
17
- console.log('Add CRBRO to your MCP config:');
109
+ console.log(' 🧠 CRBRO brain initialized!');
110
+ console.log(` Path: ${manifest.brain_path}`);
18
111
  console.log('');
19
- console.log(JSON.stringify({
20
- "mcpServers": {
21
- "crbro": {
22
- "command": "npx",
23
- "args": ["-y", "crbro-memory"]
24
- }
112
+
113
+ // Detect IDEs
114
+ const ides = detectIDEs();
115
+
116
+ if (ides.length > 0) {
117
+ console.log(' πŸ“‘ Detected IDEs:');
118
+ console.log('');
119
+ for (const ide of ides) {
120
+ const status = ide.exists ? 'βœ… config exists' : 'πŸ“ needs config';
121
+ console.log(` ${ide.name}: ${status}`);
122
+ console.log(` β†’ ${ide.configPath}`);
25
123
  }
26
- }, null, 2));
124
+ console.log('');
125
+ console.log(' Add this to your MCP config (inside "mcpServers"):');
126
+ } else {
127
+ console.log(' ⚠️ No IDE detected. Add this to your MCP config manually:');
128
+ }
129
+
130
+ console.log('');
131
+ console.log(' ' + generateMCPSnippet().split('\n').join('\n '));
132
+ console.log('');
133
+ console.log(' Next steps:');
134
+ console.log(' 1. Add the config above to your IDE\'s MCP settings');
135
+ console.log(' 2. npx crbro-memory activate YOUR-LICENSE-KEY');
136
+ console.log(' 3. (Optional) npx crbro-memory setup-miner');
137
+ console.log(' 4. Restart your IDE β€” CRBRO boots automatically!');
138
+ console.log('');
27
139
  }).catch(console.error);
28
140
 
29
141
  } else if (command === 'status') {
30
- // Show brain status
142
+ // ─── Show brain status ─────────────────────────────────────────
31
143
  import('../dist/engine/brain.js').then(async ({ Brain }) => {
32
144
  const brain = new Brain();
33
145
  try {
34
146
  const manifest = await brain.getManifest();
35
- console.log('🧠 CRBRO Brain Status');
36
- console.log(` Version: ${manifest.version}`);
37
- console.log(` Path: ${manifest.brain_path}`);
38
- console.log(` Neurons: ${manifest.total_neurons}`);
39
- console.log(` Synapses: ${manifest.total_synapses}`);
40
- console.log(` Sessions: ${manifest.total_sessions}`);
41
- console.log(` Last Boot: ${manifest.last_boot || 'never'}`);
147
+ console.log('');
148
+ console.log(' 🧠 CRBRO Brain Status');
149
+ console.log(' ─────────────────────');
150
+ console.log(` Version: ${manifest.version}`);
151
+ console.log(` Path: ${manifest.brain_path}`);
152
+ console.log(` Neurons: ${manifest.total_neurons}`);
153
+ console.log(` Synapses: ${manifest.total_synapses}`);
154
+ console.log(` Sessions: ${manifest.total_sessions}`);
155
+ console.log(` Last Boot: ${manifest.last_boot || 'never'}`);
156
+ console.log(` Last Consolidate: ${manifest.last_consolidation || 'never'}`);
157
+ console.log(` License: ${manifest.license_key ? 'βœ… Active' : '❌ Not activated'}`);
158
+ console.log('');
159
+
160
+ // Show detected IDEs
161
+ const ides = detectIDEs();
162
+ if (ides.length > 0) {
163
+ console.log(' πŸ“‘ Connected IDEs:');
164
+ for (const ide of ides) {
165
+ console.log(` ${ide.exists ? 'βœ…' : '⚠️ '} ${ide.name}`);
166
+ }
167
+ console.log('');
168
+ }
42
169
  } catch {
43
- console.log('🧠 CRBRO brain not initialized. Run: npx crbro-memory init');
170
+ console.log('');
171
+ console.log(' 🧠 CRBRO brain not initialized.');
172
+ console.log(' Run: npx crbro-memory init');
173
+ console.log('');
44
174
  }
45
175
  }).catch(console.error);
46
176
 
47
177
  } else if (command === 'activate') {
48
- // Activate license key
178
+ // ─── Activate license key ──────────────────────────────────────
49
179
  const key = args[1];
50
180
  if (!key) {
51
- console.log('❌ Usage: npx crbro-memory activate SYNTH-ZERO-XXXX-XXXX-XXXX');
52
181
  console.log('');
53
- console.log('Get your license key at https://synthetica-decks.web.app');
182
+ console.log(' ❌ Usage: npx crbro-memory activate SYNTH-ZERO-XXXX-XXXX-XXXX');
183
+ console.log('');
184
+ console.log(' Get your license key at https://synthetica-decks.web.app');
185
+ console.log('');
54
186
  process.exit(1);
55
187
  }
56
188
 
57
189
  import('../dist/engine/brain.js').then(async ({ Brain }) => {
58
190
  const brain = new Brain();
59
191
  try {
60
- await brain.getManifest(); // Ensure brain exists
192
+ await brain.getManifest();
61
193
  } catch {
62
- console.log('🧠 Brain not initialized. Initializing now...');
194
+ console.log(' 🧠 Brain not initialized. Initializing now...');
63
195
  await brain.initialize();
64
196
  }
65
197
 
66
198
  // Validate key format
67
199
  if (!key.startsWith('SYNTH-ZERO-') || key.length < 20) {
68
- console.log('❌ Invalid license key format.');
69
- console.log(' Keys start with SYNTH-ZERO- and are at least 20 characters.');
200
+ console.log(' ❌ Invalid license key format.');
201
+ console.log(' Keys start with SYNTH-ZERO- and are at least 20 characters.');
70
202
  process.exit(1);
71
203
  }
72
204
 
73
205
  // Persist key in manifest
74
206
  await brain.updateManifest({ license_key: key });
75
- console.log('βœ… License key activated!');
76
207
  console.log('');
77
- console.log(' πŸ”“ Premium features unlocked:');
78
- console.log(' β€’ crbro_global_map β€” Neural cluster visualization');
79
- console.log(' β€’ crbro_maintenance β€” Automated brain optimization');
208
+ console.log(' βœ… License key activated!');
209
+ console.log('');
210
+ console.log(' πŸ”“ Premium features unlocked:');
211
+ console.log(' β€’ crbro_global_map β€” Neural cluster visualization');
212
+ console.log(' β€’ crbro_maintenance β€” Automated brain optimization');
213
+ console.log('');
214
+ console.log(' Restart your IDE to apply changes.');
215
+ console.log('');
216
+ }).catch(console.error);
217
+
218
+ } else if (command === 'mine') {
219
+ // ─── One-shot mining ───────────────────────────────────────────
220
+ const targetDir = args[1];
221
+
222
+ import('../dist/miner/index.js').then(async ({ Miner }) => {
223
+ console.log('');
224
+ console.log(' ⛏️ CRBRO Miner β€” Scanning for knowledge...');
225
+ console.log('');
226
+
227
+ const miner = new Miner();
228
+ const result = await miner.mine(targetDir);
229
+
230
+ console.log(' ────────────────────────────────');
231
+ console.log(` Files scanned: ${result.scanned}`);
232
+ console.log(` New files mined: ${result.new_files}`);
233
+ console.log(` Neurons created: ${result.neurons_created}`);
234
+ console.log(` Neurons updated: ${result.neurons_updated}`);
235
+ console.log(` Facts added: ${result.facts_added}`);
236
+ console.log(` Decisions found: ${result.decisions_added}`);
237
+
238
+ if (result.technologies_found.length > 0) {
239
+ console.log(` Technologies: ${result.technologies_found.slice(0, 10).join(', ')}`);
240
+ }
241
+
242
+ if (result.errors.length > 0) {
243
+ console.log('');
244
+ console.log(' ⚠️ Errors:');
245
+ for (const err of result.errors.slice(0, 5)) {
246
+ console.log(` ${err}`);
247
+ }
248
+ }
249
+
250
+ console.log('');
251
+ }).catch(console.error);
252
+
253
+ } else if (command === 'setup-miner') {
254
+ // ─── Setup automatic mining ────────────────────────────────────
255
+ import('../dist/miner/scheduler.js').then(async ({ setupScheduler }) => {
256
+ console.log('');
257
+ console.log(' ⏰ Setting up CRBRO Auto-Miner...');
258
+ console.log('');
259
+
260
+ const result = await setupScheduler();
261
+ console.log(result.message);
262
+ console.log('');
263
+ }).catch(console.error);
264
+
265
+ } else if (command === 'miner-status') {
266
+ // ─── Check miner status ────────────────────────────────────────
267
+ Promise.all([
268
+ import('../dist/miner/scheduler.js'),
269
+ import('../dist/miner/index.js'),
270
+ ]).then(async ([{ getSchedulerStatus }, { Miner }]) => {
271
+ console.log('');
272
+ console.log(' ⛏️ CRBRO Miner Status');
273
+ console.log(' ─────────────────────');
274
+
275
+ // Scheduler status
276
+ const schedStatus = await getSchedulerStatus();
277
+ console.log(` Scheduler: ${schedStatus.installed ? 'βœ… Installed' : '❌ Not installed'}`);
278
+ console.log(` Platform: ${schedStatus.platform}`);
279
+ if (schedStatus.details) {
280
+ console.log(` Details: ${schedStatus.details}`);
281
+ }
282
+
283
+ // Miner state
284
+ const miner = new Miner();
285
+ const status = await miner.getStatus();
286
+ console.log('');
287
+ console.log(` Last run: ${status.state.last_run || 'never'}`);
288
+ console.log(` Total mined: ${status.state.total_mined} files`);
289
+ console.log(` Tracked: ${Object.keys(status.state.mined_files).length} files`);
290
+ console.log('');
291
+
292
+ if (status.detected_dirs.length > 0) {
293
+ console.log(' πŸ“‚ Scan directories:');
294
+ for (const dir of status.detected_dirs) {
295
+ console.log(` ${dir}`);
296
+ }
297
+ } else {
298
+ console.log(' ⚠️ No IDE directories detected.');
299
+ }
300
+ console.log('');
301
+ }).catch(console.error);
302
+
303
+ } else if (command === 'remove-miner') {
304
+ // ─── Remove automatic mining ───────────────────────────────────
305
+ import('../dist/miner/scheduler.js').then(async ({ removeScheduler }) => {
306
+ const result = await removeScheduler();
307
+ console.log('');
308
+ console.log(result.success ? ` βœ… ${result.message}` : ` ❌ ${result.message}`);
80
309
  console.log('');
81
- console.log(' Restart your IDE to apply changes.');
82
310
  }).catch(console.error);
83
311
 
84
312
  } else if (command === '--help' || command === '-h') {
85
- console.log('🧠 CRBRO β€” Persistent Neural Memory for AI');
313
+ // ─── Help ──────────────────────────────────────────────────────
314
+ console.log('');
315
+ console.log(' 🧠 CRBRO β€” Persistent Neural Memory for AI');
316
+ console.log(' ═══════════════════════════════════════════');
317
+ console.log('');
318
+ console.log(' Setup:');
319
+ console.log(' npx crbro-memory init Initialize brain + detect IDEs');
320
+ console.log(' npx crbro-memory activate KEY Activate premium license');
321
+ console.log(' npx crbro-memory status Show brain status');
322
+ console.log('');
323
+ console.log(' Auto-Mining:');
324
+ console.log(' npx crbro-memory mine [dir] One-shot mining of artifacts');
325
+ console.log(' npx crbro-memory setup-miner Install scheduled auto-miner');
326
+ console.log(' npx crbro-memory miner-status Check auto-miner status');
327
+ console.log(' npx crbro-memory remove-miner Remove auto-miner');
328
+ console.log('');
329
+ console.log(' Server:');
330
+ console.log(' npx crbro-memory Start MCP server (stdio)');
86
331
  console.log('');
87
- console.log('Usage:');
88
- console.log(' npx crbro-memory Start MCP server (stdio)');
89
- console.log(' npx crbro-memory init Initialize brain directory');
90
- console.log(' npx crbro-memory status Show brain status');
91
- console.log(' npx crbro-memory activate KEY Activate premium license');
92
- console.log(' npx crbro-memory --help Show this help');
332
+ console.log(' Part of Synthetica Decks β€” https://synthetica-decks.web.app');
93
333
  console.log('');
94
- console.log('Part of Synthetica Decks β€” https://synthetica-decks.web.app');
95
334
 
96
335
  } else {
97
- // Default: start MCP server
336
+ // ─── Default: start MCP server ─────────────────────────────────
98
337
  import('../dist/index.js').catch(console.error);
99
338
  }