memextend 0.1.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/dist/commands/edit.d.ts +2 -0
- package/dist/commands/edit.d.ts.map +1 -0
- package/dist/commands/edit.js +84 -0
- package/dist/commands/edit.js.map +1 -0
- package/dist/commands/export.d.ts +8 -0
- package/dist/commands/export.d.ts.map +1 -0
- package/dist/commands/export.js +88 -0
- package/dist/commands/export.js.map +1 -0
- package/dist/commands/forget.d.ts +10 -0
- package/dist/commands/forget.d.ts.map +1 -0
- package/dist/commands/forget.js +199 -0
- package/dist/commands/forget.js.map +1 -0
- package/dist/commands/help.d.ts +2 -0
- package/dist/commands/help.d.ts.map +1 -0
- package/dist/commands/help.js +437 -0
- package/dist/commands/help.js.map +1 -0
- package/dist/commands/import.d.ts +7 -0
- package/dist/commands/import.d.ts.map +1 -0
- package/dist/commands/import.js +138 -0
- package/dist/commands/import.js.map +1 -0
- package/dist/commands/init.d.ts +6 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +258 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/list.d.ts +7 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +67 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/commands/save.d.ts +8 -0
- package/dist/commands/save.d.ts.map +1 -0
- package/dist/commands/save.js +95 -0
- package/dist/commands/save.js.map +1 -0
- package/dist/commands/search.d.ts +8 -0
- package/dist/commands/search.d.ts.map +1 -0
- package/dist/commands/search.js +82 -0
- package/dist/commands/search.js.map +1 -0
- package/dist/commands/status.d.ts +7 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +231 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/uninstall.d.ts +7 -0
- package/dist/commands/uninstall.d.ts.map +1 -0
- package/dist/commands/uninstall.js +188 -0
- package/dist/commands/uninstall.js.map +1 -0
- package/dist/commands/webui.d.ts +7 -0
- package/dist/commands/webui.d.ts.map +1 -0
- package/dist/commands/webui.js +314 -0
- package/dist/commands/webui.js.map +1 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +97 -0
- package/dist/index.js.map +1 -0
- package/package.json +51 -0
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
// apps/cli/src/commands/webui.ts
|
|
2
|
+
// Copyright (c) 2026 ZodTTD LLC. MIT License.
|
|
3
|
+
import { existsSync } from 'fs';
|
|
4
|
+
import { join, dirname } from 'path';
|
|
5
|
+
import { fileURLToPath } from 'url';
|
|
6
|
+
import { homedir } from 'os';
|
|
7
|
+
import chalk from 'chalk';
|
|
8
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
9
|
+
const __dirname = dirname(__filename);
|
|
10
|
+
const MEMEXTEND_DIR = join(homedir(), '.memextend');
|
|
11
|
+
const DB_PATH = join(MEMEXTEND_DIR, 'memextend.db');
|
|
12
|
+
export async function webuiCommand(options) {
|
|
13
|
+
// Check if memextend is initialized
|
|
14
|
+
if (!existsSync(DB_PATH)) {
|
|
15
|
+
console.log(chalk.yellow('\n Warning: memextend not initialized. Run `memextend init` first.\n'));
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
const port = parseInt(options.port || '3333', 10);
|
|
19
|
+
const host = options.host || 'localhost';
|
|
20
|
+
if (isNaN(port) || port < 1 || port > 65535) {
|
|
21
|
+
console.log(chalk.red('\n Error: Invalid port number.\n'));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
try {
|
|
25
|
+
// Dynamic import of the webui server
|
|
26
|
+
// Path from apps/cli/dist/commands/webui.js to apps/webui/dist/server.js
|
|
27
|
+
const webuiPath = join(__dirname, '..', '..', '..', 'webui', 'dist', 'server.js');
|
|
28
|
+
// Check if webui is built
|
|
29
|
+
if (!existsSync(webuiPath)) {
|
|
30
|
+
console.log(chalk.yellow('\n Web UI not built. Building now...\n'));
|
|
31
|
+
// Try to build it
|
|
32
|
+
const { execSync } = await import('child_process');
|
|
33
|
+
try {
|
|
34
|
+
execSync('npm run build', {
|
|
35
|
+
cwd: join(__dirname, '..', '..', 'webui'),
|
|
36
|
+
stdio: 'inherit'
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
catch {
|
|
40
|
+
console.log(chalk.red('\n Failed to build Web UI.'));
|
|
41
|
+
console.log(chalk.dim(' Try running: cd apps/webui && npm install && npm run build\n'));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
const { startServer } = await import(webuiPath);
|
|
46
|
+
await startServer({ port, host });
|
|
47
|
+
}
|
|
48
|
+
catch (error) {
|
|
49
|
+
// Log the actual error for debugging
|
|
50
|
+
console.log(chalk.dim(`\n WebUI server load failed: ${error instanceof Error ? error.message : error}`));
|
|
51
|
+
console.log(chalk.dim(' Using built-in server...\n'));
|
|
52
|
+
try {
|
|
53
|
+
await startInlineServer(port, host);
|
|
54
|
+
}
|
|
55
|
+
catch (inlineError) {
|
|
56
|
+
console.error(chalk.red(`\n Error: ${inlineError instanceof Error ? inlineError.message : inlineError}\n`));
|
|
57
|
+
process.exit(1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
async function startInlineServer(port, host) {
|
|
62
|
+
const http = await import('http');
|
|
63
|
+
const path = await import('path');
|
|
64
|
+
const fs = await import('fs');
|
|
65
|
+
const url = await import('url');
|
|
66
|
+
const { SQLiteStorage, LanceDBStorage, MemoryRetriever, createEmbedFunction, isModelAvailable } = await import('@memextend/core');
|
|
67
|
+
const VECTORS_PATH = join(MEMEXTEND_DIR, 'vectors');
|
|
68
|
+
const MODELS_PATH = join(MEMEXTEND_DIR, 'models');
|
|
69
|
+
// Simple inline HTML for the web UI
|
|
70
|
+
const inlineHtml = `<!DOCTYPE html>
|
|
71
|
+
<html lang="en">
|
|
72
|
+
<head>
|
|
73
|
+
<meta charset="UTF-8">
|
|
74
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
75
|
+
<title>memextend - Web UI</title>
|
|
76
|
+
<style>
|
|
77
|
+
:root { --bg: #0d1117; --card: #161b22; --border: #30363d; --text: #c9d1d9; --dim: #8b949e; --blue: #58a6ff; }
|
|
78
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
79
|
+
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: var(--bg); color: var(--text); padding: 2rem; }
|
|
80
|
+
h1 { margin-bottom: 1rem; }
|
|
81
|
+
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
|
|
82
|
+
.stat { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; }
|
|
83
|
+
.stat-value { font-size: 2rem; font-weight: bold; color: var(--blue); }
|
|
84
|
+
.stat-label { color: var(--dim); font-size: 0.875rem; }
|
|
85
|
+
.memories { background: var(--card); border: 1px solid var(--border); border-radius: 6px; padding: 1.5rem; }
|
|
86
|
+
.memory { padding: 1rem; background: var(--bg); border-radius: 6px; margin-bottom: 0.5rem; }
|
|
87
|
+
.memory-meta { font-size: 0.75rem; color: var(--dim); }
|
|
88
|
+
.memory-content { margin-top: 0.5rem; font-size: 0.875rem; }
|
|
89
|
+
.search-box { display: flex; gap: 0.5rem; margin-bottom: 1rem; }
|
|
90
|
+
.search-box input { flex: 1; padding: 0.75rem; background: var(--bg); border: 1px solid var(--border); color: var(--text); border-radius: 6px; }
|
|
91
|
+
.search-box button { padding: 0.75rem 1.5rem; background: var(--blue); border: none; color: white; border-radius: 6px; cursor: pointer; }
|
|
92
|
+
</style>
|
|
93
|
+
</head>
|
|
94
|
+
<body>
|
|
95
|
+
<h1>memextend Web UI</h1>
|
|
96
|
+
<div class="stats" id="stats"></div>
|
|
97
|
+
<div class="memories">
|
|
98
|
+
<div class="search-box">
|
|
99
|
+
<input type="text" id="search" placeholder="Search memories...">
|
|
100
|
+
<button onclick="search()">Search</button>
|
|
101
|
+
</div>
|
|
102
|
+
<div id="memories"></div>
|
|
103
|
+
</div>
|
|
104
|
+
<script>
|
|
105
|
+
async function loadStats() {
|
|
106
|
+
const res = await fetch('/api/stats');
|
|
107
|
+
const data = await res.json();
|
|
108
|
+
document.getElementById('stats').innerHTML = \`
|
|
109
|
+
<div class="stat"><div class="stat-value">\${data.overview.totalMemories}</div><div class="stat-label">Memories</div></div>
|
|
110
|
+
<div class="stat"><div class="stat-value">\${data.overview.totalVectors}</div><div class="stat-label">Vectors</div></div>
|
|
111
|
+
<div class="stat"><div class="stat-value">\${data.overview.totalProjects}</div><div class="stat-label">Projects</div></div>
|
|
112
|
+
<div class="stat"><div class="stat-value">\${data.storage.total.sizeFormatted}</div><div class="stat-label">Storage</div></div>
|
|
113
|
+
\`;
|
|
114
|
+
}
|
|
115
|
+
async function loadMemories() {
|
|
116
|
+
const res = await fetch('/api/memories?limit=20');
|
|
117
|
+
const data = await res.json();
|
|
118
|
+
document.getElementById('memories').innerHTML = data.memories.map(m => \`
|
|
119
|
+
<div class="memory">
|
|
120
|
+
<div class="memory-meta">\${m.type} | \${new Date(m.createdAt).toLocaleDateString()}</div>
|
|
121
|
+
<div class="memory-content">\${m.content.slice(0, 200)}\${m.content.length > 200 ? '...' : ''}</div>
|
|
122
|
+
</div>
|
|
123
|
+
\`).join('');
|
|
124
|
+
}
|
|
125
|
+
async function search() {
|
|
126
|
+
const q = document.getElementById('search').value;
|
|
127
|
+
if (!q) return loadMemories();
|
|
128
|
+
const res = await fetch('/api/search?q=' + encodeURIComponent(q));
|
|
129
|
+
const data = await res.json();
|
|
130
|
+
document.getElementById('memories').innerHTML = data.results.map(r => \`
|
|
131
|
+
<div class="memory">
|
|
132
|
+
<div class="memory-meta">Score: \${r.score.toFixed(3)} | \${r.item.type}</div>
|
|
133
|
+
<div class="memory-content">\${r.item.content.slice(0, 200)}\${r.item.content.length > 200 ? '...' : ''}</div>
|
|
134
|
+
</div>
|
|
135
|
+
\`).join('');
|
|
136
|
+
}
|
|
137
|
+
loadStats();
|
|
138
|
+
loadMemories();
|
|
139
|
+
</script>
|
|
140
|
+
</body>
|
|
141
|
+
</html>`;
|
|
142
|
+
const server = http.createServer(async (req, res) => {
|
|
143
|
+
const parsedUrl = url.parse(req.url || '', true);
|
|
144
|
+
const pathname = parsedUrl.pathname || '/';
|
|
145
|
+
// CORS headers
|
|
146
|
+
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
147
|
+
res.setHeader('Access-Control-Allow-Methods', 'GET, POST, PUT, DELETE, OPTIONS');
|
|
148
|
+
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
149
|
+
if (req.method === 'OPTIONS') {
|
|
150
|
+
res.writeHead(200);
|
|
151
|
+
res.end();
|
|
152
|
+
return;
|
|
153
|
+
}
|
|
154
|
+
try {
|
|
155
|
+
// API routes
|
|
156
|
+
if (pathname.startsWith('/api/')) {
|
|
157
|
+
res.setHeader('Content-Type', 'application/json');
|
|
158
|
+
const sqlite = new SQLiteStorage(DB_PATH);
|
|
159
|
+
if (pathname === '/api/stats') {
|
|
160
|
+
const memoryCount = sqlite.getMemoryCount();
|
|
161
|
+
const memories = sqlite.getAllMemories(undefined, 10000);
|
|
162
|
+
const globalProfiles = sqlite.getGlobalProfiles(100);
|
|
163
|
+
const lancedb = await LanceDBStorage.create(VECTORS_PATH);
|
|
164
|
+
const vectorCount = await lancedb.getVectorCount();
|
|
165
|
+
await lancedb.close();
|
|
166
|
+
const typeBreakdown = {};
|
|
167
|
+
const sourceBreakdown = {};
|
|
168
|
+
const projectBreakdown = {};
|
|
169
|
+
const dateDistribution = {};
|
|
170
|
+
const now = new Date();
|
|
171
|
+
for (let i = 0; i < 30; i++) {
|
|
172
|
+
const date = new Date(now);
|
|
173
|
+
date.setDate(date.getDate() - i);
|
|
174
|
+
dateDistribution[date.toISOString().split('T')[0]] = 0;
|
|
175
|
+
}
|
|
176
|
+
for (const m of memories) {
|
|
177
|
+
typeBreakdown[m.type] = (typeBreakdown[m.type] || 0) + 1;
|
|
178
|
+
const source = m.sourceTool || 'manual';
|
|
179
|
+
sourceBreakdown[source] = (sourceBreakdown[source] || 0) + 1;
|
|
180
|
+
const proj = m.projectId || 'global';
|
|
181
|
+
projectBreakdown[proj] = (projectBreakdown[proj] || 0) + 1;
|
|
182
|
+
const dateStr = m.createdAt.split('T')[0];
|
|
183
|
+
if (dateDistribution[dateStr] !== undefined)
|
|
184
|
+
dateDistribution[dateStr]++;
|
|
185
|
+
}
|
|
186
|
+
const dbSize = fs.existsSync(DB_PATH) ? fs.statSync(DB_PATH).size : 0;
|
|
187
|
+
const formatBytes = (b) => {
|
|
188
|
+
if (b === 0)
|
|
189
|
+
return '0 B';
|
|
190
|
+
const k = 1024;
|
|
191
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
192
|
+
const i = Math.floor(Math.log(b) / Math.log(k));
|
|
193
|
+
return parseFloat((b / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];
|
|
194
|
+
};
|
|
195
|
+
sqlite.close();
|
|
196
|
+
res.writeHead(200);
|
|
197
|
+
res.end(JSON.stringify({
|
|
198
|
+
overview: {
|
|
199
|
+
totalMemories: memoryCount,
|
|
200
|
+
totalVectors: vectorCount,
|
|
201
|
+
globalProfiles: globalProfiles.length,
|
|
202
|
+
totalProjects: Object.keys(projectBreakdown).filter(k => k !== 'global').length
|
|
203
|
+
},
|
|
204
|
+
storage: {
|
|
205
|
+
database: { size: dbSize, sizeFormatted: formatBytes(dbSize) },
|
|
206
|
+
vectors: { size: 0, sizeFormatted: '0 B' },
|
|
207
|
+
models: { size: 0, sizeFormatted: '0 B' },
|
|
208
|
+
total: { size: dbSize, sizeFormatted: formatBytes(dbSize) }
|
|
209
|
+
},
|
|
210
|
+
embedding: { modelAvailable: isModelAvailable(MODELS_PATH), modelName: 'nomic-embed-text-v1.5' },
|
|
211
|
+
breakdowns: { byType: typeBreakdown, bySource: sourceBreakdown, byProject: projectBreakdown },
|
|
212
|
+
activity: { last7Days: 0, dateDistribution },
|
|
213
|
+
recentMemories: memories.slice(0, 5).map(m => ({
|
|
214
|
+
id: m.id,
|
|
215
|
+
preview: m.content.split('\n')[0].slice(0, 80),
|
|
216
|
+
type: m.type,
|
|
217
|
+
createdAt: m.createdAt
|
|
218
|
+
}))
|
|
219
|
+
}));
|
|
220
|
+
return;
|
|
221
|
+
}
|
|
222
|
+
if (pathname === '/api/memories') {
|
|
223
|
+
const limit = parseInt(parsedUrl.query.limit || '50', 10);
|
|
224
|
+
const offset = parseInt(parsedUrl.query.offset || '0', 10);
|
|
225
|
+
const projectId = parsedUrl.query.projectId;
|
|
226
|
+
const memories = sqlite.getAllMemories(projectId, limit + offset).slice(offset, offset + limit);
|
|
227
|
+
const total = sqlite.getMemoryCount();
|
|
228
|
+
sqlite.close();
|
|
229
|
+
res.writeHead(200);
|
|
230
|
+
res.end(JSON.stringify({
|
|
231
|
+
memories,
|
|
232
|
+
pagination: { limit, offset, total, hasMore: offset + limit < total }
|
|
233
|
+
}));
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
if (pathname === '/api/search') {
|
|
237
|
+
const query = parsedUrl.query.q;
|
|
238
|
+
if (!query) {
|
|
239
|
+
res.writeHead(400);
|
|
240
|
+
res.end(JSON.stringify({ error: 'Query required' }));
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
243
|
+
const lancedb = await LanceDBStorage.create(VECTORS_PATH);
|
|
244
|
+
const embedder = await createEmbedFunction(MODELS_PATH);
|
|
245
|
+
const retriever = new MemoryRetriever(sqlite, lancedb, embedder.embedQuery);
|
|
246
|
+
const results = await retriever.hybridSearch(query, { limit: 20 });
|
|
247
|
+
sqlite.close();
|
|
248
|
+
await lancedb.close();
|
|
249
|
+
await embedder.close();
|
|
250
|
+
res.writeHead(200);
|
|
251
|
+
res.end(JSON.stringify({
|
|
252
|
+
results: results.map(r => ({
|
|
253
|
+
type: 'memory',
|
|
254
|
+
item: r.memory,
|
|
255
|
+
score: r.score,
|
|
256
|
+
source: r.source
|
|
257
|
+
})),
|
|
258
|
+
query,
|
|
259
|
+
total: results.length,
|
|
260
|
+
usingRealEmbeddings: embedder.isReal
|
|
261
|
+
}));
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
if (pathname === '/api/projects') {
|
|
265
|
+
const memories = sqlite.getAllMemories(undefined, 10000);
|
|
266
|
+
const projectCounts = {};
|
|
267
|
+
for (const m of memories) {
|
|
268
|
+
if (m.projectId) {
|
|
269
|
+
projectCounts[m.projectId] = (projectCounts[m.projectId] || 0) + 1;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
const projects = Object.entries(projectCounts).map(([id, count]) => {
|
|
273
|
+
const project = sqlite.getProject(id);
|
|
274
|
+
return {
|
|
275
|
+
id,
|
|
276
|
+
name: project?.name || 'Unknown',
|
|
277
|
+
path: project?.path || 'Unknown',
|
|
278
|
+
memoryCount: count
|
|
279
|
+
};
|
|
280
|
+
});
|
|
281
|
+
sqlite.close();
|
|
282
|
+
res.writeHead(200);
|
|
283
|
+
res.end(JSON.stringify({ projects }));
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
if (pathname === '/api/stats/global') {
|
|
287
|
+
const profiles = sqlite.getGlobalProfiles(50);
|
|
288
|
+
sqlite.close();
|
|
289
|
+
res.writeHead(200);
|
|
290
|
+
res.end(JSON.stringify({ profiles }));
|
|
291
|
+
return;
|
|
292
|
+
}
|
|
293
|
+
sqlite.close();
|
|
294
|
+
res.writeHead(404);
|
|
295
|
+
res.end(JSON.stringify({ error: 'Not found' }));
|
|
296
|
+
return;
|
|
297
|
+
}
|
|
298
|
+
// Serve inline HTML
|
|
299
|
+
res.setHeader('Content-Type', 'text/html');
|
|
300
|
+
res.writeHead(200);
|
|
301
|
+
res.end(inlineHtml);
|
|
302
|
+
}
|
|
303
|
+
catch (error) {
|
|
304
|
+
res.writeHead(500);
|
|
305
|
+
res.end(JSON.stringify({ error: error instanceof Error ? error.message : 'Server error' }));
|
|
306
|
+
}
|
|
307
|
+
});
|
|
308
|
+
server.listen(port, host, () => {
|
|
309
|
+
console.log(chalk.bold('\n memextend Web UI\n'));
|
|
310
|
+
console.log(` Server running at ${chalk.blue(`http://${host}:${port}`)}`);
|
|
311
|
+
console.log(chalk.dim(' Press Ctrl+C to stop\n'));
|
|
312
|
+
});
|
|
313
|
+
}
|
|
314
|
+
//# sourceMappingURL=webui.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webui.js","sourceRoot":"","sources":["../../src/commands/webui.ts"],"names":[],"mappings":"AAAA,iCAAiC;AACjC,8CAA8C;AAE9C,OAAO,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,IAAI,CAAC;AAC7B,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAClD,MAAM,SAAS,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAEtC,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,YAAY,CAAC,CAAC;AACpD,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,EAAE,cAAc,CAAC,CAAC;AAOpD,MAAM,CAAC,KAAK,UAAU,YAAY,CAAC,OAAqB;IACtD,oCAAoC;IACpC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;QACzB,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,MAAM,CAAC,uEAAuE,CAAC,CAAC,CAAC;QACnG,OAAO;IACT,CAAC;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,IAAI,IAAI,MAAM,EAAE,EAAE,CAAC,CAAC;IAClD,MAAM,IAA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AC;QAEtB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,GAAG,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;YACnB,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAC9F,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE;QAC7B,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,CAAC,CAAC;QAClD,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,CAAC,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,EAAE,CAAC,EAAE,CAAC,CAAC;QAC3E,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,0BAA0B,CAAC,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
// memextend CLI
|
|
3
|
+
// Copyright (c) 2026 ZodTTD LLC. MIT License.
|
|
4
|
+
import { Command } from 'commander';
|
|
5
|
+
import { initCommand } from './commands/init.js';
|
|
6
|
+
import { statusCommand } from './commands/status.js';
|
|
7
|
+
import { searchCommand } from './commands/search.js';
|
|
8
|
+
import { forgetCommand } from './commands/forget.js';
|
|
9
|
+
import { editCommand } from './commands/edit.js';
|
|
10
|
+
import { helpCommand } from './commands/help.js';
|
|
11
|
+
import { exportCommand } from './commands/export.js';
|
|
12
|
+
import { importCommand } from './commands/import.js';
|
|
13
|
+
import { webuiCommand } from './commands/webui.js';
|
|
14
|
+
import { uninstallCommand } from './commands/uninstall.js';
|
|
15
|
+
import { saveCommand } from './commands/save.js';
|
|
16
|
+
const program = new Command();
|
|
17
|
+
program
|
|
18
|
+
.name('memextend')
|
|
19
|
+
.description('Extend your AI coding assistant\'s memory. Free, local, private.')
|
|
20
|
+
.version('0.1.0');
|
|
21
|
+
program
|
|
22
|
+
.command('init')
|
|
23
|
+
.description('Initialize memextend for your system')
|
|
24
|
+
.option('--manual', 'Print manual configuration instructions')
|
|
25
|
+
.action(initCommand);
|
|
26
|
+
program
|
|
27
|
+
.command('status')
|
|
28
|
+
.description('Show memextend status and statistics')
|
|
29
|
+
.option('-p, --project', 'Show stats for current project only')
|
|
30
|
+
.option('--check-embeddings', 'Run embedding model diagnostics')
|
|
31
|
+
.action(statusCommand);
|
|
32
|
+
program
|
|
33
|
+
.command('search <query>')
|
|
34
|
+
.description('Search memories')
|
|
35
|
+
.option('-p, --project', 'Search current project only')
|
|
36
|
+
.option('-g, --global', 'Search global profile only')
|
|
37
|
+
.option('-l, --limit <number>', 'Maximum results', '10')
|
|
38
|
+
.action(searchCommand);
|
|
39
|
+
program
|
|
40
|
+
.command('save')
|
|
41
|
+
.description('Save a new memory')
|
|
42
|
+
.option('-g, --global', 'Save as global memory (available in all projects)')
|
|
43
|
+
.option('-p, --project <id>', 'Save to specific project')
|
|
44
|
+
.option('-m, --message <content>', 'Memory content (or enter interactively)')
|
|
45
|
+
.action(saveCommand);
|
|
46
|
+
program
|
|
47
|
+
.command('forget [memoryId]')
|
|
48
|
+
.description('Delete a memory by ID, or use options for bulk delete')
|
|
49
|
+
.option('-a, --all', 'Delete ALL memories (use with caution)')
|
|
50
|
+
.option('-p, --project', 'Only affect current project')
|
|
51
|
+
.option('--before <date>', 'Delete memories before date (YYYY-MM-DD)')
|
|
52
|
+
.option('--delete-project <name>', 'Delete all memories in a project')
|
|
53
|
+
.option('--clear-global', 'Clear all global profile entries')
|
|
54
|
+
.action(forgetCommand);
|
|
55
|
+
program
|
|
56
|
+
.command('edit <memoryId>')
|
|
57
|
+
.description('Edit a memory\'s content')
|
|
58
|
+
.action(editCommand);
|
|
59
|
+
program
|
|
60
|
+
.command('list')
|
|
61
|
+
.description('List recent memories')
|
|
62
|
+
.option('-p, --project', 'List current project only')
|
|
63
|
+
.option('-l, --limit <number>', 'Maximum results', '20')
|
|
64
|
+
.action(async (options) => {
|
|
65
|
+
const { listCommand } = await import('./commands/list.js');
|
|
66
|
+
await listCommand(options);
|
|
67
|
+
});
|
|
68
|
+
program
|
|
69
|
+
.command('export')
|
|
70
|
+
.description('Export memories to a JSON file')
|
|
71
|
+
.option('-o, --output <path>', 'Output directory (default: current directory)')
|
|
72
|
+
.option('-p, --project', 'Export current project only')
|
|
73
|
+
.action(exportCommand);
|
|
74
|
+
program
|
|
75
|
+
.command('import <file>')
|
|
76
|
+
.description('Import memories from a JSON file')
|
|
77
|
+
.option('-m, --merge', 'Skip duplicates instead of overwriting')
|
|
78
|
+
.option('--validate-only', 'Validate file without importing')
|
|
79
|
+
.action(importCommand);
|
|
80
|
+
program
|
|
81
|
+
.command('webui')
|
|
82
|
+
.description('Start the web UI for browsing and editing memories')
|
|
83
|
+
.option('-p, --port <number>', 'Port number (default: 3333)', '3333')
|
|
84
|
+
.option('-H, --host <host>', 'Host to bind to (default: localhost)', 'localhost')
|
|
85
|
+
.action(webuiCommand);
|
|
86
|
+
program
|
|
87
|
+
.command('uninstall')
|
|
88
|
+
.description('Uninstall memextend and remove all integrations')
|
|
89
|
+
.option('-f, --force', 'Skip confirmation prompt')
|
|
90
|
+
.option('-k, --keep-data', 'Keep memories and data, only remove integrations')
|
|
91
|
+
.action(uninstallCommand);
|
|
92
|
+
program
|
|
93
|
+
.command('help [topic]')
|
|
94
|
+
.description('Show detailed help (topics: status, search, forget, edit, export, import, webui, uninstall)')
|
|
95
|
+
.action(helpCommand);
|
|
96
|
+
program.parse();
|
|
97
|
+
//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extend",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Extend your AI coding assistant's memory. Free, local, private.",
|
|
5
|
+
"author": "ZodTTD LLC <repo@zodttd.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"bin": {
|
|
9
|
+
"memextend": "dist/index.js"
|
|
10
|
+
},
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "tsc",
|
|
13
|
+
"test": "vitest run"
|
|
14
|
+
},
|
|
15
|
+
"dependencies": {
|
|
16
|
+
"@memextend/core": "^0.1.0",
|
|
17
|
+
"@memextend/claude-code": "^0.1.0",
|
|
18
|
+
"@memextend/webui": "^0.1.0",
|
|
19
|
+
"commander": "^12.0.0",
|
|
20
|
+
"ora": "^8.0.0",
|
|
21
|
+
"chalk": "^5.3.0"
|
|
22
|
+
},
|
|
23
|
+
"repository": {
|
|
24
|
+
"type": "git",
|
|
25
|
+
"url": "https://github.com/zodttd/memextend.git",
|
|
26
|
+
"directory": "apps/cli"
|
|
27
|
+
},
|
|
28
|
+
"bugs": {
|
|
29
|
+
"url": "https://github.com/zodttd/memextend/issues"
|
|
30
|
+
},
|
|
31
|
+
"homepage": "https://github.com/zodttd/memextend#readme",
|
|
32
|
+
"keywords": [
|
|
33
|
+
"memextend",
|
|
34
|
+
"ai-memory",
|
|
35
|
+
"claude",
|
|
36
|
+
"claude-code",
|
|
37
|
+
"anthropic",
|
|
38
|
+
"llm",
|
|
39
|
+
"coding-assistant",
|
|
40
|
+
"persistent-memory",
|
|
41
|
+
"vector-search",
|
|
42
|
+
"local-ai"
|
|
43
|
+
],
|
|
44
|
+
"files": [
|
|
45
|
+
"dist",
|
|
46
|
+
"README.md"
|
|
47
|
+
],
|
|
48
|
+
"engines": {
|
|
49
|
+
"node": ">=18.0.0"
|
|
50
|
+
}
|
|
51
|
+
}
|