memro-cli 0.1.1 → 0.1.5
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/README.md +73 -20
- package/package.json +2 -2
- package/src/cli.js +340 -75
- package/src/clients.js +152 -55
- package/src/instructions.js +109 -0
- package/src/picker.js +115 -33
- package/src/ui.js +131 -0
package/README.md
CHANGED
|
@@ -3,7 +3,11 @@
|
|
|
3
3
|
Connect your AI tools to [Memro](https://memro.co) memory with one command.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
+
# Global configuration (default)
|
|
6
7
|
npx memro-cli connect
|
|
8
|
+
|
|
9
|
+
# Project-level configuration (current directory)
|
|
10
|
+
npx memro-cli connect --project
|
|
7
11
|
```
|
|
8
12
|
|
|
9
13
|
1. Lists the supported tools with the ones on this machine already ticked.
|
|
@@ -11,36 +15,85 @@ npx memro-cli connect
|
|
|
11
15
|
without signing in).
|
|
12
16
|
2. Shows a code and opens the Memro dashboard. Sign in and press **Connect**.
|
|
13
17
|
3. Receives a new API key (revocable in the dashboard → API keys) and stores
|
|
14
|
-
it in `~/.memro/credentials.json` (readable only by you).
|
|
18
|
+
it in `~/.memro/credentials.json` (readable only by you). Reuses existing credentials
|
|
19
|
+
by default, or accepts `--key <key>` for project-isolated credentials.
|
|
15
20
|
4. Adds the Memro MCP server to each tool you picked:
|
|
16
21
|
|
|
17
|
-
| Tool |
|
|
18
|
-
|
|
19
|
-
| Claude Code | `claude mcp add --scope user` (or `~/.claude.json`) |
|
|
20
|
-
|
|
|
21
|
-
|
|
|
22
|
-
|
|
|
23
|
-
|
|
|
24
|
-
|
|
|
25
|
-
|
|
|
26
|
-
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
|
|
27
|
-
| Claude Desktop | `claude_desktop_config.json` (via `mcp-remote`) |
|
|
22
|
+
| Tool | Global (`--scope user`) | Project (`--project`) |
|
|
23
|
+
|---|---|---|
|
|
24
|
+
| Claude Code | `claude mcp add --scope user` (or `~/.claude.json`) | `claude mcp add --scope project` (or `./.mcp.json`) |
|
|
25
|
+
| Cursor | `~/.cursor/mcp.json` | `./.cursor/mcp.json` |
|
|
26
|
+
| Codex | `~/.codex/config.toml` | `./.codex/config.toml` |
|
|
27
|
+
| VS Code | User `mcp.json` | `./.vscode/mcp.json` |
|
|
28
|
+
| Antigravity | `~/.gemini/config/mcp_config.json` | `./.gemini/config/mcp_config.json` |
|
|
29
|
+
| OpenCode | `~/.config/opencode/opencode.json` | `./opencode.json` |
|
|
30
|
+
| Gemini CLI | `~/.gemini/settings.json` | `./.gemini/settings.json` |
|
|
31
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` | — (Windsurf has no per-project MCP config) |
|
|
32
|
+
| Claude Desktop | `claude_desktop_config.json` (via `mcp-remote`) | *(Global only)* |
|
|
33
|
+
|
|
34
|
+
5. Teaches each tool to use Memro without being asked: recall at the start of
|
|
35
|
+
a task, remember preferences, decisions and lasting facts, never store
|
|
36
|
+
secrets. The Memro server sends this guidance to every client on connect;
|
|
37
|
+
a managed note is also added between `<!-- memro:start -->` and `<!-- memro:end -->`:
|
|
38
|
+
|
|
39
|
+
| Tool | Global (`--scope user`) | Project (`--project`) |
|
|
40
|
+
|---|---|---|
|
|
41
|
+
| Claude Code | `~/.claude/CLAUDE.md` | `./CLAUDE.md` |
|
|
42
|
+
| Codex | `~/.codex/AGENTS.md` | `./AGENTS.md` |
|
|
43
|
+
| OpenCode | `~/.config/opencode/AGENTS.md` | `./AGENTS.md` |
|
|
44
|
+
| Gemini CLI | `~/.gemini/GEMINI.md` | `./GEMINI.md` |
|
|
45
|
+
| Antigravity | `~/.gemini/config/rules/memro.md` | `./.agents/rules/memro.md` |
|
|
46
|
+
| Windsurf | `~/.codeium/windsurf/memories/global_rules.md` | — |
|
|
47
|
+
|
|
48
|
+
Untick "Teach these tools…" in the list, or pass `--no-instructions`, to
|
|
49
|
+
skip it. `disconnect` removes the note and leaves the rest of the file.
|
|
28
50
|
|
|
29
51
|
Existing settings and other servers are kept; the original file is saved
|
|
30
52
|
once as `<file>.memro-backup`. Restart the tool afterwards.
|
|
31
53
|
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Configuration Scope vs. Memory Identity
|
|
57
|
+
|
|
58
|
+
> **Important**: Using `--project` changes where the MCP integration and instructions are configured (in the current directory rather than your user home folder). However, **memories are tied to your Agent ID and API key**, not the project directory.
|
|
59
|
+
>
|
|
60
|
+
> * If two projects use the same API key, they share the same agent memory.
|
|
61
|
+
> * For true isolation between distinct client projects, supply a separate API key created for a distinct agent:
|
|
62
|
+
> ```bash
|
|
63
|
+
> npx memro-cli connect --project --key memro_sk_client_specific_key
|
|
64
|
+
> ```
|
|
65
|
+
|
|
66
|
+
---
|
|
67
|
+
|
|
32
68
|
## Commands
|
|
33
69
|
|
|
70
|
+
```bash
|
|
71
|
+
# Connect globally (default)
|
|
72
|
+
npx memro-cli connect [--client cursor,claude] [--yes]
|
|
73
|
+
|
|
74
|
+
# Connect for the current project
|
|
75
|
+
npx memro-cli connect --project [--client cursor,claude] [--yes]
|
|
76
|
+
|
|
77
|
+
# Explicit scope
|
|
78
|
+
npx memro-cli connect --scope user
|
|
79
|
+
npx memro-cli connect --scope project
|
|
80
|
+
|
|
81
|
+
# Status and disconnect
|
|
82
|
+
npx memro-cli status [--project]
|
|
83
|
+
npx memro-cli disconnect [--project] [--client ...]
|
|
34
84
|
```
|
|
35
|
-
npx memro-cli connect [--client cursor,codex] [--yes]
|
|
36
|
-
npx memro-cli status
|
|
37
|
-
npx memro-cli disconnect [--client ...]
|
|
38
|
-
```
|
|
39
85
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
86
|
+
### Options
|
|
87
|
+
|
|
88
|
+
* `--project`: Configure the current working directory instead of global user configs.
|
|
89
|
+
* `--scope <user|project>`: Explicitly select configuration scope (`user` default).
|
|
90
|
+
* `--client <ids>`: Only configure these tools, comma-separated (e.g. `--client claude,cursor`).
|
|
91
|
+
* `--key <key>`: Use a specific API key (`memro_sk_...`) instead of default credentials.
|
|
92
|
+
* `-y, --yes`: Configure every detected tool without prompting.
|
|
93
|
+
* `--no-instructions`: Do not add Memro guidance to instruction files (`CLAUDE.md`, `AGENTS.md`, etc.).
|
|
94
|
+
* `--staging`, `--local` or `--api <url>`: Target another Memro server (e.g. self-hosted: `--api https://memro.example.com`).
|
|
95
|
+
|
|
96
|
+
---
|
|
44
97
|
|
|
45
98
|
## Any other MCP client
|
|
46
99
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "memro-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Connect Claude Code, Codex, Cursor, Antigravity, OpenCode and other AI tools to Memro memory with one command.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"homepage": "https://memro.co",
|
|
7
7
|
"repository": { "type": "git", "url": "git+https://github.com/memrohq/memro.git", "directory": "cli" },
|
|
8
8
|
"type": "module",
|
|
9
|
-
"bin": { "memro": "bin/memro.js" },
|
|
9
|
+
"bin": { "memro-cli": "bin/memro.js", "memro": "bin/memro.js" },
|
|
10
10
|
"files": ["bin", "src", "LICENSE", "README.md"],
|
|
11
11
|
"engines": { "node": ">=18" },
|
|
12
12
|
"scripts": { "test": "node --test" },
|