memax-cli 0.1.0-alpha.6 → 0.1.0-alpha.8

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.
@@ -6,6 +6,7 @@ import {
6
6
  watch,
7
7
  existsSync,
8
8
  } from "node:fs";
9
+ import { createInterface } from "node:readline";
9
10
  import { join, relative, extname, resolve, basename } from "node:path";
10
11
  import { homedir } from "node:os";
11
12
  import { apiPost } from "../lib/api.js";
@@ -17,6 +18,7 @@ interface SyncOptions {
17
18
  watch?: boolean;
18
19
  ignore?: string;
19
20
  agentMemory?: boolean;
21
+ yes?: boolean;
20
22
  }
21
23
 
22
24
  const DEFAULT_IGNORE = new Set([
@@ -85,6 +87,21 @@ export async function syncCommand(
85
87
  }
86
88
 
87
89
  console.log(chalk.gray(`Found ${files.length} files to sync`));
90
+
91
+ // Confirm if many files (>10) unless -y is passed
92
+ if (files.length > 10 && !options.yes) {
93
+ console.log(
94
+ chalk.yellow(
95
+ `\n This will push ${files.length} files. Continue? (y/N) `,
96
+ ),
97
+ );
98
+ const confirmed = await confirmSync();
99
+ if (!confirmed) {
100
+ console.log(chalk.gray(" Cancelled.\n"));
101
+ return;
102
+ }
103
+ }
104
+
88
105
  console.log();
89
106
 
90
107
  let pushed = 0;
@@ -474,3 +491,16 @@ async function syncAgentMemory(): Promise<void> {
474
491
  ),
475
492
  );
476
493
  }
494
+
495
+ function confirmSync(): Promise<boolean> {
496
+ return new Promise((resolve) => {
497
+ const rl = createInterface({
498
+ input: process.stdin,
499
+ output: process.stdout,
500
+ });
501
+ rl.question(" ", (answer) => {
502
+ rl.close();
503
+ resolve(answer.trim().toLowerCase() === "y");
504
+ });
505
+ });
506
+ }
package/src/index.ts CHANGED
@@ -77,7 +77,24 @@ program
77
77
  program
78
78
  .command("delete <id>")
79
79
  .description("Delete a note")
80
- .option("--confirm", "Skip confirmation")
80
+ .option("-y, --yes", "Skip confirmation")
81
+ .action(deleteCommand);
82
+
83
+ // Aliases
84
+ program
85
+ .command("remember [content]")
86
+ .description("Alias for push — save knowledge to your Memax workspace")
87
+ .option("-f, --file <path>", "File to push")
88
+ .option("-c, --category <category>", "Category (auto-detected if omitted)")
89
+ .option("-t, --tags <tags>", "Comma-separated tags")
90
+ .option("--title <title>", "Note title")
91
+ .option("--stdin", "Read content from stdin")
92
+ .action(pushCommand);
93
+
94
+ program
95
+ .command("forget <id>")
96
+ .description("Alias for delete — remove a note from your workspace")
97
+ .option("-y, --yes", "Skip confirmation")
81
98
  .action(deleteCommand);
82
99
 
83
100
  // --- Sync ---
@@ -100,6 +117,7 @@ const syncCmd = program
100
117
  "--agent-memory",
101
118
  "Sync native AI agent memory files (Claude Code, Cursor, Codex)",
102
119
  )
120
+ .option("-y, --yes", "Skip confirmation for large syncs")
103
121
  .action(syncCommand);
104
122
 
105
123
  syncCmd
@@ -114,7 +132,8 @@ program
114
132
  .description("Set up AI agent integrations (auto-detects installed agents)")
115
133
  .option("--mcp", "Enable MCP server (agent tools)")
116
134
  .option("--hooks", "Enable context injection hooks")
117
- .option("--all", "Enable both MCP and hooks")
135
+ .option("--instructions", "Inject memax instructions into agent config files")
136
+ .option("--all", "Enable MCP + hooks + instructions")
118
137
  .option("--local", "Use local stdio MCP instead of remote server")
119
138
  .option("--print", "Print MCP config JSON to copy/paste (no changes made)")
120
139
  .option("--only <agents>", "Only configure these agents (comma-separated)")