memoir-cli 3.1.1 → 3.2.1

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.
@@ -0,0 +1,215 @@
1
+ # Ready-to-Post Social Media — Copy & Paste Now
2
+
3
+ Post these THIS WEEK. Don't wait for perfection.
4
+
5
+ ---
6
+
7
+ ## 1. Reddit r/programming — POST TODAY
8
+
9
+ **URL:** https://www.reddit.com/r/programming/submit
10
+
11
+ **Title:** I built a CLI that syncs your AI coding memory across 11 tools and every device
12
+
13
+ **Body:**
14
+
15
+ Every AI coding tool stores your preferences in its own hidden config files. Claude has `~/.claude/` and `CLAUDE.md`. Cursor has `.cursorrules`. Gemini has `GEMINI.md`. None of them talk to each other, and none of them sync between machines.
16
+
17
+ I got tired of re-teaching my AI tools every time I switched from my Mac to my PC, so I built **memoir** — a CLI that backs up, restores, and translates your AI memory across devices and tools.
18
+
19
+ **What it does:**
20
+
21
+ - `memoir push` — backs up AI configs, project knowledge, and your current coding session
22
+ - `memoir restore` — restores everything on any machine (Mac, Windows, Linux)
23
+ - `memoir migrate --from claude --to cursor` — AI-powered translation between tools (rewrites conventions, doesn't just copy files)
24
+ - `memoir mcp` — MCP server so your editor can search/save memories in-conversation
25
+
26
+ **What makes it interesting:**
27
+
28
+ It doesn't just sync config files. It captures *session state* — what files you changed, what decisions you made, what you were debugging — and injects that context when you restore. Your AI literally picks up where you left off.
29
+
30
+ It also syncs your actual workspace: git repos are auto-cloned, non-git projects are bundled and unpacked, uncommitted changes are saved as patches.
31
+
32
+ E2E encrypted (AES-256-GCM), secret scanning built in, MIT licensed.
33
+
34
+ ```
35
+ npm install -g memoir-cli
36
+ ```
37
+
38
+ GitHub: https://github.com/camgitt/memoir
39
+ Website: https://memoir.sh
40
+
41
+ Would love to hear what workflows people would find useful. Currently thinking about shareable context links for team onboarding.
42
+
43
+ ---
44
+
45
+ ## 2. Reddit r/cursor — POST TOMORROW
46
+
47
+ **URL:** https://www.reddit.com/r/cursor/submit
48
+
49
+ **Title:** Sync your .cursorrules and AI context across machines (and 10 other AI tools)
50
+
51
+ **Body:**
52
+
53
+ Quick question for multi-machine Cursor users — how are you keeping your `.cursorrules` and settings in sync across devices?
54
+
55
+ I built **memoir** because I kept losing my AI context switching between machines. It's a CLI that syncs Cursor configs alongside 10 other AI tools — Claude Code, Gemini CLI, ChatGPT, Codex, Copilot, Windsurf, Zed, Cline, Continue.dev, and Aider. 11 tools total.
56
+
57
+ The part that's been most useful for me:
58
+
59
+ ```
60
+ memoir migrate --from claude --to cursor
61
+ ```
62
+
63
+ This uses AI to actually *translate* your Claude CLAUDE.md into a proper `.cursorrules` that follows Cursor's conventions. Not a file copy — a real rewrite.
64
+
65
+ It also captures your current coding session and lets you resume on another machine. Your AI picks up mid-conversation.
66
+
67
+ ```
68
+ npm install -g memoir-cli
69
+ memoir init
70
+ memoir push # backs up .cursorrules + settings + projects
71
+ memoir restore # restores everything on another machine
72
+ ```
73
+
74
+ E2E encrypted, MIT licensed, free tier available.
75
+
76
+ GitHub: https://github.com/camgitt/memoir
77
+
78
+ What other Cursor-specific workflows would be useful? Happy to add things.
79
+
80
+ ---
81
+
82
+ ## 3. Reddit r/ClaudeAI — POST DAY AFTER
83
+
84
+ **URL:** https://www.reddit.com/r/ClaudeAI/submit
85
+
86
+ **Title:** Built a CLI to sync your CLAUDE.md and Claude Code memory across machines
87
+
88
+ **Body:**
89
+
90
+ For those of you using Claude Code on multiple machines — how are you keeping your CLAUDE.md files and ~/.claude/ settings in sync?
91
+
92
+ I built **memoir** to solve this. It's a CLI that backs up and restores your Claude Code memory (plus 10 other AI tools) across any machine.
93
+
94
+ ```
95
+ memoir push # backs up ~/.claude/, CLAUDE.md files, session state, projects
96
+ memoir restore # restores everything on another machine
97
+ ```
98
+
99
+ The part I find most useful: **session handoff**. memoir captures what you were working on — files changed, errors hit, decisions made — and injects that context when you restore. Claude literally picks up where you left off on a different machine.
100
+
101
+ It also does AI-powered translation if you use multiple tools:
102
+
103
+ ```
104
+ memoir migrate --from claude --to cursor
105
+ # Rewrites your CLAUDE.md into proper .cursorrules
106
+ ```
107
+
108
+ And it ships an MCP server (`memoir mcp`) with 6 tools your editor can use to search and save memories in-conversation.
109
+
110
+ E2E encrypted, secret scanning built in, MIT licensed, ~100kb installed.
111
+
112
+ ```
113
+ npm install -g memoir-cli
114
+ ```
115
+
116
+ GitHub: https://github.com/camgitt/memoir
117
+ Website: https://memoir.sh
118
+
119
+ Would love feedback from the Claude community. What would make this more useful for your workflow?
120
+
121
+ ---
122
+
123
+ ## 4. X/Twitter Thread — POST SAME DAY AS REDDIT
124
+
125
+ Copy each tweet as a separate post in a thread:
126
+
127
+ **Tweet 1:**
128
+ AI tools forget you every time you switch machines.
129
+
130
+ I built memoir — a CLI that syncs your AI memory across 11 tools and every device.
131
+
132
+ One command to save. One command to restore. Your AI picks up mid-conversation.
133
+
134
+ Here's what it does:
135
+
136
+ **Tweet 2:**
137
+ The problem: Claude has CLAUDE.md. Cursor has .cursorrules. Gemini has GEMINI.md.
138
+
139
+ None of them sync. None of them talk to each other.
140
+
141
+ Switch machines? Start from zero. Switch tools? Re-teach everything.
142
+
143
+ memoir fixes this.
144
+
145
+ **Tweet 3:**
146
+ memoir push # save everything
147
+ memoir restore # restore anywhere
148
+
149
+ It syncs three layers:
150
+ - AI memory (configs across 11 tools)
151
+ - Session state (what you were doing)
152
+ - Workspace (your actual projects)
153
+
154
+ **Tweet 4:**
155
+ The killer feature: AI-powered translation between tools.
156
+
157
+ memoir migrate --from claude --to cursor
158
+
159
+ This doesn't just copy files. It rewrites your Claude instructions into proper .cursorrules following Cursor's conventions.
160
+
161
+ Works between all 11 tools.
162
+
163
+ **Tweet 5:**
164
+ Session handoff is the other thing nothing else does.
165
+
166
+ memoir captures what files you changed, what decisions you made, what you were debugging.
167
+
168
+ On restore, it injects that context. Your AI literally picks up where you left off.
169
+
170
+ **Tweet 6:**
171
+ npm install -g memoir-cli
172
+
173
+ Free & open source. MIT licensed. ~100kb.
174
+
175
+ Cloud sync available. MCP server included so your editor can search memories in-conversation.
176
+
177
+ GitHub: github.com/camgitt/memoir
178
+ Website: memoir.sh
179
+
180
+ Try it and let me know what you think
181
+
182
+ ---
183
+
184
+ ## 5. Cold DM Template (for devs tweeting about AI context loss)
185
+
186
+ **Search Twitter for:** "lost my cursorrules" OR "claude forgot" OR "new machine setup" OR "re-teaching AI" OR "CLAUDE.md sync"
187
+
188
+ **DM template:**
189
+
190
+ Hey! Saw your tweet about [specific pain point]. I built an open-source CLI called memoir that solves exactly this — it syncs your AI memory (CLAUDE.md, .cursorrules, etc.) across machines and tools.
191
+
192
+ One command to back up, one to restore. Your AI picks up mid-conversation.
193
+
194
+ github.com/camgitt/memoir
195
+
196
+ Would love your feedback if you try it!
197
+
198
+ ---
199
+
200
+ ## Posting Schedule
201
+
202
+ | Day | Platform | Post |
203
+ |-----|----------|------|
204
+ | Today (Thu) | r/programming | Post #1 |
205
+ | Today (Thu) | X/Twitter | Thread (Post #4) |
206
+ | Friday | r/cursor | Post #2 |
207
+ | Friday | r/ClaudeAI | Post #3 |
208
+ | Sat-Sun | X/Twitter | Cold DMs to 10-20 devs |
209
+
210
+ ## Rules
211
+ 1. Reply to EVERY comment within 2 hours
212
+ 2. Don't be defensive about "it's just dotfiles" — explain session handoff
213
+ 3. Ask questions back: "What tools are you using?"
214
+ 4. Link the demo SVG/GIF in early replies
215
+ 5. Ask 2-3 friends to upvote within first 30 min
package/README.md CHANGED
@@ -2,52 +2,95 @@
2
2
 
3
3
  # memoir
4
4
 
5
- **Your AI remembers everything. On every machine.**
5
+ **Persistent memory for AI coding tools.**
6
6
 
7
7
  [![npm version](https://img.shields.io/npm/v/memoir-cli.svg?style=flat-square&color=7c6ef0)](https://npmjs.org/package/memoir-cli)
8
8
  [![npm downloads](https://img.shields.io/npm/dm/memoir-cli.svg?style=flat-square&color=7c6ef0)](https://npmjs.org/package/memoir-cli)
9
9
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
10
10
  [![Node.js](https://img.shields.io/badge/node-%3E%3D18-brightgreen?style=flat-square)](https://nodejs.org)
11
11
 
12
- Close your laptop. Open another one. **Your AI picks up exactly where you left off.**
12
+ Your AI forgets everything between sessions. memoir gives it long-term memory via MCP.
13
+
14
+ Works with Claude Code, Cursor, Windsurf, Gemini, and 7 more tools.
13
15
 
14
16
  [Website](https://memoir.sh) • [npm](https://npmjs.org/package/memoir-cli) • [Blog](https://memoir.sh/blog)
15
17
 
16
18
  <br />
17
19
 
20
+ <img src="demo.svg" alt="memoir demo — push, restore, and sync AI memory" width="700" />
21
+
18
22
  </div>
19
23
 
20
24
  ## The Problem
21
25
 
22
- You spend weeks teaching Claude how you code. Your projects are dialed in. Your AI knows your stack, your decisions, your preferences.
26
+ You told Claude your project uses Zustand, not Redux. You explained your auth middleware to Cursor. You spent weeks building up context across your AI tools.
23
27
 
24
- Then you switch machines. **Everything is gone.** Your AI has amnesia. Your projects aren't there. You start from zero.
28
+ Next session? **Gone.** New machine? **Gone.** Switch tools? **Gone.**
25
29
 
26
- ## The Fix
30
+ ## How memoir fixes it
27
31
 
28
- ```bash
29
- # On your main machine
30
- memoir push
32
+ memoir is a **persistent memory layer** that runs via [MCP](https://modelcontextprotocol.io) inside your AI tools. Your AI can search, read, and save memories automatically — across sessions, tools, and machines.
31
33
 
32
- # On any other machine
34
+ ```
35
+ you: how does auth work in this project?
36
+
37
+ memoir_recall("auth setup architecture")
38
+ Found 3 memories matching "auth"
39
+
40
+ claude: Based on your previous sessions: this project uses JWT auth
41
+ with refresh tokens, the middleware is in src/middleware/auth.ts,
42
+ and you chose Zustand over Redux for auth state (decided March 12).
43
+ ```
44
+
45
+ No re-explaining. memoir remembered.
46
+
47
+ ## Quick Start
48
+
49
+ ```bash
50
+ # Install
33
51
  npm install -g memoir-cli
34
- memoir restore -y
35
52
 
36
- # Done. Everything's back:
37
- # ✔ AI memory restored (Claude, Gemini, Cursor, 11 tools)
38
- # ✔ 44 projects cloned & unpacked
39
- # ✔ Uncommitted changes applied
40
- # ✔ Session context injected — AI picks up mid-conversation
53
+ # Setup
54
+ memoir init
41
55
  ```
42
56
 
43
- One command to save. One command to restore. That's it.
57
+ ### Add MCP to your AI tools
58
+
59
+ **Claude Code** — add to `~/.mcp.json`:
60
+ ```json
61
+ {
62
+ "mcpServers": {
63
+ "memoir": { "command": "memoir-mcp" }
64
+ }
65
+ }
66
+ ```
67
+
68
+ **Cursor** — add to `.cursor/mcp.json`:
69
+ ```json
70
+ {
71
+ "mcpServers": {
72
+ "memoir": { "command": "memoir-mcp" }
73
+ }
74
+ }
75
+ ```
76
+
77
+ That's it. Your AI tools now have 6 memory abilities:
78
+
79
+ | MCP Tool | What it does |
80
+ |----------|-------------|
81
+ | `memoir_recall` | Search across all your AI memories |
82
+ | `memoir_remember` | Save context for future sessions |
83
+ | `memoir_list` | Browse all memory files by tool |
84
+ | `memoir_read` | Read a specific memory in full |
85
+ | `memoir_status` | See which AI tools are detected |
86
+ | `memoir_profiles` | Switch between work/personal |
44
87
 
45
88
  ## What Gets Synced
46
89
 
47
90
  memoir syncs three layers that no other tool connects:
48
91
 
49
- ### Layer 1: AI Memory
50
- Your AI tool configs, preferences, and project knowledge across 11 tools.
92
+ ### Layer 1: AI Memory (via MCP + CLI)
93
+ Configs, instructions, and project knowledge across 11 tools — searchable and writable from inside any AI conversation.
51
94
 
52
95
  | Tool | What gets synced |
53
96
  |------|-----------------|
@@ -71,7 +114,7 @@ What you were **doing** — not just what your AI knows, but the active context.
71
114
  - Injected into your AI on restore so it picks up mid-conversation
72
115
  - Secrets auto-redacted (API keys, tokens, passwords stripped before sync)
73
116
 
74
- ### Layer 3: Workspace (NEW in v3.1)
117
+ ### Layer 3: Workspace
75
118
  Your actual projects — code, files, everything.
76
119
 
77
120
  - **Git projects:** Remote URLs saved, auto-cloned on restore
@@ -79,47 +122,10 @@ Your actual projects — code, files, everything.
79
122
  - **Uncommitted work:** Saved as patches, applied after clone
80
123
  - **Zero git commands needed** — memoir handles it all
81
124
 
82
- ```
83
- memoir push on Mac:
84
- ✔ AI memory backed up
85
- ✔ Session context captured
86
- ✔ Workspace: 44 projects (17 git, 23 bundled)
87
- 🔒 E2E encrypted
88
-
89
- memoir restore on Windows:
90
- ✔ AI memory restored
91
- ✔ stock-market-book → C:\Users\You\stock-market-book (cloned)
92
- ✔ socialslink → C:\Users\You\socialslink (cloned)
93
- ✔ btc-trader → C:\Users\You\btc-trader (unpacked)
94
- ✔ 41 more projects restored
95
- 📋 Session context injected — Claude picks up where you left off
96
- ```
97
-
98
- ## Quick Start
99
-
100
- ```bash
101
- # Install
102
- npm install -g memoir-cli
103
-
104
- # First-time setup
105
- memoir init
106
-
107
- # Back up everything
108
- memoir push
109
-
110
- # Restore on any machine
111
- memoir restore
112
- ```
113
-
114
125
  ## Key Features
115
126
 
116
- ### Workspace sync
117
- ```bash
118
- memoir push # scans all projects, saves git URLs + bundles non-git projects
119
- memoir restore # auto-clones repos, unpacks bundles, applies uncommitted patches
120
- ```
121
-
122
- No manual git commands. memoir detects your projects, tracks their remotes, and restores them anywhere.
127
+ ### Cross-tool memory
128
+ Tell Claude something once. Cursor knows it too. memoir is the shared memory layer between all your AI tools.
123
129
 
124
130
  ### Translate between AI tools
125
131
  ```bash
@@ -130,13 +136,17 @@ memoir migrate --from chatgpt --to all
130
136
  # Translate to every tool at once
131
137
  ```
132
138
 
133
- ### Session handoff
139
+ ### Cross-machine sync
134
140
  ```bash
135
- # Capture your session (automatic on push, or manual)
136
- memoir snapshot
141
+ # On your main machine
142
+ memoir push
137
143
 
138
- # Pick up on another machine
139
- memoir resume --inject --to claude
144
+ # On any other machine
145
+ memoir restore -y
146
+ # ✔ AI memory restored (Claude, Gemini, Cursor, 11 tools)
147
+ # ✔ 44 projects cloned & unpacked
148
+ # ✔ Uncommitted changes applied
149
+ # ✔ Session context injected — AI picks up mid-conversation
140
150
  ```
141
151
 
142
152
  ### E2E Encryption
@@ -145,7 +155,7 @@ memoir encrypt # toggle encryption on/off
145
155
  memoir push # prompted for passphrase, AES-256-GCM encrypted
146
156
  ```
147
157
 
148
- Your backup is encrypted before it leaves your machine. Even if your storage is compromised, your data is safe. Secret scanning auto-redacts API keys, tokens, and passwords.
158
+ Your backup is encrypted before it leaves your machine. Secret scanning auto-redacts API keys, tokens, and passwords.
149
159
 
150
160
  ### Profiles (personal / work)
151
161
  ```bash
@@ -154,26 +164,15 @@ memoir push --profile work
154
164
  memoir profile switch personal
155
165
  ```
156
166
 
157
- Each profile has its own repo and tool filters. Work configs never mix with personal.
158
-
159
- ### Cloud sync (Pro)
167
+ ### Cloud sync
160
168
  ```bash
161
169
  memoir login
162
170
  memoir cloud push # encrypted cloud backup
163
171
  memoir cloud restore # restore from any version
164
- memoir history # view all backup versions
165
172
  ```
166
173
 
167
174
  ### Cross-platform (Mac / Windows / Linux)
168
- ```bash
169
- # Push from Mac
170
- memoir push
171
-
172
- # Restore on Windows — paths remap automatically
173
- memoir restore
174
- ```
175
-
176
- Claude's memory paths are automatically remapped between platforms. Projects are cloned to the right locations. It just works.
175
+ Paths remap automatically between platforms. Push from Mac, restore on Windows. It just works.
177
176
 
178
177
  ## All Commands
179
178
 
@@ -182,6 +181,7 @@ Claude's memory paths are automatically remapped between platforms. Projects are
182
181
  | `memoir init` | Setup wizard — GitHub or local storage |
183
182
  | `memoir push` | Back up AI memory + workspace + session |
184
183
  | `memoir restore` | Restore everything on a new machine |
184
+ | `memoir mcp` | Start MCP server for editor integration |
185
185
  | `memoir status` | Show detected AI tools |
186
186
  | `memoir doctor` | Diagnose issues, scan for secrets |
187
187
  | `memoir view` | Preview what's in your backup |
@@ -195,39 +195,44 @@ Claude's memory paths are automatically remapped between platforms. Projects are
195
195
  | `memoir cloud restore` | Restore from memoir cloud |
196
196
  | `memoir history` | View cloud backup versions |
197
197
  | `memoir login` | Sign in to memoir cloud |
198
+ | `memoir share` | Create encrypted shareable link |
199
+ | `memoir upgrade` | View plans and upgrade |
198
200
  | `memoir update` | Self-update to latest version |
199
201
 
200
202
  ## How memoir compares
201
203
 
202
204
  | Feature | memoir | dotfiles managers | ai-rulez | memories.sh |
203
205
  |---------|--------|-------------------|----------|-------------|
206
+ | MCP memory layer | **6 tools** | No | No | No |
204
207
  | AI memory sync | **11 tools** | No | 18 tools | 3 tools |
208
+ | Cross-tool recall | **Yes** | No | No | No |
205
209
  | Workspace sync | **Yes** | No | No | No |
206
210
  | Session handoff | **Yes** | No | No | No |
207
- | AI-powered translation | **Yes** | No | No | No |
211
+ | AI-powered migration | **Yes** | No | No | No |
208
212
  | E2E encryption | **Yes** | No | No | No |
209
213
  | Secret scanning | **Yes** | Some | No | No |
210
214
  | Cross-platform remap | **Yes** | Some | No | No |
211
- | Uncommitted work patches | **Yes** | No | No | No |
212
215
  | Cloud backup | **Yes** | No | No | Yes ($15/mo) |
213
216
  | Profiles | **Yes** | No | No | No |
214
217
  | Free & open source | **Yes** | Yes | Yes | No |
215
218
 
216
219
  ## Common Workflows
217
220
 
218
- ### New machine setup
219
- ```bash
220
- # Old machine
221
- memoir push
221
+ ### Your AI remembers across sessions
222
+ ```
223
+ # Monday — you explain your auth setup to Claude
224
+ # ...Claude calls memoir_remember to save the decision
222
225
 
223
- # New machine one command, everything's back
224
- npm install -g memoir-cli && memoir init && memoir restore -y
226
+ # Thursdaynew conversation
227
+ you: "add a protected route"
228
+ # Claude calls memoir_recall, finds your auth architecture
229
+ # No re-explaining needed
225
230
  ```
226
231
 
227
- ### Daily sync between machines
232
+ ### New machine setup
228
233
  ```bash
229
- memoir push # end of day on laptop
230
- memoir restore # next morning on desktop — AI knows what you were doing
234
+ npm install -g memoir-cli && memoir init && memoir restore -y
235
+ # Done. Everything's back.
231
236
  ```
232
237
 
233
238
  ### Switching AI tools
@@ -253,6 +258,7 @@ memoir restore --profile team
253
258
  - **Auto-redaction** — secrets stripped from session handoffs before sync
254
259
  - **No credentials synced** — .env files, auth tokens, and API keys are never included
255
260
  - **Passphrase verified** — wrong passphrase caught before decrypt attempt
261
+ - **Local MCP server** — runs on your machine, no data sent to external services
256
262
 
257
263
  ## Requirements
258
264
 
@@ -262,7 +268,7 @@ memoir restore --profile team
262
268
 
263
269
  ## Contributing
264
270
 
265
- Contributions welcome — especially new tool adapters and migration improvements.
271
+ Contributions welcome — especially new tool adapters and MCP improvements.
266
272
 
267
273
  1. Fork the repo
268
274
  2. Create your branch (`git checkout -b feature/my-feature`)
package/bin/memoir.js CHANGED
@@ -16,7 +16,10 @@ import { resumeCommand } from '../src/commands/resume.js';
16
16
  import { profileListCommand, profileCreateCommand, profileSwitchCommand, profileDeleteCommand } from '../src/commands/profile.js';
17
17
  import { loginCommand, logoutCommand } from '../src/commands/login.js';
18
18
  import { cloudPushCommand, cloudRestoreCommand } from '../src/commands/cloud.js';
19
+ import { shareCommand } from '../src/commands/share.js';
19
20
  import { historyCommand } from '../src/commands/history.js';
21
+ import { projectsListCommand, projectsTodoCommand } from '../src/commands/projects.js';
22
+ import { upgradeCommand } from '../src/commands/upgrade.js';
20
23
  import { createRequire } from 'module';
21
24
 
22
25
  const require = createRequire(import.meta.url);
@@ -62,12 +65,15 @@ if (process.argv.length <= 2) {
62
65
  chalk.cyan(' memoir resume ') + chalk.gray('— pick up where you left off') + '\n' +
63
66
  chalk.cyan(' memoir status ') + chalk.gray('— see detected AI tools') + '\n' +
64
67
  chalk.cyan(' memoir profile ') + chalk.gray('— manage profiles (personal/work)') + '\n' +
68
+ chalk.cyan(' memoir projects ') + chalk.gray('— see all your projects at a glance') + '\n' +
65
69
  chalk.cyan(' memoir encrypt ') + chalk.gray('— toggle E2E encryption') + '\n' +
66
- chalk.cyan(' memoir update ') + chalk.gray('— update to latest version') + '\n\n' +
70
+ chalk.cyan(' memoir update ') + chalk.gray('— update to latest version') + '\n' +
71
+ chalk.cyan(' memoir upgrade ') + chalk.gray('— view plans & upgrade') + '\n\n' +
67
72
  chalk.white.bold('Cloud (Pro):') + '\n' +
68
73
  chalk.cyan(' memoir login ') + chalk.gray('— sign in to memoir cloud') + '\n' +
69
74
  chalk.cyan(' memoir cloud push ') + chalk.gray('— back up to the cloud') + '\n' +
70
75
  chalk.cyan(' memoir cloud restore ') + chalk.gray('— restore from cloud') + '\n' +
76
+ chalk.cyan(' memoir share ') + chalk.gray('— share memory via secure link') + '\n' +
71
77
  chalk.cyan(' memoir history ') + chalk.gray('— view backup versions') + '\n\n' +
72
78
  chalk.gray(' Tip: use --profile work to sync a specific profile') + '\n\n' +
73
79
  chalk.gray(`v${VERSION}`),
@@ -120,8 +126,9 @@ program
120
126
  .alias('pull')
121
127
  .description('Restore your AI memory on this machine')
122
128
  .option('--only <tools>', 'Only restore specific tools (comma-separated)')
123
- .option('-y, --yes', 'Skip confirmation prompts (restore all)')
129
+ .option('-i, --interactive', 'Confirm each tool before restoring')
124
130
  .option('-p, --profile <name>', 'Use a specific profile')
131
+ .option('--from <token>', 'Restore from a share link token')
125
132
  .action(async (options) => {
126
133
  try {
127
134
  await restoreCommand(options);
@@ -131,6 +138,21 @@ program
131
138
  }
132
139
  });
133
140
 
141
+ program
142
+ .command('share')
143
+ .description('Share your AI memory via a secure link')
144
+ .option('--only <tools>', 'Only share specific tools (comma-separated)')
145
+ .option('--expires <hours>', 'Link expiry in hours (default: 24)')
146
+ .option('--uses <number>', 'Max number of uses (default: 5)')
147
+ .action(async (options) => {
148
+ try {
149
+ await shareCommand(options);
150
+ } catch (err) {
151
+ console.error(chalk.red('\n✖ Error during share:'), err.message);
152
+ process.exit(1);
153
+ }
154
+ });
155
+
134
156
  program
135
157
  .command('status')
136
158
  .description('See what AI tools are on this machine')
@@ -219,7 +241,6 @@ program
219
241
 
220
242
  program
221
243
  .command('update')
222
- .alias('upgrade')
223
244
  .description('Update memoir to the latest version')
224
245
  .action(async () => {
225
246
  try {
@@ -257,6 +278,19 @@ program
257
278
  }
258
279
  });
259
280
 
281
+ program
282
+ .command('upgrade')
283
+ .alias('pro')
284
+ .description('View plans and upgrade your memoir subscription')
285
+ .action(async () => {
286
+ try {
287
+ await upgradeCommand();
288
+ } catch (err) {
289
+ console.error(chalk.red('\n✖ Error:'), err.message);
290
+ process.exit(1);
291
+ }
292
+ });
293
+
260
294
  program
261
295
  .command('encrypt')
262
296
  .description('Toggle E2E encryption for your backups')
@@ -432,6 +466,47 @@ profile
432
466
  }
433
467
  });
434
468
 
469
+ // Project tracker
470
+ const projects = program.command('projects').alias('p').description('Track and manage your projects');
471
+
472
+ projects
473
+ .command('list', { isDefault: true })
474
+ .alias('ls')
475
+ .description('List all projects with recent activity')
476
+ .option('--all', 'Show all projects (default: top 15)')
477
+ .option('-v, --verbose', 'Show more commits and todos')
478
+ .option('--json', 'Output as JSON')
479
+ .action(async (options) => {
480
+ try {
481
+ await projectsListCommand(options);
482
+ } catch (err) {
483
+ console.error(chalk.red('\n✖ Error:'), err.message);
484
+ process.exit(1);
485
+ }
486
+ });
487
+
488
+ projects
489
+ .command('todo <project> [text]')
490
+ .description('Add or manage todos for a project')
491
+ .option('--done <index>', 'Mark a todo as done by number')
492
+ .option('--clear', 'Clear all todos for this project')
493
+ .action(async (project, text, options) => {
494
+ try {
495
+ await projectsTodoCommand(project, text, options);
496
+ } catch (err) {
497
+ console.error(chalk.red('\n✖ Error:'), err.message);
498
+ process.exit(1);
499
+ }
500
+ });
501
+
502
+ program
503
+ .command('mcp')
504
+ .description('Start the MCP server (for Claude Code, Cursor, VS Code integration)')
505
+ .action(async () => {
506
+ // Import and run the MCP server directly
507
+ await import('../src/mcp.js');
508
+ });
509
+
435
510
  program.hook('postAction', async () => {
436
511
  await checkForUpdate();
437
512
  });