mindlink 1.0.0
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/LICENSE +21 -0
- package/README.md +201 -0
- package/commands/clear.md +74 -0
- package/commands/config.md +81 -0
- package/commands/doctor.md +98 -0
- package/commands/export.md +90 -0
- package/commands/import.md +80 -0
- package/commands/index.md +81 -0
- package/commands/init.md +124 -0
- package/commands/log.md +65 -0
- package/commands/reset.md +81 -0
- package/commands/status.md +76 -0
- package/commands/summary.md +89 -0
- package/commands/sync.md +96 -0
- package/commands/uninstall.md +88 -0
- package/commands/update.md +62 -0
- package/dist/cli.js +1811 -0
- package/dist/cli.js.map +1 -0
- package/dist/templates/agents/.clinerules +40 -0
- package/dist/templates/agents/.windsurfrules +40 -0
- package/dist/templates/agents/AGENTS.md +63 -0
- package/dist/templates/agents/CLAUDE.md +65 -0
- package/dist/templates/agents/CONVENTIONS.md +42 -0
- package/dist/templates/agents/CURSOR.md +63 -0
- package/dist/templates/agents/GEMINI.md +63 -0
- package/dist/templates/agents/copilot-instructions.md +53 -0
- package/dist/templates/brain/LOG.md +22 -0
- package/dist/templates/brain/MEMORY.md +81 -0
- package/dist/templates/brain/SESSION.md +27 -0
- package/dist/templates/brain/SHARED.md +20 -0
- package/dist/templates/hooks/claude-settings.json +15 -0
- package/package.json +64 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Yuanhong Cao
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# ◉ MindLink
|
|
2
|
+
|
|
3
|
+
**Give your AI a brain.**
|
|
4
|
+
|
|
5
|
+
Three things break AI-assisted development:
|
|
6
|
+
|
|
7
|
+
**Every new session starts blank.** No memory of what you built, what you decided, or what blew up last week. You spend the first 10 minutes re-explaining everything. Every. Single. Time.
|
|
8
|
+
|
|
9
|
+
**Two sessions share nothing.** Two AI agents running in the same project are invisible to each other — they duplicate work, contradict decisions, run the same experiment twice.
|
|
10
|
+
|
|
11
|
+
**Switch agents, lose everything.** Claude Code in the morning, Cursor in the afternoon — each tool has its own silo. What one learned, the other never knows.
|
|
12
|
+
|
|
13
|
+
MindLink fixes all three. One command per project.
|
|
14
|
+
|
|
15
|
+
[](https://www.npmjs.com/package/mindlink)
|
|
16
|
+
[](LICENSE)
|
|
17
|
+
[](#installation)
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
> ### ◉ Latest — v1.0.0
|
|
22
|
+
> **Session memory · Cross-session sync · Cross-agent · 8 AI agents supported**
|
|
23
|
+
> [→ Full release notes](https://github.com/404-not-found/mindlink/releases/tag/v1.0.0)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
27
|
+
## Table of Contents
|
|
28
|
+
|
|
29
|
+
- [Installation](#installation)
|
|
30
|
+
- [Quick Start](#quick-start)
|
|
31
|
+
- [What It Does](#what-it-does)
|
|
32
|
+
- [Supported Agents](#supported-agents)
|
|
33
|
+
- [Commands](#commands)
|
|
34
|
+
- [Can My AI Run These Commands?](#can-my-ai-run-these-commands-itself)
|
|
35
|
+
- [The Hook (Claude Code)](#the-hook-claude-code-users)
|
|
36
|
+
- [License](#license)
|
|
37
|
+
- [Contributing](#contributing)
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Installation
|
|
42
|
+
|
|
43
|
+
**npm**
|
|
44
|
+
```bash
|
|
45
|
+
npm install -g mindlink
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
**Homebrew (macOS / Linux)**
|
|
49
|
+
```bash
|
|
50
|
+
brew tap 404-not-found/mindlink
|
|
51
|
+
brew install mindlink
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
**curl (macOS / Linux)**
|
|
55
|
+
```bash
|
|
56
|
+
curl -sL https://get.mindlink.dev | sh
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Windows (winget)**
|
|
60
|
+
```bash
|
|
61
|
+
winget install mindlink
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
**Windows (Scoop)**
|
|
65
|
+
```bash
|
|
66
|
+
scoop install mindlink
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
No Node.js? Grab a standalone binary from [GitHub Releases](https://github.com/404-not-found/mindlink/releases) — no runtime required.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Quick Start
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
cd my-project # navigate into the project where you want AI memory to live
|
|
77
|
+
mindlink init # run this once — your AI will know everything from the next session on
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
**Run this in your project directory, before your first AI session.** MindLink creates a `.brain/` folder right there — scoped to that project, not global. This is the folder your AI agent will read every time it wakes up in that project: your architecture decisions, what was built last session, what's broken, what's next. The more you work in that project, the smarter it gets.
|
|
81
|
+
|
|
82
|
+
The current session won't see it. The next one will wake up fully briefed. After that, you never have to run `init` again. That's the whole deal.
|
|
83
|
+
|
|
84
|
+
Close any AI session whenever you want — Claude Code, Cursor, Codex, whatever you're using. Lose your train of thought. Switch agents. Take a week off. The next session picks up exactly where you left off — no re-explaining, no context dumps, no "wait, what were we doing?" moments.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## What It Does
|
|
89
|
+
|
|
90
|
+
**No more goldfish brain** — every time you start a new AI session in your project, it already knows everything: what the project is, what decisions were made, what was built last session, what's broken, and what comes next. No briefing required.
|
|
91
|
+
|
|
92
|
+
**Close any AI session whenever you want** — Claude Code, Cursor, Codex, it doesn't matter. Lose your train of thought, switch agents mid-task, take a week off. The next session — in any tool — picks up exactly where you left off. You'll never be afraid to close a session again.
|
|
93
|
+
|
|
94
|
+
**Two sessions, one brain** — two AI sessions open in the same project? They share the same context automatically. What one learns, the other can see. No more running the same experiment twice because your two agents didn't know about each other.
|
|
95
|
+
|
|
96
|
+
**One memory, every agent** — use Claude Code in the morning, switch to Cursor in the afternoon — both read the exact same `.brain/` folder. No syncing. No duplicating context. No "but I told the other AI this already." Every agent you use shares one brain, because the memory lives in your project, not inside any particular tool. This is something no AI vendor can replicate — they each only know their own product.
|
|
97
|
+
|
|
98
|
+
**Team memory out of the box** — commit `.brain/` to git and your whole team shares the same AI context. New teammate joins, does `git pull`, and their AI agent is already fully briefed on the project. No onboarding session, no copying notes, no "let me catch you up."
|
|
99
|
+
|
|
100
|
+
**Plug in, not lock in** — works with Claude Code, Cursor, Codex, Gemini CLI, GitHub Copilot, Windsurf, Cline, Aider, and more. Because MindLink just writes files that agents read — no APIs, no SDKs, no version dependencies — it works with whatever version you have installed today and every version that comes after.
|
|
101
|
+
|
|
102
|
+
**Zero infrastructure** — no server, no account, no cloud, no pricing page. MindLink can't be shut down, rate-limited, or go behind a paywall. It's a file and a CLI. Works completely offline.
|
|
103
|
+
|
|
104
|
+
**Your files, your rules** — memory lives in your project as plain Markdown in a `.brain/` folder. No account, no cloud, no surveillance. Read it, edit it, delete it — it's just files. You own it completely.
|
|
105
|
+
|
|
106
|
+
**Smart memory, like a real brain** — `MEMORY.md` holds the facts that matter forever (architecture, decisions, conventions) and is never cleared. `LOG.md` holds session history and quietly archives old entries when it gets long. Like any good brain, MindLink remembers what matters and lets go of the stuff that hasn't come up in a while. Anything truly important belongs in `MEMORY.md` — promote it there and it lives forever.
|
|
107
|
+
|
|
108
|
+
---
|
|
109
|
+
|
|
110
|
+
## Supported Agents
|
|
111
|
+
|
|
112
|
+
MindLink works with any version of:
|
|
113
|
+
|
|
114
|
+
| Agent | Instruction file |
|
|
115
|
+
|---|---|
|
|
116
|
+
| Claude Code | `CLAUDE.md` |
|
|
117
|
+
| Cursor | `CURSOR.md` |
|
|
118
|
+
| Codex / OpenAI | `AGENTS.md` |
|
|
119
|
+
| Gemini CLI | `GEMINI.md` |
|
|
120
|
+
| GitHub Copilot | `.github/copilot-instructions.md` |
|
|
121
|
+
| Windsurf | `.windsurfrules` |
|
|
122
|
+
| Cline | `.clinerules` |
|
|
123
|
+
| Aider | `CONVENTIONS.md` |
|
|
124
|
+
|
|
125
|
+
MindLink works by writing instruction files that agents read at startup — no API calls, no SDKs, no version pinning. It works with whatever version you have today and any version released tomorrow. If your agent isn't listed, `mindlink init` lets you add a custom one.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Commands
|
|
130
|
+
|
|
131
|
+
**Run once per project — in your terminal, inside the project directory:**
|
|
132
|
+
```bash
|
|
133
|
+
cd my-project
|
|
134
|
+
mindlink init # creates .brain/ here — this is where your AI's memory lives
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
**Ask your AI to run these, or run them yourself in any terminal:**
|
|
138
|
+
```bash
|
|
139
|
+
mindlink status # what happened last session, what's next
|
|
140
|
+
mindlink summary # full briefing — everything your AI knows, in one view
|
|
141
|
+
mindlink log # complete session history
|
|
142
|
+
mindlink sync --once # check what other sessions have shared
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
**Run in a dedicated background terminal tab while sessions are active:**
|
|
146
|
+
```bash
|
|
147
|
+
mindlink sync # watch mode — stays running, surfaces changes from other sessions the moment they happen
|
|
148
|
+
```
|
|
149
|
+
Watch mode is the default. It keeps the process alive and prints a notification whenever another session writes to the shared memory. Stop it with Ctrl+C. Use `--once` to check once and exit.
|
|
150
|
+
|
|
151
|
+
**Run in your terminal between sessions — not via AI (interactive or destructive):**
|
|
152
|
+
```bash
|
|
153
|
+
mindlink clear # fresh session start (keeps memory and history intact)
|
|
154
|
+
mindlink reset # scorched earth — wipe all memory, keep your settings
|
|
155
|
+
mindlink config # change agents, git tracking, or auto-sync
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Share memory or back it up — run in your terminal:**
|
|
159
|
+
```bash
|
|
160
|
+
mindlink export # zip your .brain/ — send to a teammate or save as backup
|
|
161
|
+
mindlink import # unzip into this project — merge or overwrite your existing memory
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Run in your terminal only — maintenance tasks:**
|
|
165
|
+
```bash
|
|
166
|
+
mindlink doctor # health check — verify your setup is working correctly
|
|
167
|
+
mindlink update # check for a newer version, never installs without asking
|
|
168
|
+
mindlink uninstall # remove MindLink from this project
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Every command supports `--help`. Full CLI reference: [commands/](commands/index.md).
|
|
172
|
+
|
|
173
|
+
---
|
|
174
|
+
|
|
175
|
+
## Can my AI run these commands itself?
|
|
176
|
+
|
|
177
|
+
Yes — and it should, for the read-only ones. Your AI has a terminal. Tell it to run `mindlink summary` or `mindlink status` and it reads the output directly. This is the cleanest way to brief a mid-session agent without copying files around.
|
|
178
|
+
|
|
179
|
+
**AI can run:** `status`, `summary`, `log`, `sync --once`
|
|
180
|
+
|
|
181
|
+
**Run yourself:** `init`, `clear`, `reset`, `config`, `export`, `import`, `update`, `uninstall` — these are interactive, change settings, or modify files. Keep human hands on them.
|
|
182
|
+
|
|
183
|
+
The one exception: `mindlink sync` in watch mode runs continuously — keep it in a separate terminal tab.
|
|
184
|
+
|
|
185
|
+
---
|
|
186
|
+
|
|
187
|
+
## The Hook (Claude Code users)
|
|
188
|
+
|
|
189
|
+
Claude Code users get an extra layer: a `UserPromptSubmit` hook in `.claude/settings.json` that fires on every message, reminding your agent to re-read `.brain/` if its context was just compacted. Other agents rely on their instruction files — Claude Code gets both because it supports OS-level hooks. Same protection, different delivery.
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## License
|
|
194
|
+
|
|
195
|
+
MIT — see [LICENSE](LICENSE).
|
|
196
|
+
|
|
197
|
+
---
|
|
198
|
+
|
|
199
|
+
## Contributing
|
|
200
|
+
|
|
201
|
+
Spotted a bug? Have an idea? Open an issue or PR on [GitHub](https://github.com/404-not-found/mindlink). We read everything.
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
# mindlink clear
|
|
2
|
+
|
|
3
|
+
Reset current session state for a fresh start.
|
|
4
|
+
|
|
5
|
+
**Run in your terminal between sessions.** No confirmation needed — it just resets SESSION.md and tells you what it did.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
mindlink clear [--yes]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Description
|
|
18
|
+
|
|
19
|
+
Resets `.brain/SESSION.md` so your AI agent starts the next session with a clean slate. **`MEMORY.md`, `LOG.md`, and `SHARED.md` are not touched** — permanent project facts, session history, and shared context are always preserved.
|
|
20
|
+
|
|
21
|
+
Use this when you want to start a genuinely new task and don't want the agent picking up mid-task state from a previous session.
|
|
22
|
+
|
|
23
|
+
Not what you need? See:
|
|
24
|
+
- [`mindlink reset`](reset.md) — wipe ALL memory back to blank (scorched earth)
|
|
25
|
+
- [`mindlink uninstall`](uninstall.md) — remove MindLink from this project entirely
|
|
26
|
+
|
|
27
|
+
---
|
|
28
|
+
|
|
29
|
+
## What Gets Reset vs Preserved
|
|
30
|
+
|
|
31
|
+
| File | Action |
|
|
32
|
+
|---|---|
|
|
33
|
+
| `.brain/SESSION.md` | Reset to empty template |
|
|
34
|
+
| `.brain/MEMORY.md` | Untouched — permanent facts preserved |
|
|
35
|
+
| `.brain/LOG.md` | Untouched — full history preserved |
|
|
36
|
+
| `.brain/SHARED.md` | Untouched — shared context preserved |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Options
|
|
41
|
+
|
|
42
|
+
| Flag | Description |
|
|
43
|
+
|---|---|
|
|
44
|
+
| `--yes`, `-y` | Skip the confirmation prompt |
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## Examples
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
mindlink clear
|
|
52
|
+
mindlink clear --yes
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Output
|
|
58
|
+
|
|
59
|
+
```
|
|
60
|
+
? This will reset SESSION.md for a fresh session start.
|
|
61
|
+
MEMORY.md and LOG.md are untouched.
|
|
62
|
+
|
|
63
|
+
❯ Yes, clear session
|
|
64
|
+
Cancel
|
|
65
|
+
|
|
66
|
+
✓ SESSION.md cleared. Ready for a clean session.
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Related Commands
|
|
72
|
+
|
|
73
|
+
- [`mindlink status`](status.md) — check what's currently in SESSION.md before clearing
|
|
74
|
+
- [`mindlink log`](log.md) — view past session history
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# mindlink config
|
|
2
|
+
|
|
3
|
+
Change settings for the current project after init.
|
|
4
|
+
|
|
5
|
+
**Run in your terminal — this opens an interactive menu.** Not suitable for AI to run on your behalf.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
mindlink config
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Description
|
|
18
|
+
|
|
19
|
+
Opens an interactive menu to change any setting that was configured during `mindlink init`. All settings are stored in `.brain/` and scoped to the current project path.
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Settings
|
|
24
|
+
|
|
25
|
+
### Git tracking
|
|
26
|
+
|
|
27
|
+
Controls whether `.brain/` is committed to git or ignored.
|
|
28
|
+
|
|
29
|
+
| Option | What it does |
|
|
30
|
+
|---|---|
|
|
31
|
+
| Enable | Removes `.brain/` from `.gitignore`. Your team shares the same AI memory. |
|
|
32
|
+
| Disable | Adds `.brain/` to `.gitignore`. Memory stays on your machine only. |
|
|
33
|
+
|
|
34
|
+
### Auto-sync
|
|
35
|
+
|
|
36
|
+
Controls whether `mindlink sync` runs automatically in the background.
|
|
37
|
+
|
|
38
|
+
| Option | What it does |
|
|
39
|
+
|---|---|
|
|
40
|
+
| Enable | Sync runs automatically. Sessions stay in sync without manual intervention. |
|
|
41
|
+
| Disable | You run `mindlink sync` manually when you want to sync. |
|
|
42
|
+
|
|
43
|
+
### Agent instruction files
|
|
44
|
+
|
|
45
|
+
Add or remove agent instruction files for this project. Same multi-select menu as `mindlink init`.
|
|
46
|
+
|
|
47
|
+
Selecting an agent that isn't already set up generates its instruction file.
|
|
48
|
+
Deselecting an agent that exists prompts you to confirm before deleting the file.
|
|
49
|
+
|
|
50
|
+
---
|
|
51
|
+
|
|
52
|
+
## Examples
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
mindlink config
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
|
|
60
|
+
## Interactive Menu
|
|
61
|
+
|
|
62
|
+
```
|
|
63
|
+
Current settings · /Users/yuanhong/projects/my-app
|
|
64
|
+
|
|
65
|
+
Git tracking : enabled (team shares memory)
|
|
66
|
+
Auto-sync : enabled (watch mode)
|
|
67
|
+
Agent files : CLAUDE.md, CURSOR.md, AGENTS.md ...
|
|
68
|
+
|
|
69
|
+
? What would you like to change?
|
|
70
|
+
❯ Git tracking
|
|
71
|
+
Auto-sync
|
|
72
|
+
Agent instruction files
|
|
73
|
+
Exit
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Related Commands
|
|
79
|
+
|
|
80
|
+
- [`mindlink init`](init.md) — initial setup (first time only)
|
|
81
|
+
- [`mindlink sync`](sync.md) — manually run sync
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# mindlink doctor
|
|
2
|
+
|
|
3
|
+
Check that your MindLink setup is healthy.
|
|
4
|
+
|
|
5
|
+
**Run in your terminal.** Use this when something feels off, after a fresh `import`, or just to verify everything is wired up correctly.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
mindlink doctor
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Description
|
|
18
|
+
|
|
19
|
+
Runs a series of checks on your project's MindLink setup and reports any problems. Exits with code 1 if any critical issues are found, 0 if everything is healthy (warnings are allowed).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## What Gets Checked
|
|
24
|
+
|
|
25
|
+
| Check | What it looks for |
|
|
26
|
+
|---|---|
|
|
27
|
+
| `.brain/` | Exists in the current directory |
|
|
28
|
+
| `config.json` | Present and valid JSON |
|
|
29
|
+
| `MEMORY.md` | Core section has content; warns if getting too long |
|
|
30
|
+
| `SESSION.md` | Has content and shows when it was last updated |
|
|
31
|
+
| `LOG.md` | Session count, last session date, how far back history goes |
|
|
32
|
+
| Agent files | Each configured agent's instruction file exists |
|
|
33
|
+
| Claude hook | `.claude/settings.json` hook is present and valid |
|
|
34
|
+
|
|
35
|
+
---
|
|
36
|
+
|
|
37
|
+
## Output
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
◉ MindLink Doctor
|
|
41
|
+
/Users/yuanhong/my-app
|
|
42
|
+
|
|
43
|
+
✓ .brain/ found
|
|
44
|
+
✓ config.json valid
|
|
45
|
+
✓ MEMORY.md Core has content
|
|
46
|
+
✓ SESSION.md — updated 2 hours ago
|
|
47
|
+
✓ LOG.md — 12 sessions logged (last: Apr 10, 2026, going back to: Jan 5, 2026)
|
|
48
|
+
✓ CLAUDE.md — Claude Code
|
|
49
|
+
✓ CURSOR.md — Cursor
|
|
50
|
+
✓ .claude/settings.json — UserPromptSubmit hook active
|
|
51
|
+
· .brain/ is committed to git (shared team memory)
|
|
52
|
+
|
|
53
|
+
All good. Your AI has a healthy brain.
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Warning example
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
! MEMORY.md Core is getting long
|
|
60
|
+
Consider asking your AI to consolidate — Core is read on every session start.
|
|
61
|
+
|
|
62
|
+
1 warning, no critical issues. Your AI will still work.
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Failure example
|
|
66
|
+
|
|
67
|
+
```
|
|
68
|
+
✗ MEMORY.md missing
|
|
69
|
+
Run mindlink init to recreate it.
|
|
70
|
+
|
|
71
|
+
1 problem found — fix the issues above and re-run mindlink doctor.
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
---
|
|
75
|
+
|
|
76
|
+
## Exit Codes
|
|
77
|
+
|
|
78
|
+
| Code | Meaning |
|
|
79
|
+
|---|---|
|
|
80
|
+
| `0` | Healthy (warnings allowed) |
|
|
81
|
+
| `1` | One or more critical problems found |
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## When to Run
|
|
86
|
+
|
|
87
|
+
- After `mindlink import` — verify the import landed correctly
|
|
88
|
+
- When your AI seems confused or isn't reading context — check the agent files
|
|
89
|
+
- On a new machine after cloning — make sure instruction files are in place
|
|
90
|
+
- Periodically to catch drift before it becomes a problem
|
|
91
|
+
|
|
92
|
+
---
|
|
93
|
+
|
|
94
|
+
## Related Commands
|
|
95
|
+
|
|
96
|
+
- [`mindlink init`](init.md) — set up MindLink (fixes most failures doctor finds)
|
|
97
|
+
- [`mindlink config`](config.md) — change agents or settings
|
|
98
|
+
- [`mindlink status`](status.md) — see what your AI knows right now
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# mindlink export
|
|
2
|
+
|
|
3
|
+
Export your project's AI memory to a shareable zip file.
|
|
4
|
+
|
|
5
|
+
**Run in your terminal.** The zip can be shared with teammates, used as a backup, or imported into another machine.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
mindlink export [--output <path>] [--include-agents]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Description
|
|
18
|
+
|
|
19
|
+
Packages your `.brain/` folder into a zip file named `{project}-brain-{date}.zip`. You can share this zip with anyone — they import it with `mindlink import` and their AI agent wakes up knowing everything your project knows.
|
|
20
|
+
|
|
21
|
+
If you run this interactively (no `--output` flag), MindLink asks where to save the file.
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Use Cases
|
|
26
|
+
|
|
27
|
+
**Onboard a new teammate**
|
|
28
|
+
```bash
|
|
29
|
+
mindlink export --output ~/Desktop
|
|
30
|
+
# Send them: my-app-brain-2026-04-10.zip
|
|
31
|
+
# They run: mindlink import my-app-brain-2026-04-10.zip
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Back up before a reset**
|
|
35
|
+
```bash
|
|
36
|
+
mindlink export --output ~/backups
|
|
37
|
+
mindlink reset
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**Share context with a consultant**
|
|
41
|
+
```bash
|
|
42
|
+
mindlink export --include-agents --output ~/Desktop
|
|
43
|
+
# They get the memory AND the agent instruction files
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## What Gets Exported
|
|
49
|
+
|
|
50
|
+
| File | Included |
|
|
51
|
+
|---|---|
|
|
52
|
+
| `.brain/MEMORY.md` | ✓ always |
|
|
53
|
+
| `.brain/SESSION.md` | ✓ always |
|
|
54
|
+
| `.brain/SHARED.md` | ✓ always |
|
|
55
|
+
| `.brain/LOG.md` | ✓ always |
|
|
56
|
+
| `.brain/LOG-*.md` (archives) | ✓ always |
|
|
57
|
+
| `CLAUDE.md`, `CURSOR.md`, etc. | Only with `--include-agents` |
|
|
58
|
+
| `.brain/config.json` | ✗ never (machine-specific) |
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## Options
|
|
63
|
+
|
|
64
|
+
| Flag | Description |
|
|
65
|
+
|---|---|
|
|
66
|
+
| `--output <path>` | Directory or full `.zip` path to save the file |
|
|
67
|
+
| `--include-agents` | Also include agent instruction files |
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## Output
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
✓ .brain/MEMORY.md
|
|
75
|
+
✓ .brain/SESSION.md
|
|
76
|
+
✓ .brain/SHARED.md
|
|
77
|
+
✓ .brain/LOG.md
|
|
78
|
+
|
|
79
|
+
✓ Exported to: /Users/yuanhong/Desktop/my-app-brain-2026-04-10.zip
|
|
80
|
+
|
|
81
|
+
To import on another machine or project:
|
|
82
|
+
mindlink import my-app-brain-2026-04-10.zip
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## Related Commands
|
|
88
|
+
|
|
89
|
+
- [`mindlink import`](import.md) — import a zip into the current project
|
|
90
|
+
- [`mindlink reset`](reset.md) — wipe memory (export first if you want a backup)
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# mindlink import
|
|
2
|
+
|
|
3
|
+
Import a MindLink memory zip into the current project.
|
|
4
|
+
|
|
5
|
+
**Run in your terminal.** Takes a `.zip` exported by `mindlink export` and extracts it into `.brain/`.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Synopsis
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
mindlink import <file.zip> [--yes]
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Description
|
|
18
|
+
|
|
19
|
+
Extracts a zip created by `mindlink export` into the current project's `.brain/` folder. If `.brain/` already exists, you choose whether to merge (keep your current memory, add what's missing) or overwrite (replace everything with the imported version).
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Use Cases
|
|
24
|
+
|
|
25
|
+
**Onboard on a new machine**
|
|
26
|
+
```bash
|
|
27
|
+
# Copy the zip to the new machine, then:
|
|
28
|
+
mindlink import my-app-brain-2026-04-10.zip
|
|
29
|
+
# Your AI agent wakes up fully briefed on the first session
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
**Accept a colleague's memory**
|
|
33
|
+
```bash
|
|
34
|
+
mindlink import colleague-brain-2026-04-10.zip
|
|
35
|
+
# Choose Merge to keep your work and add what they know
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
**Restore from backup**
|
|
39
|
+
```bash
|
|
40
|
+
mindlink import ~/backups/my-app-brain-2026-04-01.zip --yes
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Options
|
|
46
|
+
|
|
47
|
+
| Flag | Description |
|
|
48
|
+
|---|---|
|
|
49
|
+
| `--yes`, `-y` | Skip confirmation, overwrite existing memory |
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
53
|
+
## Merge vs Overwrite
|
|
54
|
+
|
|
55
|
+
When `.brain/` already exists:
|
|
56
|
+
|
|
57
|
+
| Mode | What happens |
|
|
58
|
+
|---|---|
|
|
59
|
+
| **Merge** | Only imports files that don't exist locally. Your current memory is kept. |
|
|
60
|
+
| **Overwrite** | Replaces all `.brain/` files with the imported versions. |
|
|
61
|
+
|
|
62
|
+
---
|
|
63
|
+
|
|
64
|
+
## Output
|
|
65
|
+
|
|
66
|
+
```
|
|
67
|
+
✓ .brain/MEMORY.md
|
|
68
|
+
✓ .brain/SESSION.md
|
|
69
|
+
✓ .brain/SHARED.md
|
|
70
|
+
✓ .brain/LOG.md
|
|
71
|
+
|
|
72
|
+
✓ Memory imported. Your AI will wake up fully briefed.
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Related Commands
|
|
78
|
+
|
|
79
|
+
- [`mindlink export`](export.md) — create a zip to share or back up
|
|
80
|
+
- [`mindlink init`](init.md) — set up agent instruction files after importing
|