@memrosetta/cli 0.3.2 → 0.4.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/chunk-356QK7TK.js +533 -0
- package/dist/chunk-3LSITXZ4.js +69 -0
- package/dist/chunk-6IOTBMUB.js +570 -0
- package/dist/chunk-BGXZ3MDD.js +341 -0
- package/dist/chunk-EZVP3OY7.js +52 -0
- package/dist/chunk-FCHV2JMZ.js +347 -0
- package/dist/{chunk-F7ZMZ6HN.js → chunk-HXZ7MAT6.js} +2 -1
- package/dist/chunk-IM6H35RB.js +341 -0
- package/dist/chunk-JGE6RXXH.js +48 -0
- package/dist/chunk-JPBSMZ26.js +343 -0
- package/dist/chunk-KSKRPUZZ.js +43 -0
- package/dist/chunk-L6S3TXHR.js +326 -0
- package/dist/{chunk-326TFH4F.js → chunk-OCCU5YEG.js} +11 -42
- package/dist/chunk-PW52BB6L.js +61 -0
- package/dist/chunk-RABFL4EN.js +528 -0
- package/dist/chunk-RDUU53MG.js +343 -0
- package/dist/chunk-RYPYJJ2K.js +70 -0
- package/dist/{chunk-CATBN3ZT.js → chunk-TQOH7ZXN.js} +6 -18
- package/dist/chunk-Y6NH6K27.js +209 -0
- package/dist/{clear-MTL4CQM3.js → clear-4RQW6SYW.js} +10 -5
- package/dist/clear-BYRCL5ZN.js +39 -0
- package/dist/clear-ETQ7XFMV.js +39 -0
- package/dist/clear-P6H55OKZ.js +39 -0
- package/dist/clear-T3TWJQKL.js +39 -0
- package/dist/{compress-Z46R4N4M.js → compress-HDNYPXZ3.js} +10 -5
- package/dist/compress-S6MS4QW7.js +33 -0
- package/dist/compress-TVWXLW3L.js +33 -0
- package/dist/compress-VLYNZ5BQ.js +33 -0
- package/dist/compress-ZXWRRGHT.js +33 -0
- package/dist/{count-4TZ3C524.js → count-26AGY5XL.js} +10 -5
- package/dist/count-AVG5ZIRW.js +24 -0
- package/dist/count-CJIYYJKN.js +24 -0
- package/dist/count-KFFD4ML7.js +24 -0
- package/dist/count-UUAD3GEJ.js +24 -0
- package/dist/{get-B6AL75EW.js → get-75MGS4LN.js} +4 -2
- package/dist/ingest-A3BAI2C4.js +95 -0
- package/dist/ingest-E7QDD5NY.js +95 -0
- package/dist/ingest-IGI7RXR4.js +95 -0
- package/dist/ingest-JPIHSH7W.js +95 -0
- package/dist/ingest-QGXA4Y6C.js +95 -0
- package/dist/init-2PRW64KV.js +146 -0
- package/dist/init-C3CONL23.js +146 -0
- package/dist/init-DAKOWQSW.js +169 -0
- package/dist/init-FYPMJDRN.js +146 -0
- package/dist/{init-C335O4TX.js → init-GCT4XEI6.js} +2 -2
- package/dist/init-HBEIXY3N.js +146 -0
- package/dist/init-MISGIVCC.js +146 -0
- package/dist/init-MNM4TXXJ.js +146 -0
- package/dist/{init-YAGOXYWG.js → init-OQW3KXTR.js} +2 -2
- package/dist/init-SIEKAILM.js +113 -0
- package/dist/init-TM7GTHTJ.js +146 -0
- package/dist/init-VYWOSISP.js +146 -0
- package/dist/init-WCL7FZOJ.js +182 -0
- package/dist/init-ZLUDTJAP.js +182 -0
- package/dist/{invalidate-C54IVIGL.js → invalidate-D2O4VWZU.js} +4 -2
- package/dist/{maintain-ZPHG47YY.js → maintain-B65WIMGJ.js} +10 -5
- package/dist/maintain-EWOU3DGT.js +37 -0
- package/dist/maintain-FELKLG7O.js +37 -0
- package/dist/maintain-WRRDXEG3.js +37 -0
- package/dist/maintain-XTCSOQBU.js +37 -0
- package/dist/{relate-R6DQUJCQ.js → relate-2QMG5H2I.js} +5 -3
- package/dist/relate-C22YYJZT.js +46 -0
- package/dist/relate-V5RYMJJ5.js +47 -0
- package/dist/relate-W4BXPFJA.js +46 -0
- package/dist/reset-45EUG44R.js +95 -0
- package/dist/reset-5NDHFUC3.js +95 -0
- package/dist/reset-C7I3LA5M.js +95 -0
- package/dist/reset-F6F2R6BR.js +95 -0
- package/dist/reset-K3K4K5CT.js +95 -0
- package/dist/reset-K4WZJ4WU.js +95 -0
- package/dist/{reset-P63V46RN.js → reset-NNQQJN6L.js} +2 -2
- package/dist/{reset-GPV46GSD.js → reset-P5FXLI4E.js} +2 -2
- package/dist/reset-SORHIEKY.js +112 -0
- package/dist/reset-SVJMWYAK.js +95 -0
- package/dist/reset-W22RJGYZ.js +112 -0
- package/dist/reset-W3QVA632.js +95 -0
- package/dist/reset-WYEU6XJQ.js +112 -0
- package/dist/{search-YEYKOEXC.js → search-2SU5WQYK.js} +9 -4
- package/dist/search-5EE3XB2R.js +48 -0
- package/dist/search-L6P3XY47.js +48 -0
- package/dist/search-UA7Y55LQ.js +48 -0
- package/dist/search-ZKLRJXFT.js +48 -0
- package/dist/{status-PYD6U7U7.js → status-3XVXJF7M.js} +1 -42
- package/dist/status-4THJLSJL.js +131 -0
- package/dist/status-4UYY7TOE.js +131 -0
- package/dist/status-7G3RMR6A.js +139 -0
- package/dist/status-7M4TJVDH.js +170 -0
- package/dist/status-7MEEKEC2.js +131 -0
- package/dist/status-BQL4VJ6Y.js +149 -0
- package/dist/status-BTEVCZ5K.js +125 -0
- package/dist/status-F3NZGGPH.js +131 -0
- package/dist/status-GQMXOMRN.js +131 -0
- package/dist/status-HJGTMHTD.js +131 -0
- package/dist/{status-AMMF6QGI.js → status-IEKR6SSH.js} +35 -6
- package/dist/status-JJGVWESB.js +139 -0
- package/dist/status-LDVRVYZH.js +131 -0
- package/dist/{status-XNQRRFWF.js → status-TATIX3R6.js} +1 -1
- package/dist/{store-ZMERYHI6.js → store-6D5OJ2DX.js} +12 -7
- package/dist/store-I4JNJWAZ.js +91 -0
- package/dist/store-R4LXYE57.js +91 -0
- package/dist/store-UMR2NOT7.js +91 -0
- package/dist/store-ZDI5AH4M.js +91 -0
- package/dist/update-XJLMXCDZ.js +36 -0
- package/dist/{working-memory-2RRQFX4Q.js → working-memory-2U33JHJB.js} +10 -6
- package/dist/working-memory-35TMFU3P.js +53 -0
- package/dist/working-memory-IBWGIXLW.js +53 -0
- package/dist/working-memory-RZE3GYQZ.js +53 -0
- package/dist/working-memory-WGB5DZ3B.js +53 -0
- package/package.json +4 -4
- package/dist/chunk-MWLPPS7U.js +0 -133
- package/dist/ingest-ZOR3XSAE.js +0 -152
- package/dist/init-7VFBCA4O.js +0 -26
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import {
|
|
2
|
+
optionalOption,
|
|
3
|
+
requireOption
|
|
4
|
+
} from "./chunk-HXZ7MAT6.js";
|
|
5
|
+
import {
|
|
6
|
+
getEngine
|
|
7
|
+
} from "./chunk-2ZBEEETG.js";
|
|
8
|
+
import {
|
|
9
|
+
output,
|
|
10
|
+
outputError
|
|
11
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
12
|
+
|
|
13
|
+
// src/commands/relate.ts
|
|
14
|
+
var VALID_RELATION_TYPES = /* @__PURE__ */ new Set([
|
|
15
|
+
"updates",
|
|
16
|
+
"extends",
|
|
17
|
+
"derives",
|
|
18
|
+
"contradicts",
|
|
19
|
+
"supports"
|
|
20
|
+
]);
|
|
21
|
+
async function run(options) {
|
|
22
|
+
const { args, format, db, noEmbeddings } = options;
|
|
23
|
+
const src = requireOption(args, "--src", "source memory ID");
|
|
24
|
+
const dst = requireOption(args, "--dst", "destination memory ID");
|
|
25
|
+
const relationType = requireOption(args, "--type", "relation type");
|
|
26
|
+
const reason = optionalOption(args, "--reason");
|
|
27
|
+
if (!VALID_RELATION_TYPES.has(relationType)) {
|
|
28
|
+
outputError(
|
|
29
|
+
`Invalid relation type: ${relationType}. Must be one of: updates, extends, derives, contradicts, supports`,
|
|
30
|
+
format
|
|
31
|
+
);
|
|
32
|
+
process.exitCode = 1;
|
|
33
|
+
return;
|
|
34
|
+
}
|
|
35
|
+
const engine = await getEngine({ db, noEmbeddings });
|
|
36
|
+
const relation = await engine.relate(
|
|
37
|
+
src,
|
|
38
|
+
dst,
|
|
39
|
+
relationType,
|
|
40
|
+
reason
|
|
41
|
+
);
|
|
42
|
+
output(relation, format);
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
run
|
|
46
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeClaudeCodeHooks,
|
|
3
|
+
removeClaudeMdSection,
|
|
4
|
+
removeCursorMCP,
|
|
5
|
+
removeCursorRulesSection,
|
|
6
|
+
removeGenericMCP
|
|
7
|
+
} from "./chunk-RDUU53MG.js";
|
|
8
|
+
import {
|
|
9
|
+
hasFlag
|
|
10
|
+
} from "./chunk-HXZ7MAT6.js";
|
|
11
|
+
import {
|
|
12
|
+
output
|
|
13
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/reset.ts
|
|
16
|
+
async function run(options) {
|
|
17
|
+
const { args, format } = options;
|
|
18
|
+
const wantClaudeCode = hasFlag(args, "--claude-code");
|
|
19
|
+
const wantCursor = hasFlag(args, "--cursor");
|
|
20
|
+
const wantMCP = hasFlag(args, "--mcp");
|
|
21
|
+
const wantAll = hasFlag(args, "--all");
|
|
22
|
+
const noFlags = !wantClaudeCode && !wantCursor && !wantMCP && !wantAll;
|
|
23
|
+
if (noFlags) {
|
|
24
|
+
const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
|
|
25
|
+
if (format === "text") {
|
|
26
|
+
process.stdout.write(msg);
|
|
27
|
+
} else {
|
|
28
|
+
output({ error: "No flags specified. Use --claude-code, --cursor, --mcp, or --all." }, format);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = {
|
|
33
|
+
removed: {
|
|
34
|
+
claudeCodeHooks: false,
|
|
35
|
+
claudeMd: false,
|
|
36
|
+
mcp: false,
|
|
37
|
+
cursor: false,
|
|
38
|
+
cursorRules: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (wantClaudeCode || wantAll) {
|
|
42
|
+
const hooksRemoved = removeClaudeCodeHooks();
|
|
43
|
+
const mdRemoved = removeClaudeMdSection();
|
|
44
|
+
const mcpRemoved = removeGenericMCP();
|
|
45
|
+
result.removed.claudeCodeHooks = hooksRemoved;
|
|
46
|
+
result.removed.claudeMd = mdRemoved;
|
|
47
|
+
if (!wantMCP) {
|
|
48
|
+
result.removed.mcp = mcpRemoved;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (wantCursor || wantAll) {
|
|
52
|
+
const removed = removeCursorMCP();
|
|
53
|
+
result.removed.cursor = removed;
|
|
54
|
+
const rulesRemoved = removeCursorRulesSection();
|
|
55
|
+
result.removed.cursorRules = rulesRemoved;
|
|
56
|
+
}
|
|
57
|
+
if (wantMCP || wantAll) {
|
|
58
|
+
const removed = removeGenericMCP();
|
|
59
|
+
result.removed.mcp = removed;
|
|
60
|
+
}
|
|
61
|
+
if (format === "text") {
|
|
62
|
+
printTextOutput(result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
output(result, format);
|
|
66
|
+
}
|
|
67
|
+
function printTextOutput(result) {
|
|
68
|
+
const w = (s) => process.stdout.write(s);
|
|
69
|
+
const removed = result.removed;
|
|
70
|
+
if (removed.claudeCodeHooks) {
|
|
71
|
+
w("Removed Claude Code hooks from ~/.claude/settings.json\n");
|
|
72
|
+
}
|
|
73
|
+
if (removed.claudeMd) {
|
|
74
|
+
w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
|
|
75
|
+
}
|
|
76
|
+
if (removed.mcp) {
|
|
77
|
+
w("Removed MCP server from ~/.mcp.json\n");
|
|
78
|
+
}
|
|
79
|
+
if (removed.cursor) {
|
|
80
|
+
w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
|
|
81
|
+
}
|
|
82
|
+
if (removed.cursorRules) {
|
|
83
|
+
w("Removed MemRosetta section from ~/.cursorrules\n");
|
|
84
|
+
}
|
|
85
|
+
const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules;
|
|
86
|
+
if (!anyRemoved) {
|
|
87
|
+
w("Nothing to remove (no integrations were configured).\n");
|
|
88
|
+
}
|
|
89
|
+
w(
|
|
90
|
+
"\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
run
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeClaudeCodeHooks,
|
|
3
|
+
removeClaudeMdSection,
|
|
4
|
+
removeCursorMCP,
|
|
5
|
+
removeCursorRulesSection,
|
|
6
|
+
removeGenericMCP
|
|
7
|
+
} from "./chunk-BGXZ3MDD.js";
|
|
8
|
+
import {
|
|
9
|
+
hasFlag
|
|
10
|
+
} from "./chunk-PW52BB6L.js";
|
|
11
|
+
import {
|
|
12
|
+
output
|
|
13
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/reset.ts
|
|
16
|
+
async function run(options) {
|
|
17
|
+
const { args, format } = options;
|
|
18
|
+
const wantClaudeCode = hasFlag(args, "--claude-code");
|
|
19
|
+
const wantCursor = hasFlag(args, "--cursor");
|
|
20
|
+
const wantMCP = hasFlag(args, "--mcp");
|
|
21
|
+
const wantAll = hasFlag(args, "--all");
|
|
22
|
+
const noFlags = !wantClaudeCode && !wantCursor && !wantMCP && !wantAll;
|
|
23
|
+
if (noFlags) {
|
|
24
|
+
const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
|
|
25
|
+
if (format === "text") {
|
|
26
|
+
process.stdout.write(msg);
|
|
27
|
+
} else {
|
|
28
|
+
output({ error: "No flags specified. Use --claude-code, --cursor, --mcp, or --all." }, format);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = {
|
|
33
|
+
removed: {
|
|
34
|
+
claudeCodeHooks: false,
|
|
35
|
+
claudeMd: false,
|
|
36
|
+
mcp: false,
|
|
37
|
+
cursor: false,
|
|
38
|
+
cursorRules: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (wantClaudeCode || wantAll) {
|
|
42
|
+
const hooksRemoved = removeClaudeCodeHooks();
|
|
43
|
+
const mdRemoved = removeClaudeMdSection();
|
|
44
|
+
const mcpRemoved = removeGenericMCP();
|
|
45
|
+
result.removed.claudeCodeHooks = hooksRemoved;
|
|
46
|
+
result.removed.claudeMd = mdRemoved;
|
|
47
|
+
if (!wantMCP) {
|
|
48
|
+
result.removed.mcp = mcpRemoved;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (wantCursor || wantAll) {
|
|
52
|
+
const removed = removeCursorMCP();
|
|
53
|
+
result.removed.cursor = removed;
|
|
54
|
+
const rulesRemoved = removeCursorRulesSection();
|
|
55
|
+
result.removed.cursorRules = rulesRemoved;
|
|
56
|
+
}
|
|
57
|
+
if (wantMCP || wantAll) {
|
|
58
|
+
const removed = removeGenericMCP();
|
|
59
|
+
result.removed.mcp = removed;
|
|
60
|
+
}
|
|
61
|
+
if (format === "text") {
|
|
62
|
+
printTextOutput(result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
output(result, format);
|
|
66
|
+
}
|
|
67
|
+
function printTextOutput(result) {
|
|
68
|
+
const w = (s) => process.stdout.write(s);
|
|
69
|
+
const removed = result.removed;
|
|
70
|
+
if (removed.claudeCodeHooks) {
|
|
71
|
+
w("Removed Claude Code hooks from ~/.claude/settings.json\n");
|
|
72
|
+
}
|
|
73
|
+
if (removed.claudeMd) {
|
|
74
|
+
w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
|
|
75
|
+
}
|
|
76
|
+
if (removed.mcp) {
|
|
77
|
+
w("Removed MCP server from ~/.mcp.json\n");
|
|
78
|
+
}
|
|
79
|
+
if (removed.cursor) {
|
|
80
|
+
w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
|
|
81
|
+
}
|
|
82
|
+
if (removed.cursorRules) {
|
|
83
|
+
w("Removed MemRosetta section from ~/.cursorrules\n");
|
|
84
|
+
}
|
|
85
|
+
const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules;
|
|
86
|
+
if (!anyRemoved) {
|
|
87
|
+
w("Nothing to remove (no integrations were configured).\n");
|
|
88
|
+
}
|
|
89
|
+
w(
|
|
90
|
+
"\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
run
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeClaudeCodeHooks,
|
|
3
|
+
removeClaudeMdSection,
|
|
4
|
+
removeCursorMCP,
|
|
5
|
+
removeCursorRulesSection,
|
|
6
|
+
removeGenericMCP
|
|
7
|
+
} from "./chunk-IM6H35RB.js";
|
|
8
|
+
import {
|
|
9
|
+
hasFlag
|
|
10
|
+
} from "./chunk-PW52BB6L.js";
|
|
11
|
+
import {
|
|
12
|
+
output
|
|
13
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/reset.ts
|
|
16
|
+
async function run(options) {
|
|
17
|
+
const { args, format } = options;
|
|
18
|
+
const wantClaudeCode = hasFlag(args, "--claude-code");
|
|
19
|
+
const wantCursor = hasFlag(args, "--cursor");
|
|
20
|
+
const wantMCP = hasFlag(args, "--mcp");
|
|
21
|
+
const wantAll = hasFlag(args, "--all");
|
|
22
|
+
const noFlags = !wantClaudeCode && !wantCursor && !wantMCP && !wantAll;
|
|
23
|
+
if (noFlags) {
|
|
24
|
+
const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
|
|
25
|
+
if (format === "text") {
|
|
26
|
+
process.stdout.write(msg);
|
|
27
|
+
} else {
|
|
28
|
+
output({ error: "No flags specified. Use --claude-code, --cursor, --mcp, or --all." }, format);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = {
|
|
33
|
+
removed: {
|
|
34
|
+
claudeCodeHooks: false,
|
|
35
|
+
claudeMd: false,
|
|
36
|
+
mcp: false,
|
|
37
|
+
cursor: false,
|
|
38
|
+
cursorRules: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (wantClaudeCode || wantAll) {
|
|
42
|
+
const hooksRemoved = removeClaudeCodeHooks();
|
|
43
|
+
const mdRemoved = removeClaudeMdSection();
|
|
44
|
+
const mcpRemoved = removeGenericMCP();
|
|
45
|
+
result.removed.claudeCodeHooks = hooksRemoved;
|
|
46
|
+
result.removed.claudeMd = mdRemoved;
|
|
47
|
+
if (!wantMCP) {
|
|
48
|
+
result.removed.mcp = mcpRemoved;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (wantCursor || wantAll) {
|
|
52
|
+
const removed = removeCursorMCP();
|
|
53
|
+
result.removed.cursor = removed;
|
|
54
|
+
const rulesRemoved = removeCursorRulesSection();
|
|
55
|
+
result.removed.cursorRules = rulesRemoved;
|
|
56
|
+
}
|
|
57
|
+
if (wantMCP || wantAll) {
|
|
58
|
+
const removed = removeGenericMCP();
|
|
59
|
+
result.removed.mcp = removed;
|
|
60
|
+
}
|
|
61
|
+
if (format === "text") {
|
|
62
|
+
printTextOutput(result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
output(result, format);
|
|
66
|
+
}
|
|
67
|
+
function printTextOutput(result) {
|
|
68
|
+
const w = (s) => process.stdout.write(s);
|
|
69
|
+
const removed = result.removed;
|
|
70
|
+
if (removed.claudeCodeHooks) {
|
|
71
|
+
w("Removed Claude Code hooks from ~/.claude/settings.json\n");
|
|
72
|
+
}
|
|
73
|
+
if (removed.claudeMd) {
|
|
74
|
+
w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
|
|
75
|
+
}
|
|
76
|
+
if (removed.mcp) {
|
|
77
|
+
w("Removed MCP server from ~/.mcp.json\n");
|
|
78
|
+
}
|
|
79
|
+
if (removed.cursor) {
|
|
80
|
+
w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
|
|
81
|
+
}
|
|
82
|
+
if (removed.cursorRules) {
|
|
83
|
+
w("Removed MemRosetta section from ~/.cursorrules\n");
|
|
84
|
+
}
|
|
85
|
+
const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules;
|
|
86
|
+
if (!anyRemoved) {
|
|
87
|
+
w("Nothing to remove (no integrations were configured).\n");
|
|
88
|
+
}
|
|
89
|
+
w(
|
|
90
|
+
"\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
run
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeClaudeCodeHooks,
|
|
3
|
+
removeClaudeMdSection,
|
|
4
|
+
removeCursorMCP,
|
|
5
|
+
removeCursorRulesSection,
|
|
6
|
+
removeGenericMCP
|
|
7
|
+
} from "./chunk-FCHV2JMZ.js";
|
|
8
|
+
import {
|
|
9
|
+
hasFlag
|
|
10
|
+
} from "./chunk-HXZ7MAT6.js";
|
|
11
|
+
import {
|
|
12
|
+
output
|
|
13
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/reset.ts
|
|
16
|
+
async function run(options) {
|
|
17
|
+
const { args, format } = options;
|
|
18
|
+
const wantClaudeCode = hasFlag(args, "--claude-code");
|
|
19
|
+
const wantCursor = hasFlag(args, "--cursor");
|
|
20
|
+
const wantMCP = hasFlag(args, "--mcp");
|
|
21
|
+
const wantAll = hasFlag(args, "--all");
|
|
22
|
+
const noFlags = !wantClaudeCode && !wantCursor && !wantMCP && !wantAll;
|
|
23
|
+
if (noFlags) {
|
|
24
|
+
const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
|
|
25
|
+
if (format === "text") {
|
|
26
|
+
process.stdout.write(msg);
|
|
27
|
+
} else {
|
|
28
|
+
output({ error: "No flags specified. Use --claude-code, --cursor, --mcp, or --all." }, format);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = {
|
|
33
|
+
removed: {
|
|
34
|
+
claudeCodeHooks: false,
|
|
35
|
+
claudeMd: false,
|
|
36
|
+
mcp: false,
|
|
37
|
+
cursor: false,
|
|
38
|
+
cursorRules: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (wantClaudeCode || wantAll) {
|
|
42
|
+
const hooksRemoved = removeClaudeCodeHooks();
|
|
43
|
+
const mdRemoved = removeClaudeMdSection();
|
|
44
|
+
const mcpRemoved = removeGenericMCP();
|
|
45
|
+
result.removed.claudeCodeHooks = hooksRemoved;
|
|
46
|
+
result.removed.claudeMd = mdRemoved;
|
|
47
|
+
if (!wantMCP) {
|
|
48
|
+
result.removed.mcp = mcpRemoved;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (wantCursor || wantAll) {
|
|
52
|
+
const removed = removeCursorMCP();
|
|
53
|
+
result.removed.cursor = removed;
|
|
54
|
+
const rulesRemoved = removeCursorRulesSection();
|
|
55
|
+
result.removed.cursorRules = rulesRemoved;
|
|
56
|
+
}
|
|
57
|
+
if (wantMCP || wantAll) {
|
|
58
|
+
const removed = removeGenericMCP();
|
|
59
|
+
result.removed.mcp = removed;
|
|
60
|
+
}
|
|
61
|
+
if (format === "text") {
|
|
62
|
+
printTextOutput(result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
output(result, format);
|
|
66
|
+
}
|
|
67
|
+
function printTextOutput(result) {
|
|
68
|
+
const w = (s) => process.stdout.write(s);
|
|
69
|
+
const removed = result.removed;
|
|
70
|
+
if (removed.claudeCodeHooks) {
|
|
71
|
+
w("Removed Claude Code hooks from ~/.claude/settings.json\n");
|
|
72
|
+
}
|
|
73
|
+
if (removed.claudeMd) {
|
|
74
|
+
w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
|
|
75
|
+
}
|
|
76
|
+
if (removed.mcp) {
|
|
77
|
+
w("Removed MCP server from ~/.mcp.json\n");
|
|
78
|
+
}
|
|
79
|
+
if (removed.cursor) {
|
|
80
|
+
w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
|
|
81
|
+
}
|
|
82
|
+
if (removed.cursorRules) {
|
|
83
|
+
w("Removed MemRosetta section from ~/.cursorrules\n");
|
|
84
|
+
}
|
|
85
|
+
const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules;
|
|
86
|
+
if (!anyRemoved) {
|
|
87
|
+
w("Nothing to remove (no integrations were configured).\n");
|
|
88
|
+
}
|
|
89
|
+
w(
|
|
90
|
+
"\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
run
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeClaudeCodeHooks,
|
|
3
|
+
removeClaudeMdSection,
|
|
4
|
+
removeCursorMCP,
|
|
5
|
+
removeCursorRulesSection,
|
|
6
|
+
removeGenericMCP
|
|
7
|
+
} from "./chunk-IM6H35RB.js";
|
|
8
|
+
import {
|
|
9
|
+
hasFlag
|
|
10
|
+
} from "./chunk-TGGGIJC4.js";
|
|
11
|
+
import {
|
|
12
|
+
output
|
|
13
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/reset.ts
|
|
16
|
+
async function run(options) {
|
|
17
|
+
const { args, format } = options;
|
|
18
|
+
const wantClaudeCode = hasFlag(args, "--claude-code");
|
|
19
|
+
const wantCursor = hasFlag(args, "--cursor");
|
|
20
|
+
const wantMCP = hasFlag(args, "--mcp");
|
|
21
|
+
const wantAll = hasFlag(args, "--all");
|
|
22
|
+
const noFlags = !wantClaudeCode && !wantCursor && !wantMCP && !wantAll;
|
|
23
|
+
if (noFlags) {
|
|
24
|
+
const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
|
|
25
|
+
if (format === "text") {
|
|
26
|
+
process.stdout.write(msg);
|
|
27
|
+
} else {
|
|
28
|
+
output({ error: "No flags specified. Use --claude-code, --cursor, --mcp, or --all." }, format);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = {
|
|
33
|
+
removed: {
|
|
34
|
+
claudeCodeHooks: false,
|
|
35
|
+
claudeMd: false,
|
|
36
|
+
mcp: false,
|
|
37
|
+
cursor: false,
|
|
38
|
+
cursorRules: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (wantClaudeCode || wantAll) {
|
|
42
|
+
const hooksRemoved = removeClaudeCodeHooks();
|
|
43
|
+
const mdRemoved = removeClaudeMdSection();
|
|
44
|
+
const mcpRemoved = removeGenericMCP();
|
|
45
|
+
result.removed.claudeCodeHooks = hooksRemoved;
|
|
46
|
+
result.removed.claudeMd = mdRemoved;
|
|
47
|
+
if (!wantMCP) {
|
|
48
|
+
result.removed.mcp = mcpRemoved;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (wantCursor || wantAll) {
|
|
52
|
+
const removed = removeCursorMCP();
|
|
53
|
+
result.removed.cursor = removed;
|
|
54
|
+
const rulesRemoved = removeCursorRulesSection();
|
|
55
|
+
result.removed.cursorRules = rulesRemoved;
|
|
56
|
+
}
|
|
57
|
+
if (wantMCP || wantAll) {
|
|
58
|
+
const removed = removeGenericMCP();
|
|
59
|
+
result.removed.mcp = removed;
|
|
60
|
+
}
|
|
61
|
+
if (format === "text") {
|
|
62
|
+
printTextOutput(result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
output(result, format);
|
|
66
|
+
}
|
|
67
|
+
function printTextOutput(result) {
|
|
68
|
+
const w = (s) => process.stdout.write(s);
|
|
69
|
+
const removed = result.removed;
|
|
70
|
+
if (removed.claudeCodeHooks) {
|
|
71
|
+
w("Removed Claude Code hooks from ~/.claude/settings.json\n");
|
|
72
|
+
}
|
|
73
|
+
if (removed.claudeMd) {
|
|
74
|
+
w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
|
|
75
|
+
}
|
|
76
|
+
if (removed.mcp) {
|
|
77
|
+
w("Removed MCP server from ~/.mcp.json\n");
|
|
78
|
+
}
|
|
79
|
+
if (removed.cursor) {
|
|
80
|
+
w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
|
|
81
|
+
}
|
|
82
|
+
if (removed.cursorRules) {
|
|
83
|
+
w("Removed MemRosetta section from ~/.cursorrules\n");
|
|
84
|
+
}
|
|
85
|
+
const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules;
|
|
86
|
+
if (!anyRemoved) {
|
|
87
|
+
w("Nothing to remove (no integrations were configured).\n");
|
|
88
|
+
}
|
|
89
|
+
w(
|
|
90
|
+
"\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
run
|
|
95
|
+
};
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import {
|
|
2
|
+
removeClaudeCodeHooks,
|
|
3
|
+
removeClaudeMdSection,
|
|
4
|
+
removeCursorMCP,
|
|
5
|
+
removeCursorRulesSection,
|
|
6
|
+
removeGenericMCP
|
|
7
|
+
} from "./chunk-L6S3TXHR.js";
|
|
8
|
+
import {
|
|
9
|
+
hasFlag
|
|
10
|
+
} from "./chunk-HXZ7MAT6.js";
|
|
11
|
+
import {
|
|
12
|
+
output
|
|
13
|
+
} from "./chunk-ET6TNQOJ.js";
|
|
14
|
+
|
|
15
|
+
// src/commands/reset.ts
|
|
16
|
+
async function run(options) {
|
|
17
|
+
const { args, format } = options;
|
|
18
|
+
const wantClaudeCode = hasFlag(args, "--claude-code");
|
|
19
|
+
const wantCursor = hasFlag(args, "--cursor");
|
|
20
|
+
const wantMCP = hasFlag(args, "--mcp");
|
|
21
|
+
const wantAll = hasFlag(args, "--all");
|
|
22
|
+
const noFlags = !wantClaudeCode && !wantCursor && !wantMCP && !wantAll;
|
|
23
|
+
if (noFlags) {
|
|
24
|
+
const msg = "Usage: memrosetta reset [--claude-code] [--cursor] [--mcp] [--all]\n\nFlags:\n --claude-code Remove Claude Code hooks, MCP, and CLAUDE.md section\n --cursor Remove Cursor MCP configuration\n --mcp Remove generic MCP configuration (~/.mcp.json)\n --all Remove all integrations\n";
|
|
25
|
+
if (format === "text") {
|
|
26
|
+
process.stdout.write(msg);
|
|
27
|
+
} else {
|
|
28
|
+
output({ error: "No flags specified. Use --claude-code, --cursor, --mcp, or --all." }, format);
|
|
29
|
+
}
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const result = {
|
|
33
|
+
removed: {
|
|
34
|
+
claudeCodeHooks: false,
|
|
35
|
+
claudeMd: false,
|
|
36
|
+
mcp: false,
|
|
37
|
+
cursor: false,
|
|
38
|
+
cursorRules: false
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
if (wantClaudeCode || wantAll) {
|
|
42
|
+
const hooksRemoved = removeClaudeCodeHooks();
|
|
43
|
+
const mdRemoved = removeClaudeMdSection();
|
|
44
|
+
const mcpRemoved = removeGenericMCP();
|
|
45
|
+
result.removed.claudeCodeHooks = hooksRemoved;
|
|
46
|
+
result.removed.claudeMd = mdRemoved;
|
|
47
|
+
if (!wantMCP) {
|
|
48
|
+
result.removed.mcp = mcpRemoved;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
if (wantCursor || wantAll) {
|
|
52
|
+
const removed = removeCursorMCP();
|
|
53
|
+
result.removed.cursor = removed;
|
|
54
|
+
const rulesRemoved = removeCursorRulesSection();
|
|
55
|
+
result.removed.cursorRules = rulesRemoved;
|
|
56
|
+
}
|
|
57
|
+
if (wantMCP || wantAll) {
|
|
58
|
+
const removed = removeGenericMCP();
|
|
59
|
+
result.removed.mcp = removed;
|
|
60
|
+
}
|
|
61
|
+
if (format === "text") {
|
|
62
|
+
printTextOutput(result);
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
output(result, format);
|
|
66
|
+
}
|
|
67
|
+
function printTextOutput(result) {
|
|
68
|
+
const w = (s) => process.stdout.write(s);
|
|
69
|
+
const removed = result.removed;
|
|
70
|
+
if (removed.claudeCodeHooks) {
|
|
71
|
+
w("Removed Claude Code hooks from ~/.claude/settings.json\n");
|
|
72
|
+
}
|
|
73
|
+
if (removed.claudeMd) {
|
|
74
|
+
w("Removed MemRosetta section from ~/.claude/CLAUDE.md\n");
|
|
75
|
+
}
|
|
76
|
+
if (removed.mcp) {
|
|
77
|
+
w("Removed MCP server from ~/.mcp.json\n");
|
|
78
|
+
}
|
|
79
|
+
if (removed.cursor) {
|
|
80
|
+
w("Removed Cursor MCP from ~/.cursor/mcp.json\n");
|
|
81
|
+
}
|
|
82
|
+
if (removed.cursorRules) {
|
|
83
|
+
w("Removed MemRosetta section from ~/.cursorrules\n");
|
|
84
|
+
}
|
|
85
|
+
const anyRemoved = removed.claudeCodeHooks || removed.claudeMd || removed.mcp || removed.cursor || removed.cursorRules;
|
|
86
|
+
if (!anyRemoved) {
|
|
87
|
+
w("Nothing to remove (no integrations were configured).\n");
|
|
88
|
+
}
|
|
89
|
+
w(
|
|
90
|
+
"\nNote: ~/.memrosetta/ directory preserved. Delete manually if needed:\n rm -rf ~/.memrosetta\n"
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
export {
|
|
94
|
+
run
|
|
95
|
+
};
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
removeCursorMCP,
|
|
7
7
|
removeCursorRulesSection,
|
|
8
8
|
removeGenericMCP
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-TQOH7ZXN.js";
|
|
10
10
|
import {
|
|
11
11
|
hasFlag
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TGGGIJC4.js";
|
|
13
13
|
import {
|
|
14
14
|
output
|
|
15
15
|
} from "./chunk-ET6TNQOJ.js";
|
|
@@ -6,10 +6,10 @@ import {
|
|
|
6
6
|
removeCursorMCP,
|
|
7
7
|
removeCursorRulesSection,
|
|
8
8
|
removeGenericMCP
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-356QK7TK.js";
|
|
10
10
|
import {
|
|
11
11
|
hasFlag
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-TGGGIJC4.js";
|
|
13
13
|
import {
|
|
14
14
|
output
|
|
15
15
|
} from "./chunk-ET6TNQOJ.js";
|