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.
@@ -0,0 +1,81 @@
1
+ # MindLink CLI Reference
2
+
3
+ > Full command reference for the MindLink CLI.
4
+ > Each command page includes synopsis, options, output examples, and error cases.
5
+
6
+ ---
7
+
8
+ ## Commands
9
+
10
+ Commands are grouped by when and how you run them.
11
+
12
+ ### Run once — in your terminal, before first AI session
13
+
14
+ | Command | Description |
15
+ |---|---|
16
+ | [init](init.md) | Set up `.brain/` memory for the current project |
17
+
18
+ ### Ask your AI to run — or run yourself in any terminal
19
+
20
+ | Command | Description |
21
+ |---|---|
22
+ | [status](status.md) | Show last session summary and what's next |
23
+ | [summary](summary.md) | Full briefing — everything MindLink knows, in one view |
24
+ | [log](log.md) | View full session history |
25
+
26
+ ### Keep running in a background terminal tab (while sessions are active)
27
+
28
+ | Command | Description |
29
+ |---|---|
30
+ | [sync](sync.md) | Watch for changes from other sessions and surface them automatically |
31
+
32
+ `mindlink sync` runs in **watch mode by default** — it stays alive and prints a notification whenever another session appends to `.brain/SHARED.md`. Use `--once` to check a single time and exit.
33
+
34
+ ### Run in your terminal between sessions — not via AI
35
+
36
+ These commands are interactive, change settings, or modify files. Keep human hands on them.
37
+
38
+ | Command | Description |
39
+ |---|---|
40
+ | [clear](clear.md) | Reset SESSION.md for a fresh session start (keeps memory and history) |
41
+ | [reset](reset.md) | Wipe all `.brain/` memory back to blank templates |
42
+ | [config](config.md) | Change agents, git tracking, or auto-sync after init |
43
+
44
+ ### Share and backup — run in your terminal
45
+
46
+ | Command | Description |
47
+ |---|---|
48
+ | [export](export.md) | Export `.brain/` memory to a shareable zip |
49
+ | [import](import.md) | Import a zip into the current project |
50
+
51
+ ### Maintenance — run in your terminal only
52
+
53
+ | Command | Description |
54
+ |---|---|
55
+ | [update](update.md) | Check for a newer version — never installs without asking |
56
+ | [uninstall](uninstall.md) | Remove MindLink from the current project |
57
+
58
+ ---
59
+
60
+ ## Global Flags
61
+
62
+ These flags work on every command.
63
+
64
+ | Flag | Description |
65
+ |---|---|
66
+ | `--help`, `-h` | Show help for the command |
67
+ | `--version`, `-v` | Show the installed version |
68
+ | `--yes`, `-y` | Skip confirmation prompts (where supported) |
69
+ | `--json` | Output as JSON (status, summary, log) |
70
+ | `--no-progress` | Disable progress bars (useful in scripts and CI) |
71
+
72
+ ---
73
+
74
+ ## Getting Help
75
+
76
+ ```bash
77
+ mindlink --help
78
+ mindlink <command> --help
79
+ ```
80
+
81
+ Every command's `--help` shows a synopsis, all flags, examples, and what gets removed/changed.
@@ -0,0 +1,124 @@
1
+ # mindlink init
2
+
3
+ Set up memory for the current project.
4
+
5
+ ---
6
+
7
+ ## Synopsis
8
+
9
+ ```bash
10
+ mindlink init [--yes]
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Description
16
+
17
+ Creates a `.brain/` folder in the current directory and generates agent instruction files for the AI agents you select. Memory is scoped to the **absolute path** of this directory — run `mindlink init` separately in each project you want to give memory.
18
+
19
+ **Run this before starting your AI session.** The agent reads the instruction files on startup. If you init after a session has already started, the current session won't see it — the next one will.
20
+
21
+ ---
22
+
23
+ ## What Gets Created
24
+
25
+ ```
26
+ your-project/
27
+ ├── .brain/
28
+ │ ├── MEMORY.md ← permanent facts: project identity, architecture, decisions
29
+ │ ├── SESSION.md ← current session state, updated as you work
30
+ │ ├── SHARED.md ← shared context readable and writable by any session
31
+ │ └── LOG.md ← full history of every session ever run
32
+ ├── CLAUDE.md ← Claude Code instruction file (if selected)
33
+ ├── CURSOR.md ← Cursor instruction file (if selected)
34
+ ├── AGENTS.md ← Codex / OpenAI instruction file (if selected)
35
+ ├── GEMINI.md ← Gemini CLI instruction file (if selected)
36
+ └── ... ← other agent files based on your selection
37
+ ```
38
+
39
+ ---
40
+
41
+ ## Interactive Prompts
42
+
43
+ `mindlink init` walks you through three choices.
44
+
45
+ ### 1. Which AI agents do you use?
46
+
47
+ Select the agents you use in this project. MindLink generates the right instruction file for each one.
48
+
49
+ | Agent | File generated |
50
+ |---|---|
51
+ | Claude Code | `CLAUDE.md` |
52
+ | Cursor | `CURSOR.md` |
53
+ | Codex / OpenAI | `AGENTS.md` |
54
+ | Gemini CLI | `GEMINI.md` |
55
+ | GitHub Copilot | `.github/copilot-instructions.md` |
56
+ | Windsurf | `.windsurfrules` |
57
+ | Cline | `.clinerules` |
58
+ | Aider | `CONVENTIONS.md` |
59
+ | Add custom agent | file name of your choice |
60
+
61
+ **To change this later:** `mindlink config` → Agent instruction files
62
+
63
+ ### 2. Should .brain/ be tracked by git?
64
+
65
+ | Choice | What it means |
66
+ |---|---|
67
+ | Enable (commit to git) | Your whole team shares the same AI memory. Decisions, context, and history are tracked alongside code. |
68
+ | Disable (add to .gitignore) | Memory stays on your machine only. Teammates don't see it. |
69
+
70
+ **To change this later:** `mindlink config` → Git tracking
71
+
72
+ ### 3. Auto-sync between sessions?
73
+
74
+ | Choice | What it means |
75
+ |---|---|
76
+ | Enable (watch mode) | `mindlink sync` runs automatically in the background, keeping all sessions in sync as they write. |
77
+ | Disable (manual) | Run `mindlink sync` yourself when you want to sync. |
78
+
79
+ **To change this later:** `mindlink config` → Auto-sync
80
+
81
+ ---
82
+
83
+ ## Options
84
+
85
+ | Flag | Description |
86
+ |---|---|
87
+ | `--yes`, `-y` | Skip all prompts and use defaults (all agents selected, git enabled, auto-sync enabled) |
88
+
89
+ ---
90
+
91
+ ## Examples
92
+
93
+ **Standard setup with interactive prompts:**
94
+ ```bash
95
+ cd my-project
96
+ mindlink init
97
+ ```
98
+
99
+ **Non-interactive setup (CI or scripting):**
100
+ ```bash
101
+ mindlink init --yes
102
+ ```
103
+
104
+ ---
105
+
106
+ ## Already Initialized
107
+
108
+ If `.brain/` already exists, `mindlink init` shows a recovery menu instead of an error:
109
+
110
+ ```
111
+ .brain/ already exists at this path. What would you like to do?
112
+ ❯ Change settings mindlink config
113
+ View current status mindlink status
114
+ Nothing — exit
115
+ ```
116
+
117
+ With `--yes`, exits immediately and tells you to run `mindlink config` to change settings.
118
+
119
+ ---
120
+
121
+ ## Related Commands
122
+
123
+ - [`mindlink config`](config.md) — change any setting made during init
124
+ - [`mindlink status`](status.md) — check current memory state
@@ -0,0 +1,65 @@
1
+ # mindlink log
2
+
3
+ View full session history.
4
+
5
+ ---
6
+
7
+ ## Synopsis
8
+
9
+ ```bash
10
+ mindlink log [--all] [--limit <n>] [--since <date>] [--json]
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Description
16
+
17
+ Prints the contents of `.brain/LOG.md` in a readable format. Shows the last 10 sessions by default. Each entry is a summary of what was done in that session, appended automatically by your AI agent at the end of each session.
18
+
19
+ ---
20
+
21
+ ## Options
22
+
23
+ | Flag | Description |
24
+ |---|---|
25
+ | `--all` | Show the full history instead of the last 10 sessions |
26
+ | `--limit <n>` | Show the last N sessions (default: 10) |
27
+ | `--since <date>` | Show sessions from a specific date forward |
28
+ | `--json` | Output as JSON for scripting or tool integration |
29
+
30
+ ---
31
+
32
+ ## Examples
33
+
34
+ ```bash
35
+ mindlink log # last 10 sessions
36
+ mindlink log --all # full history
37
+ mindlink log --limit 20 # last 20 sessions
38
+ mindlink log --since "Apr 1" # sessions from April 1 onward
39
+ mindlink log --json # machine-readable output
40
+ ```
41
+
42
+ ---
43
+
44
+ ## Output
45
+
46
+ ```
47
+ Showing last 10 sessions · mindlink log --all to see everything
48
+
49
+ ── Apr 9, 2026 ──────────────────────────────────
50
+ Scaffolded auth module, fixed login redirect bug,
51
+ decided on JWT over sessions.
52
+
53
+ ── Apr 8, 2026 ──────────────────────────────────
54
+ Set up project structure, defined DB schema,
55
+ decided on Postgres over MySQL.
56
+
57
+ ...8 more sessions
58
+ ```
59
+
60
+ ---
61
+
62
+ ## Related Commands
63
+
64
+ - [`mindlink status`](status.md) — quick summary of the last session only
65
+ - [`mindlink clear`](clear.md) — reset current session state
@@ -0,0 +1,81 @@
1
+ # mindlink reset
2
+
3
+ Wipe all `.brain/` memory files and start completely fresh.
4
+
5
+ **Run in your terminal, between sessions — not via AI.** This is a destructive operation; always prompts for confirmation first.
6
+
7
+ ---
8
+
9
+ ## Synopsis
10
+
11
+ ```bash
12
+ mindlink reset [--yes]
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Description
18
+
19
+ Resets all four `.brain/` memory files — `MEMORY.md`, `SESSION.md`, `SHARED.md`, and `LOG.md` — back to blank templates. Your settings (`config.json`) and agent instruction files (e.g. `CLAUDE.md`, `CURSOR.md`) are untouched.
20
+
21
+ Use this when the project direction has fundamentally changed and you want your AI to start with no prior context. For simply starting a new work session, use [`mindlink clear`](clear.md) instead.
22
+
23
+ Not what you need? See:
24
+ - [`mindlink clear`](clear.md) — reset SESSION.md only (lighter option, keeps all history)
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/MEMORY.md` | Reset to blank template |
34
+ | `.brain/SESSION.md` | Reset to blank template |
35
+ | `.brain/SHARED.md` | Reset to blank template |
36
+ | `.brain/LOG.md` | Reset to blank template |
37
+ | `.brain/config.json` | Untouched — settings preserved |
38
+ | Agent files (CLAUDE.md etc.) | Untouched — instruction files preserved |
39
+
40
+ ---
41
+
42
+ ## Options
43
+
44
+ | Flag | Description |
45
+ |---|---|
46
+ | `--yes`, `-y` | Skip the confirmation prompt |
47
+
48
+ ---
49
+
50
+ ## Examples
51
+
52
+ ```bash
53
+ mindlink reset
54
+ mindlink reset --yes
55
+ ```
56
+
57
+ ---
58
+
59
+ ## Output
60
+
61
+ ```
62
+ ! This will wipe all .brain/ memory files and start fresh.
63
+ MEMORY.md, SESSION.md, SHARED.md, and LOG.md will be reset to blank templates.
64
+ Your settings and agent files are untouched.
65
+
66
+ This cannot be undone (unless .brain/ is tracked by git).
67
+
68
+ ❯ Yes, reset everything
69
+ Cancel
70
+
71
+ ✓ .brain/ reset. All memory files are blank.
72
+ Your AI will wake up with no memory of past sessions.
73
+ ```
74
+
75
+ ---
76
+
77
+ ## Related Commands
78
+
79
+ - [`mindlink clear`](clear.md) — lighter reset, SESSION.md only
80
+ - [`mindlink init`](init.md) — set up a project from scratch
81
+ - [`mindlink status`](status.md) — check current memory before resetting
@@ -0,0 +1,76 @@
1
+ # mindlink status
2
+
3
+ Show last session summary and what's next.
4
+
5
+ ---
6
+
7
+ ## Synopsis
8
+
9
+ ```bash
10
+ mindlink status [--json]
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Description
16
+
17
+ Reads `.brain/SESSION.md` and `.brain/LOG.md` and surfaces the most relevant context from your last session: what was completed, what's coming up next, and basic memory stats.
18
+
19
+ Useful at the start of a session to quickly orient yourself before opening an AI agent.
20
+
21
+ ---
22
+
23
+ ## Output
24
+
25
+ ```
26
+ Last session — Apr 9, 2026
27
+
28
+ Completed
29
+ ✓ Scaffolded auth module
30
+ ✓ Fixed login redirect bug
31
+ ✓ Decided: use JWT, not sessions
32
+
33
+ Up next
34
+ → Write tests for auth middleware
35
+ → Hook up password reset flow
36
+
37
+ Memory stats
38
+ Sessions logged : 4
39
+ Decisions made : 7
40
+ Last updated : 2 hours ago
41
+
42
+ Run mindlink log to see full history.
43
+ ```
44
+
45
+ ---
46
+
47
+ ## Options
48
+
49
+ | Flag | Description |
50
+ |---|---|
51
+ | `--json` | Output as JSON for scripting or tool integration |
52
+
53
+ ---
54
+
55
+ ## Examples
56
+
57
+ ```bash
58
+ mindlink status
59
+ mindlink status --json
60
+ ```
61
+
62
+ ---
63
+
64
+ ## Error: Not Initialized
65
+
66
+ ```
67
+ ✗ No .brain/ found in this directory.
68
+ Run mindlink init to get started.
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Related Commands
74
+
75
+ - [`mindlink log`](log.md) — view full session history
76
+ - [`mindlink init`](init.md) — set up memory for this project
@@ -0,0 +1,89 @@
1
+ # mindlink summary
2
+
3
+ Show a full briefing of everything MindLink knows about this project.
4
+
5
+ ---
6
+
7
+ ## Synopsis
8
+
9
+ ```bash
10
+ mindlink summary [--json]
11
+ ```
12
+
13
+ ---
14
+
15
+ ## Description
16
+
17
+ Reads all four `.brain/` files and surfaces everything in one view: project identity, architecture, decisions, current session state, what other sessions have shared, and recent history.
18
+
19
+ Your AI agent can run this itself — just tell it `mindlink summary` and it reads the output directly. This is the cleanest way to brief a mid-session agent without copying files around.
20
+
21
+ ---
22
+
23
+ ## Output
24
+
25
+ ```
26
+ ◉ MindLink — Full Briefing
27
+
28
+ Project Overview
29
+ ────────────────
30
+ A todo app built with Next.js and Postgres.
31
+
32
+ Current Session
33
+ ───────────────
34
+ Task: Build the login page
35
+ In progress: Auth form, JWT middleware
36
+ Blockers: None
37
+ Up next: Password reset flow
38
+
39
+ Shared Context
40
+ ──────────────
41
+ Session A found: use Postgres over SQLite — better for concurrent writes.
42
+
43
+ Recent History (last 3 sessions)
44
+ ─────────────────────────────────
45
+ [Apr 9] Scaffolded auth module. Decided: JWT over sessions.
46
+ [Apr 8] Set up database schema. Added migrations.
47
+ [Apr 7] Project started. Chose Next.js + Postgres stack.
48
+
49
+ Powered by MindLink — github.com/404-not-found/mindlink
50
+ ```
51
+
52
+ ---
53
+
54
+ ## Options
55
+
56
+ | Flag | Description |
57
+ |---|---|
58
+ | `--json` | Output as JSON with keys: `project`, `session`, `log`, `shared` |
59
+
60
+ ---
61
+
62
+ ## Examples
63
+
64
+ ```bash
65
+ mindlink summary
66
+ mindlink summary --json
67
+ ```
68
+
69
+ Ask your AI agent to run it:
70
+ ```
71
+ Run mindlink summary and brief me on where we left off.
72
+ ```
73
+
74
+ ---
75
+
76
+ ## Error: Not Initialized
77
+
78
+ ```
79
+ ✗ No .brain/ found in this directory.
80
+ Run mindlink init to get started.
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Related Commands
86
+
87
+ - [`mindlink status`](status.md) — lighter-weight last-session view
88
+ - [`mindlink log`](log.md) — full session history
89
+ - [`mindlink init`](init.md) — set up memory for this project
@@ -0,0 +1,96 @@
1
+ # mindlink sync
2
+
3
+ Watch for shared context written by other sessions and surface it automatically.
4
+
5
+ **Run this in a dedicated background terminal tab** while your AI sessions are active. It stays running until you stop it (Ctrl+C).
6
+
7
+ ---
8
+
9
+ ## Synopsis
10
+
11
+ ```bash
12
+ mindlink sync [--once] [--no-progress]
13
+ ```
14
+
15
+ ---
16
+
17
+ ## What "watch mode" means
18
+
19
+ **Watch mode is the default** — when you run `mindlink sync` with no flags, the process stays alive. It watches `.brain/SHARED.md` for any new content written by other sessions in this project. The moment another session appends a discovery or decision, sync detects the change and prints a notification so you know to tell your AI to check `SHARED.md`.
20
+
21
+ This is designed to run in a separate terminal tab alongside your AI session, not as a one-shot command.
22
+
23
+ **`--once`** runs a single check and exits — useful when you just want to see what's been shared so far without keeping a watcher running.
24
+
25
+ If you enabled auto-sync during `mindlink init`, sync runs automatically in the background — you don't need to run this manually.
26
+
27
+ ---
28
+
29
+ ## Options
30
+
31
+ | Flag | Description |
32
+ |---|---|
33
+ | `--once` | Sync once and exit instead of watching continuously |
34
+ | `--no-progress` | Suppress progress output (useful in scripts) |
35
+
36
+ ---
37
+
38
+ ## Examples
39
+
40
+ **Watch mode (default) — runs until you stop it:**
41
+ ```bash
42
+ mindlink sync
43
+ ```
44
+
45
+ **Sync once and exit:**
46
+ ```bash
47
+ mindlink sync --once
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Output
53
+
54
+ **Watch mode:**
55
+ ```
56
+ Watching for changes... (Ctrl+C to stop)
57
+
58
+ [Apr 9 14:32] Session A wrote 3 new entries → synced ✓
59
+ [Apr 9 14:45] Session B wrote 1 new entry → synced ✓
60
+ ```
61
+
62
+ **Single run:**
63
+ ```
64
+ Syncing shared context...
65
+
66
+ Session A → 3 new entries
67
+ Session B → 1 new entry
68
+
69
+ [████████████████████] 100%
70
+
71
+ ✓ SHARED.md merged. Both sessions are now in sync.
72
+ ```
73
+
74
+ **Nothing to sync:**
75
+ ```
76
+ ✓ Already in sync. No new entries to merge.
77
+ ```
78
+
79
+ ---
80
+
81
+ ## Changing Auto-Sync Setting
82
+
83
+ To enable or disable auto-sync (set during `mindlink init`):
84
+
85
+ ```bash
86
+ mindlink config
87
+ ```
88
+
89
+ Select **Auto-sync** from the menu.
90
+
91
+ ---
92
+
93
+ ## Related Commands
94
+
95
+ - [`mindlink config`](config.md) — enable or disable auto-sync
96
+ - [`mindlink status`](status.md) — check current session state
@@ -0,0 +1,88 @@
1
+ # mindlink uninstall
2
+
3
+ Remove MindLink from the current project.
4
+
5
+ **Run in your terminal only** — this permanently removes files. Always prompts for confirmation first.
6
+
7
+ ---
8
+
9
+ ## Synopsis
10
+
11
+ ```bash
12
+ mindlink uninstall [--yes]
13
+ ```
14
+
15
+ ---
16
+
17
+ ## Description
18
+
19
+ Removes everything MindLink created in this project directory:
20
+
21
+ - `.brain/` folder and all memory files inside it
22
+ - Agent instruction files (`CLAUDE.md`, `CURSOR.md`, etc.) that were created during `mindlink init`
23
+ - `.claude/settings.json` hook (if Claude was one of the configured agents)
24
+
25
+ The MindLink CLI itself is **not** removed. To uninstall the CLI globally:
26
+
27
+ ```bash
28
+ npm uninstall -g mindlink
29
+ ```
30
+
31
+ MindLink reads `config.json` inside `.brain/` to know which agent files to remove. If config is unreadable, it removes all known agent files as a safe default.
32
+
33
+ ---
34
+
35
+ ## Options
36
+
37
+ | Flag | Description |
38
+ |---|---|
39
+ | `--yes`, `-y` | Skip confirmation and remove everything immediately |
40
+
41
+ ---
42
+
43
+ ## Examples
44
+
45
+ ```bash
46
+ mindlink uninstall # interactive — shows what will be removed, asks to confirm
47
+ mindlink uninstall --yes # skip confirmation (useful in scripts)
48
+ ```
49
+
50
+ ---
51
+
52
+ ## What Gets Removed
53
+
54
+ ```
55
+ .brain/ (all memory files)
56
+ CLAUDE.md (if Claude was configured)
57
+ CURSOR.md (if Cursor was configured)
58
+ AGENTS.md (if Codex was configured)
59
+ GEMINI.md (if Gemini was configured)
60
+ .github/copilot-instructions.md (if Copilot was configured)
61
+ .windsurfrules (if Windsurf was configured)
62
+ .clinerules (if Cline was configured)
63
+ CONVENTIONS.md (if Aider was configured)
64
+ .claude/settings.json (if Claude was configured)
65
+ ```
66
+
67
+ ---
68
+
69
+ ## What Stays
70
+
71
+ - The mindlink CLI itself
72
+ - Any files MindLink did not create
73
+
74
+ ---
75
+
76
+ ## Error: Not Initialized
77
+
78
+ ```
79
+ ✗ No .brain/ found in this directory.
80
+ Nothing to uninstall here.
81
+ ```
82
+
83
+ ---
84
+
85
+ ## Related Commands
86
+
87
+ - [`mindlink init`](init.md) — set up memory for this project
88
+ - [`mindlink reset`](reset.md) — wipe memory but keep MindLink installed