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/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("0.0.1");
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 hooks ---
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>")