memax-cli 0.1.0-alpha.2 → 0.1.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.vscode/mcp.json +8 -0
- package/dist/commands/login.d.ts.map +1 -1
- package/dist/commands/login.js +5 -2
- package/dist/commands/login.js.map +1 -1
- package/dist/commands/mcp.d.ts.map +1 -1
- package/dist/commands/mcp.js +59 -1
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/recall.d.ts.map +1 -1
- package/dist/commands/recall.js +2 -1
- package/dist/commands/recall.js.map +1 -1
- package/dist/commands/setup.d.ts +13 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +531 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/index.js +22 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/login.ts +5 -2
- package/src/commands/mcp.ts +76 -1
- package/src/commands/recall.ts +4 -1
- package/src/commands/setup.ts +682 -0
- package/src/index.ts +27 -2
package/src/index.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from "commander";
|
|
3
|
+
import { readFileSync } from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { join, dirname } from "node:path";
|
|
3
6
|
import { pushCommand } from "./commands/push.js";
|
|
4
7
|
import { recallCommand } from "./commands/recall.js";
|
|
5
8
|
import { listCommand } from "./commands/list.js";
|
|
@@ -19,13 +22,19 @@ import {
|
|
|
19
22
|
revokeKeyCommand,
|
|
20
23
|
} from "./commands/auth.js";
|
|
21
24
|
import { registerMcpCommand } from "./commands/mcp.js";
|
|
25
|
+
import { setupCommand, teardownCommand } from "./commands/setup.js";
|
|
26
|
+
|
|
27
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
28
|
+
const pkg = JSON.parse(
|
|
29
|
+
readFileSync(join(__dirname, "..", "package.json"), "utf-8"),
|
|
30
|
+
);
|
|
22
31
|
|
|
23
32
|
const program = new Command();
|
|
24
33
|
|
|
25
34
|
program
|
|
26
35
|
.name("memax")
|
|
27
36
|
.description("Universal context & memory hub for AI agents")
|
|
28
|
-
.version(
|
|
37
|
+
.version(pkg.version);
|
|
29
38
|
|
|
30
39
|
// --- Core commands ---
|
|
31
40
|
|
|
@@ -98,7 +107,23 @@ syncCmd
|
|
|
98
107
|
.description("Sync native AI agent memory files to Memax")
|
|
99
108
|
.action(syncAgentMemoryCommand);
|
|
100
109
|
|
|
101
|
-
// --- Agent
|
|
110
|
+
// --- Agent integration setup ---
|
|
111
|
+
|
|
112
|
+
program
|
|
113
|
+
.command("setup")
|
|
114
|
+
.description("Set up AI agent integrations (auto-detects installed agents)")
|
|
115
|
+
.option("--mcp", "Enable MCP server (agent tools)")
|
|
116
|
+
.option("--hooks", "Enable context injection hooks")
|
|
117
|
+
.option("--all", "Enable both MCP and hooks")
|
|
118
|
+
.option("--only <agents>", "Only configure these agents (comma-separated)")
|
|
119
|
+
.option("--skip <agents>", "Skip these agents (comma-separated)")
|
|
120
|
+
.action(setupCommand);
|
|
121
|
+
|
|
122
|
+
program
|
|
123
|
+
.command("teardown")
|
|
124
|
+
.description("Remove Memax integrations from agents")
|
|
125
|
+
.option("--only <agents>", "Only remove from these agents (comma-separated)")
|
|
126
|
+
.action(teardownCommand);
|
|
102
127
|
|
|
103
128
|
program
|
|
104
129
|
.command("hook <action> <agent>")
|