@geminilight/mindos 0.5.44 → 0.5.45
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 +42 -257
- package/README_zh.md +43 -261
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
<p align="center">
|
|
16
16
|
<a href="https://tianfuwang.tech/MindOS"><img src="https://img.shields.io/badge/Website-MindOS-0ea5e9.svg?style=for-the-badge" alt="Website"></a>
|
|
17
17
|
<a href="https://www.npmjs.com/package/@geminilight/mindos"><img src="https://img.shields.io/npm/v/@geminilight/mindos.svg?style=for-the-badge&color=f59e0b" alt="npm version"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/@geminilight/mindos"><img src="https://img.shields.io/npm/dw/@geminilight/mindos.svg?style=for-the-badge&color=10b981" alt="npm downloads"></a>
|
|
19
|
+
<a href="https://github.com/GeminiLight/MindOS/stargazers"><img src="https://img.shields.io/github/stars/GeminiLight/MindOS.svg?style=for-the-badge&color=f59e0b" alt="GitHub Stars"></a>
|
|
18
20
|
<a href="#wechat"><img src="https://img.shields.io/badge/WeChat-Group-07C160.svg?style=for-the-badge&logo=wechat&logoColor=white" alt="WeChat"></a>
|
|
19
21
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-6366f1.svg?style=for-the-badge" alt="MIT License"></a>
|
|
20
22
|
</p>
|
|
@@ -84,14 +86,15 @@ All that experience from your conversations — gone the moment you close the wi
|
|
|
84
86
|
|
|
85
87
|
- **Security**: Bearer Token auth, path sandboxing, INSTRUCTION.md write-protection, atomic writes.
|
|
86
88
|
- **Knowledge Graph**: dynamically parses and visualizes inter-file references and dependencies.
|
|
89
|
+
- **Backlinks View**: displays all files that reference the current file, helping you understand how a note fits into the knowledge network.
|
|
87
90
|
- **Git Time Machine**: Git auto-sync (commit/push/pull), records every edit by both humans and Agents. One-click rollback, cross-device sync.
|
|
91
|
+
- **Desktop App**: native macOS/Windows/Linux app with system tray, auto-start, and local process management.
|
|
88
92
|
|
|
89
93
|
<details>
|
|
90
94
|
<summary><strong>Coming Soon</strong></summary>
|
|
91
95
|
|
|
92
96
|
- [ ] ACP (Agent Communication Protocol): connect external Agents (e.g., Claude Code, Cursor) and turn the knowledge base into a multi-Agent collaboration hub
|
|
93
97
|
- [ ] Deep RAG integration: retrieval-augmented generation grounded in your knowledge base for more accurate, context-aware AI responses
|
|
94
|
-
- [ ] Backlinks View: display all files that reference the current file, helping you understand how a note fits into the knowledge network
|
|
95
98
|
- [ ] Agent Inspector: render Agent operation logs as a filterable timeline to audit every tool call in detail
|
|
96
99
|
|
|
97
100
|
</details>
|
|
@@ -131,84 +134,10 @@ npm link # registers the `mindos` command globally
|
|
|
131
134
|
mindos onboard
|
|
132
135
|
```
|
|
133
136
|
|
|
134
|
-
The setup wizard
|
|
135
|
-
1. Knowledge base path → default `~/MindOS`
|
|
136
|
-
2. Choose template (en / zh / empty / custom)
|
|
137
|
-
3. Ports (Web UI + MCP)
|
|
138
|
-
4. Auth token (auto-generated or passphrase-seeded)
|
|
139
|
-
5. Web UI password (optional)
|
|
140
|
-
6. AI Provider (Anthropic / OpenAI) + API Key — or **skip** to configure later via `mindos config set`
|
|
141
|
-
7. Start mode — **Background service** (recommended, auto-starts on boot) or Foreground
|
|
142
|
-
|
|
143
|
-
Config is saved to `~/.mindos/config.json` automatically.
|
|
144
|
-
|
|
145
|
-
<!-- For Agents: Before running setup, if the user has not provided LLM configuration, ask them:
|
|
146
|
-
1. AI Provider — `anthropic` or `openai` (compatible)?
|
|
147
|
-
2. API Key — the key for the chosen provider
|
|
148
|
-
3. Custom Base URL? — only needed for proxies or OpenAI-compatible endpoints; skip if using official API
|
|
149
|
-
4. Model ID — or use the default
|
|
150
|
-
Or skip the wizard and edit `~/.mindos/config.json` manually (see Config Reference below).
|
|
151
|
-
-->
|
|
152
|
-
|
|
153
|
-
<details>
|
|
154
|
-
<summary>Config Reference (~/.mindos/config.json)</summary>
|
|
155
|
-
|
|
156
|
-
```json
|
|
157
|
-
{
|
|
158
|
-
"mindRoot": "~/MindOS",
|
|
159
|
-
"port": 3456,
|
|
160
|
-
"mcpPort": 8781,
|
|
161
|
-
"authToken": "",
|
|
162
|
-
"webPassword": "",
|
|
163
|
-
"startMode": "daemon",
|
|
164
|
-
"ai": {
|
|
165
|
-
"provider": "anthropic",
|
|
166
|
-
"providers": {
|
|
167
|
-
"anthropic": { "apiKey": "sk-ant-...", "model": "claude-sonnet-4-6" },
|
|
168
|
-
"openai": { "apiKey": "sk-...", "model": "gpt-5.4", "baseUrl": "" }
|
|
169
|
-
}
|
|
170
|
-
},
|
|
171
|
-
"sync": {
|
|
172
|
-
"enabled": true,
|
|
173
|
-
"provider": "git",
|
|
174
|
-
"remote": "origin",
|
|
175
|
-
"branch": "main",
|
|
176
|
-
"autoCommitInterval": 30,
|
|
177
|
-
"autoPullInterval": 300
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
```
|
|
181
|
-
|
|
182
|
-
| Field | Default | Description |
|
|
183
|
-
| :--- | :--- | :--- |
|
|
184
|
-
| `mindRoot` | `~/MindOS` | **Required**. Absolute path to the knowledge base root. |
|
|
185
|
-
| `port` | `3456` | Optional. Web app port. |
|
|
186
|
-
| `mcpPort` | `8781` | Optional. MCP server port. |
|
|
187
|
-
| `authToken` | — | Optional. Protects App `/api/*` and MCP `/mcp` with bearer token auth. For Agent / MCP clients. Recommended when exposed to a network. |
|
|
188
|
-
| `webPassword` | — | Optional. Protects the web UI with a login page. For browser access. Independent from `authToken`. |
|
|
189
|
-
| `startMode` | `start` | Start mode: `daemon` (background service, auto-starts on boot), `start` (foreground), or `dev`. |
|
|
190
|
-
| `ai.provider` | `anthropic` | Active provider: `anthropic` or `openai`. |
|
|
191
|
-
| `ai.providers.anthropic.apiKey` | — | Anthropic API key. |
|
|
192
|
-
| `ai.providers.anthropic.model` | `claude-sonnet-4-6` | Anthropic model ID. |
|
|
193
|
-
| `ai.providers.openai.apiKey` | — | OpenAI API key. |
|
|
194
|
-
| `ai.providers.openai.model` | `gpt-5.4` | OpenAI model ID. |
|
|
195
|
-
| `ai.providers.openai.baseUrl` | — | Optional. Custom endpoint for proxy or OpenAI-compatible APIs. |
|
|
196
|
-
| `sync.enabled` | `false` | Enable/disable automatic Git sync. |
|
|
197
|
-
| `sync.provider` | `git` | Sync provider (currently only `git`). |
|
|
198
|
-
| `sync.remote` | `origin` | Git remote name. |
|
|
199
|
-
| `sync.branch` | `main` | Git branch to sync. |
|
|
200
|
-
| `sync.autoCommitInterval` | `30` | Seconds after file change to auto-commit+push. |
|
|
201
|
-
| `sync.autoPullInterval` | `300` | Seconds between auto-pull from remote. |
|
|
202
|
-
|
|
203
|
-
Multiple providers can be configured simultaneously — switch between them by changing `ai.provider`. Shell env vars (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc.) take precedence over config file values.
|
|
204
|
-
|
|
205
|
-
</details>
|
|
206
|
-
|
|
207
|
-
> [!NOTE]
|
|
208
|
-
> If you want the MindOS GUI to be reachable from other devices, make sure the port is open in firewall/security-group settings and bound to an accessible host/network interface.
|
|
137
|
+
The setup wizard guides you through knowledge base path, template, ports, auth, AI provider, and start mode — all with sensible defaults. Config is saved to `~/.mindos/config.json`. See **[docs/en/configuration.md](docs/en/configuration.md)** for all fields.
|
|
209
138
|
|
|
210
139
|
> [!TIP]
|
|
211
|
-
>
|
|
140
|
+
> Choose "Background service" during onboard for auto-start on boot. Run `mindos update` anytime to upgrade.
|
|
212
141
|
|
|
213
142
|
Open the Web UI in your browser:
|
|
214
143
|
|
|
@@ -228,124 +157,24 @@ mindos open
|
|
|
228
157
|
|
|
229
158
|
### 4. Make Any Agent Ready (MCP + Skills)
|
|
230
159
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<!-- For Agents: Register MindOS MCP as global (user-level) config by default, so all projects share the same knowledge base. -->
|
|
234
|
-
|
|
235
|
-
Run one command to auto-install MCP config into your Agent:
|
|
160
|
+
**MCP** (connection) — one command to auto-install:
|
|
236
161
|
|
|
237
162
|
```bash
|
|
238
|
-
mindos mcp install
|
|
163
|
+
mindos mcp install # interactive
|
|
164
|
+
mindos mcp install -g -y # one-shot, global scope
|
|
239
165
|
```
|
|
240
166
|
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
**Local (Agent and MindOS on the same machine)**
|
|
244
|
-
|
|
245
|
-
Use `stdio` transport — no server process needed, most reliable:
|
|
167
|
+
**Skills** (workflow) — install one based on your language:
|
|
246
168
|
|
|
247
169
|
```bash
|
|
248
|
-
#
|
|
249
|
-
mindos
|
|
250
|
-
|
|
251
|
-
# One-shot, global scope (shared across all projects)
|
|
252
|
-
mindos mcp install -g -y
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
**Remote (Agent on a different machine)**
|
|
256
|
-
|
|
257
|
-
Use `http` transport — MindOS must be running (`mindos start`) on the remote machine:
|
|
258
|
-
|
|
259
|
-
```bash
|
|
260
|
-
mindos mcp install--transport http --url http://<server-ip>:8781/mcp --token your-token -g
|
|
261
|
-
```
|
|
262
|
-
|
|
263
|
-
> [!NOTE]
|
|
264
|
-
> For remote access, ensure port `8781` is open in your firewall/security-group.
|
|
265
|
-
|
|
266
|
-
> Add `-g` to install globally — MCP config is shared across all projects instead of the current directory only.
|
|
267
|
-
|
|
268
|
-
> The MCP port defaults to `8781`. To use a different port, run `mindos onboard` and set `mcpPort`.
|
|
269
|
-
|
|
270
|
-
<details>
|
|
271
|
-
<summary>Manual config (JSON snippets)</summary>
|
|
272
|
-
|
|
273
|
-
**Local via stdio** (no server process needed):
|
|
274
|
-
|
|
275
|
-
```json
|
|
276
|
-
{
|
|
277
|
-
"mcpServers": {
|
|
278
|
-
"mindos": {
|
|
279
|
-
"type": "stdio",
|
|
280
|
-
"command": "mindos",
|
|
281
|
-
"args": ["mcp"],
|
|
282
|
-
"env": { "MCP_TRANSPORT": "stdio" }
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
```
|
|
287
|
-
|
|
288
|
-
**Local via URL:**
|
|
289
|
-
|
|
290
|
-
```json
|
|
291
|
-
{
|
|
292
|
-
"mcpServers": {
|
|
293
|
-
"mindos": {
|
|
294
|
-
"url": "http://localhost:8781/mcp",
|
|
295
|
-
"headers": { "Authorization": "Bearer your-token" }
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
```
|
|
300
|
-
|
|
301
|
-
**Remote:**
|
|
302
|
-
|
|
303
|
-
```json
|
|
304
|
-
{
|
|
305
|
-
"mcpServers": {
|
|
306
|
-
"mindos": {
|
|
307
|
-
"url": "http://<server-ip>:8781/mcp",
|
|
308
|
-
"headers": { "Authorization": "Bearer your-token" }
|
|
309
|
-
}
|
|
310
|
-
}
|
|
311
|
-
}
|
|
170
|
+
npx skills add https://github.com/GeminiLight/MindOS --skill mindos -g -y # English
|
|
171
|
+
npx skills add https://github.com/GeminiLight/MindOS --skill mindos-zh -g -y # Chinese
|
|
312
172
|
```
|
|
313
173
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
</details>
|
|
317
|
-
|
|
318
|
-
#### 4.2 Install MindOS Skills
|
|
319
|
-
|
|
320
|
-
| Skill | Description |
|
|
321
|
-
|-------|-------------|
|
|
322
|
-
| `mindos` | Knowledge base operation guide (English) — read/write notes, search, manage SOPs, maintain Profiles |
|
|
323
|
-
| `mindos-zh` | Knowledge base operation guide (Chinese) — same capabilities, Chinese interface |
|
|
324
|
-
|
|
325
|
-
Install one skill only (choose based on your preferred language):
|
|
326
|
-
|
|
327
|
-
```bash
|
|
328
|
-
# English
|
|
329
|
-
npx skills add https://github.com/GeminiLight/MindOS --skill mindos -g -y
|
|
330
|
-
|
|
331
|
-
# Chinese (optional)
|
|
332
|
-
npx skills add https://github.com/GeminiLight/MindOS --skill mindos-zh -g -y
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
MCP = connection capability, Skills = workflow capability. Enabling both gives the complete MindOS agent experience.
|
|
336
|
-
|
|
337
|
-
#### 4.3 Common Pitfalls
|
|
338
|
-
|
|
339
|
-
- Only MCP, no Skills: tools are callable, but best-practice workflows are missing.
|
|
340
|
-
- Only Skills, no MCP: workflow guidance exists, but the Agent cannot operate your local knowledge base.
|
|
341
|
-
- `MIND_ROOT` is not an absolute path: MCP tool calls will fail.
|
|
342
|
-
- No `authToken` set: your API and MCP server are exposed on the network without protection.
|
|
343
|
-
- No `webPassword` set: anyone who can reach your server can access the web UI.
|
|
174
|
+
> For remote access, manual JSON config, and common pitfalls, see **[docs/en/supported-agents.md](docs/en/supported-agents.md)**.
|
|
344
175
|
|
|
345
176
|
## ⚙️ How It Works
|
|
346
177
|
|
|
347
|
-
A fleeting idea becomes shared intelligence through three interlocking loops:
|
|
348
|
-
|
|
349
178
|
```mermaid
|
|
350
179
|
graph LR
|
|
351
180
|
H["👤 Human<br/><sub>thinks · reviews · evolves</sub>"]
|
|
@@ -367,42 +196,30 @@ graph LR
|
|
|
367
196
|
|
|
368
197
|
> **Both sides evolve.** Humans gain new insights from accumulated knowledge; Agents extract SOPs and get smarter. MindOS sits at the center — the shared second brain that grows with every interaction.
|
|
369
198
|
|
|
370
|
-
**Collaboration Loop (Human + Multi-Agent)**
|
|
371
|
-
|
|
372
|
-
1. Human reviews and updates notes/SOPs in the MindOS GUI (single source of truth).
|
|
373
|
-
2. Other Agent clients (OpenClaw, Claude Code, Cursor, etc.) connect through MCP and read the same memory/context.
|
|
374
|
-
3. With Skills enabled, those Agents execute workflows and SOP tasks in a guided way.
|
|
375
|
-
4. Execution results are written back to MindOS so humans can audit and refine continuously.
|
|
376
|
-
|
|
377
|
-
**Who is this for?**
|
|
378
|
-
|
|
379
|
-
- **Independent Developer** — Store personal SOPs, tech stack preferences, and project context in MindOS. Any Agent instantly inherits your work habits.
|
|
380
|
-
- **Knowledge Worker** — Manage research materials with bi-directional links. Your AI assistant answers questions grounded in your full context, not generic knowledge.
|
|
381
|
-
- **Team Collaboration** — Share a MindOS knowledge base across team members as a single source of truth. Humans and Agents read from the same playbook, keeping everyone aligned.
|
|
382
|
-
- **Automated Agent Operations** — Write standard workflows as Agent-Ready documents. Agents execute directly, humans audit the results.
|
|
383
|
-
|
|
384
199
|
---
|
|
385
200
|
|
|
386
201
|
## 🤝 Supported Agents
|
|
387
202
|
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
|
391
|
-
|
|
392
|
-
|
|
|
393
|
-
|
|
|
394
|
-
|
|
|
395
|
-
|
|
|
396
|
-
|
|
|
397
|
-
|
|
|
398
|
-
|
|
|
399
|
-
|
|
|
400
|
-
|
|
|
401
|
-
|
|
|
203
|
+
> Full list with MCP config paths and manual setup: **[docs/en/supported-agents.md](docs/en/supported-agents.md)**
|
|
204
|
+
|
|
205
|
+
| Agent | MCP | Skills |
|
|
206
|
+
|:------|:---:|:------:|
|
|
207
|
+
| MindOS Agent | ✅ | ✅ |
|
|
208
|
+
| OpenClaw | ✅ | ✅ |
|
|
209
|
+
| Claude Desktop / Code | ✅ | ✅ |
|
|
210
|
+
| CodeBuddy | ✅ | ✅ |
|
|
211
|
+
| Cursor | ✅ | ✅ |
|
|
212
|
+
| Windsurf | ✅ | ✅ |
|
|
213
|
+
| Cline | ✅ | ✅ |
|
|
214
|
+
| Trae | ✅ | ✅ |
|
|
215
|
+
| Gemini CLI | ✅ | ✅ |
|
|
216
|
+
| GitHub Copilot | ✅ | ✅ |
|
|
217
|
+
| iFlow | ✅ | ✅ |
|
|
402
218
|
|
|
403
219
|
---
|
|
404
220
|
|
|
405
|
-
|
|
221
|
+
<details>
|
|
222
|
+
<summary><strong>📁 Project Structure</strong></summary>
|
|
406
223
|
|
|
407
224
|
```bash
|
|
408
225
|
MindOS/
|
|
@@ -420,56 +237,24 @@ MindOS/
|
|
|
420
237
|
└── mind/ # Your private knowledge base (default: ~/MindOS/mind, customizable on onboard)
|
|
421
238
|
```
|
|
422
239
|
|
|
423
|
-
|
|
240
|
+
</details>
|
|
424
241
|
|
|
425
242
|
## ⌨️ CLI Commands
|
|
426
243
|
|
|
244
|
+
> Full command reference: **[docs/en/cli-commands.md](docs/en/cli-commands.md)**
|
|
245
|
+
|
|
427
246
|
| Command | Description |
|
|
428
247
|
| :--- | :--- |
|
|
429
248
|
| `mindos onboard` | Interactive setup (config, template, start mode) |
|
|
430
|
-
| `mindos start` | Start app + MCP server (foreground
|
|
431
|
-
| `mindos start --daemon` |
|
|
432
|
-
| `mindos
|
|
433
|
-
| `mindos
|
|
434
|
-
| `mindos
|
|
435
|
-
| `mindos
|
|
436
|
-
| `mindos
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
| `mindos token` | Show auth token and per-agent MCP config snippets |
|
|
440
|
-
| `mindos sync` | Show sync status (alias for `sync status`) |
|
|
441
|
-
| `mindos sync init` | Interactive setup for Git remote sync |
|
|
442
|
-
| `mindos sync status` | Show sync status: last sync, unpushed commits, conflicts |
|
|
443
|
-
| `mindos sync now` | Manually trigger a full sync (commit + push + pull) |
|
|
444
|
-
| `mindos sync on` | Enable automatic sync |
|
|
445
|
-
| `mindos sync off` | Disable automatic sync |
|
|
446
|
-
| `mindos sync conflicts` | List unresolved conflict files |
|
|
447
|
-
| `mindos gateway install` | Install background service (systemd on Linux, LaunchAgent on macOS) |
|
|
448
|
-
| `mindos gateway uninstall` | Remove background service |
|
|
449
|
-
| `mindos gateway start` | Start the background service |
|
|
450
|
-
| `mindos gateway stop` | Stop the background service |
|
|
451
|
-
| `mindos gateway status` | Show background service status |
|
|
452
|
-
| `mindos gateway logs` | Tail background service logs |
|
|
453
|
-
| `mindos doctor` | Health check (config, ports, build, daemon status) |
|
|
454
|
-
| `mindos update` | Update MindOS to the latest version |
|
|
455
|
-
| `mindos uninstall` | Fully uninstall MindOS (stop, remove daemon, npm uninstall) |
|
|
456
|
-
| `mindos logs` | Tail service logs (`~/.mindos/mindos.log`) |
|
|
457
|
-
| `mindos config show` | Print current config (API keys masked) |
|
|
458
|
-
| `mindos config validate` | Validate config file |
|
|
459
|
-
| `mindos config set <key> <val>` | Update a single config field |
|
|
460
|
-
| `mindos` | Start using the mode saved in `~/.mindos/config.json` |
|
|
461
|
-
|
|
462
|
-
---
|
|
463
|
-
|
|
464
|
-
## ⌨️ Keyboard Shortcuts
|
|
465
|
-
|
|
466
|
-
| Shortcut | Function |
|
|
467
|
-
| :--- | :--- |
|
|
468
|
-
| `⌘ + K` | Global Search |
|
|
469
|
-
| `⌘ + /` | Call AI Assistant / Sidebar |
|
|
470
|
-
| `E` | Press `E` in View mode to quickly enter Edit mode |
|
|
471
|
-
| `⌘ + S` | Save current edit |
|
|
472
|
-
| `Esc` | Cancel edit / Close dialog |
|
|
249
|
+
| `mindos start` | Start app + MCP server (foreground) |
|
|
250
|
+
| `mindos start --daemon` | Start as background OS service |
|
|
251
|
+
| `mindos open` | Open Web UI in browser |
|
|
252
|
+
| `mindos mcp install` | Auto-install MCP config into your Agent |
|
|
253
|
+
| `mindos sync init` | Setup Git remote sync |
|
|
254
|
+
| `mindos update` | Update to latest version |
|
|
255
|
+
| `mindos doctor` | Health check |
|
|
256
|
+
|
|
257
|
+
**Keyboard shortcuts:** `⌘K` Search · `⌘/` AI Assistant · `E` Edit · `⌘S` Save · `Esc` Close
|
|
473
258
|
|
|
474
259
|
---
|
|
475
260
|
|
package/README_zh.md
CHANGED
|
@@ -15,6 +15,8 @@
|
|
|
15
15
|
<p align="center">
|
|
16
16
|
<a href="https://tianfuwang.tech/MindOS"><img src="https://img.shields.io/badge/Website-MindOS-0ea5e9.svg?style=for-the-badge" alt="Website"></a>
|
|
17
17
|
<a href="https://www.npmjs.com/package/@geminilight/mindos"><img src="https://img.shields.io/npm/v/@geminilight/mindos.svg?style=for-the-badge&color=f59e0b" alt="npm version"></a>
|
|
18
|
+
<a href="https://www.npmjs.com/package/@geminilight/mindos"><img src="https://img.shields.io/npm/dw/@geminilight/mindos.svg?style=for-the-badge&color=10b981" alt="npm downloads"></a>
|
|
19
|
+
<a href="https://github.com/GeminiLight/MindOS/stargazers"><img src="https://img.shields.io/github/stars/GeminiLight/MindOS.svg?style=for-the-badge&color=f59e0b" alt="GitHub Stars"></a>
|
|
18
20
|
<a href="#wechat"><img src="https://img.shields.io/badge/WeChat-群聊-07C160.svg?style=for-the-badge&logo=wechat&logoColor=white" alt="WeChat"></a>
|
|
19
21
|
<a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-6366f1.svg?style=for-the-badge" alt="MIT License"></a>
|
|
20
22
|
</p>
|
|
@@ -84,14 +86,15 @@ Agent 记了什么、记对没有,用户无从知晓。**MindOS 将每次读
|
|
|
84
86
|
|
|
85
87
|
- **安全防线**:Bearer Token 认证、路径沙箱、INSTRUCTION.md 写保护、原子写入。
|
|
86
88
|
- **知识图谱**:动态解析并可视化文件间的引用与依赖关系。
|
|
89
|
+
- **反向链接视图**:展示所有引用当前文件的反向链接,理解笔记在知识网络中的位置。
|
|
87
90
|
- **Git 时光机**:Git 自动同步(commit/push/pull),记录人类与 Agent 的每次编辑历史,一键回滚,跨设备同步。
|
|
91
|
+
- **桌面客户端**:原生 macOS/Windows/Linux 应用,系统托盘、开机自启、本地进程管理。
|
|
88
92
|
|
|
89
93
|
<details>
|
|
90
94
|
<summary><strong>即将到来</strong></summary>
|
|
91
95
|
|
|
92
96
|
- [ ] ACP(Agent Communication Protocol):连接外部 Agent(如 Claude Code、Cursor),让知识库成为多 Agent 协作的中枢
|
|
93
97
|
- [ ] RAG 深度集成:基于知识库内容的检索增强生成,让 AI 回答更精准、更有上下文
|
|
94
|
-
- [ ] 反向链接视图(Backlinks):展示所有引用当前文件的反向链接,理解笔记在知识网络中的位置
|
|
95
98
|
- [ ] Agent 审计面板(Agent Inspector):将 Agent 操作日志渲染为可筛选的时间线,审查每次工具调用的详情
|
|
96
99
|
|
|
97
100
|
</details>
|
|
@@ -128,89 +131,13 @@ npm link # 将 mindos 命令注册为全局命令
|
|
|
128
131
|
### 2. 交互式配置
|
|
129
132
|
|
|
130
133
|
```bash
|
|
131
|
-
mindos onboard
|
|
134
|
+
mindos onboard
|
|
132
135
|
```
|
|
133
136
|
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
配置向导将引导你完成:
|
|
137
|
-
1. 知识库路径 → 默认 `~/MindOS`
|
|
138
|
-
2. 选择模板(en / zh / empty / custom)
|
|
139
|
-
3. 端口配置(Web UI + MCP)
|
|
140
|
-
4. Auth token(自动生成或口令派生)
|
|
141
|
-
5. Web UI 访问密码(可选)
|
|
142
|
-
6. 配置 AI Provider(Anthropic / OpenAI)+ API Key — 或选择 **skip**,稍后通过 `mindos config set` 补填
|
|
143
|
-
7. 启动模式 — **后台服务**(推荐,开机自启)或前台运行
|
|
144
|
-
|
|
145
|
-
配置自动保存到 `~/.mindos/config.json`。
|
|
146
|
-
|
|
147
|
-
<!-- For Agents: 运行 onboard 前,如果用户未提供 LLM 配置,请询问:
|
|
148
|
-
1. AI Provider — `anthropic` 还是 `openai`(兼容)?
|
|
149
|
-
2. API Key — 对应 Provider 的密钥
|
|
150
|
-
3. 自定义 Base URL?— 仅代理或 OpenAI 兼容端点需要;使用官方 API 则跳过
|
|
151
|
-
4. Model ID — 或使用默认值
|
|
152
|
-
或跳过向导,手动编辑 `~/.mindos/config.json`(参考下方配置参考)。
|
|
153
|
-
-->
|
|
154
|
-
|
|
155
|
-
<details>
|
|
156
|
-
<summary>配置参考(~/.mindos/config.json)</summary>
|
|
157
|
-
|
|
158
|
-
```json
|
|
159
|
-
{
|
|
160
|
-
"mindRoot": "~/MindOS",
|
|
161
|
-
"port": 3456,
|
|
162
|
-
"mcpPort": 8781,
|
|
163
|
-
"authToken": "",
|
|
164
|
-
"webPassword": "",
|
|
165
|
-
"startMode": "daemon",
|
|
166
|
-
"ai": {
|
|
167
|
-
"provider": "anthropic",
|
|
168
|
-
"providers": {
|
|
169
|
-
"anthropic": { "apiKey": "sk-ant-...", "model": "claude-sonnet-4-6" },
|
|
170
|
-
"openai": { "apiKey": "sk-...", "model": "gpt-5.4", "baseUrl": "" }
|
|
171
|
-
}
|
|
172
|
-
},
|
|
173
|
-
"sync": {
|
|
174
|
-
"enabled": true,
|
|
175
|
-
"provider": "git",
|
|
176
|
-
"remote": "origin",
|
|
177
|
-
"branch": "main",
|
|
178
|
-
"autoCommitInterval": 30,
|
|
179
|
-
"autoPullInterval": 300
|
|
180
|
-
}
|
|
181
|
-
}
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
| 字段 | 默认值 | 说明 |
|
|
185
|
-
| :--- | :--- | :--- |
|
|
186
|
-
| `mindRoot` | `~/MindOS` | **必填**。知识库根目录的绝对路径 |
|
|
187
|
-
| `port` | `3456` | 可选。Web 服务端口 |
|
|
188
|
-
| `mcpPort` | `8781` | 可选。MCP 服务端口 |
|
|
189
|
-
| `authToken` | — | 可选。保护 App `/api/*` 和 MCP `/mcp` 的 Bearer Token 认证。供 Agent / MCP 客户端使用,暴露到网络时建议设置 |
|
|
190
|
-
| `webPassword` | — | 可选。为 Web UI 添加登录密码保护。供浏览器访问,与 `authToken` 相互独立 |
|
|
191
|
-
| `startMode` | `start` | 启动模式:`daemon`(后台服务,开机自启)、`start`(前台)或 `dev` |
|
|
192
|
-
| `ai.provider` | `anthropic` | 当前使用的 provider:`anthropic` 或 `openai` |
|
|
193
|
-
| `ai.providers.anthropic.apiKey` | — | Anthropic API Key |
|
|
194
|
-
| `ai.providers.anthropic.model` | `claude-sonnet-4-6` | Anthropic 模型 ID |
|
|
195
|
-
| `ai.providers.openai.apiKey` | — | OpenAI API Key |
|
|
196
|
-
| `ai.providers.openai.model` | `gpt-5.4` | OpenAI 模型 ID |
|
|
197
|
-
| `ai.providers.openai.baseUrl` | — | 可选。用于代理或 OpenAI 兼容 API 的自定义接口地址 |
|
|
198
|
-
| `sync.enabled` | `false` | 启用/禁用 Git 自动同步 |
|
|
199
|
-
| `sync.provider` | `git` | 同步方式(目前仅支持 `git`) |
|
|
200
|
-
| `sync.remote` | `origin` | Git 远程仓库名 |
|
|
201
|
-
| `sync.branch` | `main` | 同步分支 |
|
|
202
|
-
| `sync.autoCommitInterval` | `30` | 文件变更后自动 commit+push 的延迟秒数 |
|
|
203
|
-
| `sync.autoPullInterval` | `300` | 自动从远程 pull 的间隔秒数 |
|
|
204
|
-
|
|
205
|
-
多个 provider 可以同时配置,切换时只需修改 `ai.provider` 字段,无需重新填写 API Key。Shell 环境变量(`ANTHROPIC_API_KEY`、`OPENAI_API_KEY` 等)优先级高于配置文件。
|
|
206
|
-
|
|
207
|
-
</details>
|
|
208
|
-
|
|
209
|
-
> [!NOTE]
|
|
210
|
-
> 如果你希望其他设备也能访问 MindOS GUI,请确保端口已在防火墙/安全组中放行,并绑定到可访问的主机地址/网卡。
|
|
137
|
+
配置向导会引导你完成知识库路径、模板、端口、认证、AI 服务商、启动模式等配置——所有选项都有合理默认值。配置自动保存到 `~/.mindos/config.json`。完整字段说明见 **[docs/zh/configuration.md](docs/zh/configuration.md)**。
|
|
211
138
|
|
|
212
139
|
> [!TIP]
|
|
213
|
-
>
|
|
140
|
+
> 选择"后台服务"模式可开机自启。随时运行 `mindos update` 升级到最新版本。
|
|
214
141
|
|
|
215
142
|
在浏览器中打开 Web UI:
|
|
216
143
|
|
|
@@ -230,124 +157,24 @@ mindos open
|
|
|
230
157
|
|
|
231
158
|
### 4. 让任意 Agent 可用(MCP + Skills)
|
|
232
159
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
<!-- For Agents: MindOS MCP 默认注册为全局(user-level)配置,使所有项目共享同一知识库。-->
|
|
236
|
-
|
|
237
|
-
一条命令自动将 MCP 配置写入 Agent:
|
|
238
|
-
|
|
239
|
-
```bash
|
|
240
|
-
mindos mcp install
|
|
241
|
-
```
|
|
242
|
-
|
|
243
|
-
支持 Claude Code、Cursor、Windsurf、Cline、Trae、Gemini CLI 等主流 Agent,交互式引导完成 agent、scope、transport 和 token 的配置。
|
|
244
|
-
|
|
245
|
-
**本机访问(Agent 和 MindOS 在同一台机器)**
|
|
246
|
-
|
|
247
|
-
使用 `stdio` transport — 无需启动服务进程,最稳定:
|
|
248
|
-
|
|
249
|
-
```bash
|
|
250
|
-
# 交互式
|
|
251
|
-
mindos mcp install
|
|
252
|
-
|
|
253
|
-
# 一键安装,全局(所有项目共享)
|
|
254
|
-
mindos mcp install -g -y
|
|
255
|
-
```
|
|
256
|
-
|
|
257
|
-
**远程访问(Agent 在另一台机器)**
|
|
258
|
-
|
|
259
|
-
使用 `http` transport — 远程机器上需先运行 `mindos start`:
|
|
160
|
+
**MCP**(连接能力)— 一条命令自动安装:
|
|
260
161
|
|
|
261
162
|
```bash
|
|
262
|
-
mindos mcp install
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
> [!NOTE]
|
|
266
|
-
> 远程访问时,请确保端口 `8781` 已在防火墙/安全组中放行。
|
|
267
|
-
|
|
268
|
-
> 加 `-g` 表示全局安装 — MCP 配置写入用户级配置文件,所有项目共享,而非仅当前目录。
|
|
269
|
-
|
|
270
|
-
> MCP 端口默认为 `8781`。如需修改,运行 `mindos onboard` 设置 `mcpPort`。
|
|
271
|
-
|
|
272
|
-
<details>
|
|
273
|
-
<summary>手动配置(JSON 片段)</summary>
|
|
274
|
-
|
|
275
|
-
**本机 stdio**(无需启动服务进程):
|
|
276
|
-
|
|
277
|
-
```json
|
|
278
|
-
{
|
|
279
|
-
"mcpServers": {
|
|
280
|
-
"mindos": {
|
|
281
|
-
"type": "stdio",
|
|
282
|
-
"command": "mindos",
|
|
283
|
-
"args": ["mcp"],
|
|
284
|
-
"env": { "MCP_TRANSPORT": "stdio" }
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
**本机 URL:**
|
|
291
|
-
|
|
292
|
-
```json
|
|
293
|
-
{
|
|
294
|
-
"mcpServers": {
|
|
295
|
-
"mindos": {
|
|
296
|
-
"url": "http://localhost:8781/mcp",
|
|
297
|
-
"headers": { "Authorization": "Bearer your-token" }
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
}
|
|
163
|
+
mindos mcp install # 交互式
|
|
164
|
+
mindos mcp install -g -y # 一键全局安装
|
|
301
165
|
```
|
|
302
166
|
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
```json
|
|
306
|
-
{
|
|
307
|
-
"mcpServers": {
|
|
308
|
-
"mindos": {
|
|
309
|
-
"url": "http://<服务器IP>:8781/mcp",
|
|
310
|
-
"headers": { "Authorization": "Bearer your-token" }
|
|
311
|
-
}
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
```
|
|
315
|
-
|
|
316
|
-
各 Agent 的配置文件路径不同,详见下方 [支持的 Agent](#-支持的-agent) 表格中的 **MCP 配置文件路径** 列。
|
|
317
|
-
|
|
318
|
-
</details>
|
|
319
|
-
|
|
320
|
-
#### 4.2 安装 MindOS Skills
|
|
321
|
-
|
|
322
|
-
| Skill | 说明 |
|
|
323
|
-
|-------|------|
|
|
324
|
-
| `mindos` | 知识库操作指南(英文)— 读写笔记、搜索、管理 SOP、维护 Profile |
|
|
325
|
-
| `mindos-zh` | 知识库操作指南(中文)— 相同能力,中文交互 |
|
|
326
|
-
|
|
327
|
-
根据你的语言偏好选择其一安装即可:
|
|
167
|
+
**Skills**(工作流能力)— 根据语言偏好选择其一:
|
|
328
168
|
|
|
329
169
|
```bash
|
|
330
|
-
# 英文
|
|
331
|
-
npx skills add https://github.com/GeminiLight/MindOS --skill mindos -g -y
|
|
332
|
-
|
|
333
|
-
# 中文(可选)
|
|
334
|
-
npx skills add https://github.com/GeminiLight/MindOS --skill mindos-zh -g -y
|
|
170
|
+
npx skills add https://github.com/GeminiLight/MindOS --skill mindos -g -y # 英文
|
|
171
|
+
npx skills add https://github.com/GeminiLight/MindOS --skill mindos-zh -g -y # 中文
|
|
335
172
|
```
|
|
336
173
|
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
#### 4.3 常见误区
|
|
340
|
-
|
|
341
|
-
- 只配 MCP,不装 Skills:能调用工具,但缺少最佳实践指引。
|
|
342
|
-
- 只装 Skills,不配 MCP:有流程提示,但无法操作本地知识库。
|
|
343
|
-
- `MIND_ROOT` 不是绝对路径:MCP 工具调用会失败。
|
|
344
|
-
- 未设置 `authToken`:API 和 MCP 服务暴露在网络上,存在安全风险。
|
|
345
|
-
- 未设置 `webPassword`:任何能访问服务器的人都可以打开 Web UI。
|
|
174
|
+
> 远程配置、手动 JSON 片段、常见误区等详见 **[docs/zh/supported-agents.md](docs/zh/supported-agents.md)**。
|
|
346
175
|
|
|
347
176
|
## ⚙️ 运作机制
|
|
348
177
|
|
|
349
|
-
一个零散想法如何变成所有 Agent 共享的智慧——三个联动飞轮:
|
|
350
|
-
|
|
351
178
|
```mermaid
|
|
352
179
|
graph LR
|
|
353
180
|
H["👤 人类<br/><sub>思考 · 审查 · 进化</sub>"]
|
|
@@ -369,42 +196,30 @@ graph LR
|
|
|
369
196
|
|
|
370
197
|
> **双向进化。** 人类从积累的知识中获得新洞察;Agent 提炼 SOP 变得更强。MindOS 居中——随每次交互持续成长的共享第二大脑。
|
|
371
198
|
|
|
372
|
-
**协作闭环(人类 + 多 Agent)**
|
|
373
|
-
|
|
374
|
-
1. 人类在 MindOS GUI 中审阅并更新笔记/SOP(单一事实来源)。
|
|
375
|
-
2. 其他 Agent 客户端(OpenClaw、Claude Code、Cursor 等)通过 MCP 读取同一份记忆与上下文。
|
|
376
|
-
3. 启用 Skills 后,Agent 按工作流指引执行任务与 SOP。
|
|
377
|
-
4. 执行结果回写到 MindOS,供人类持续审查与迭代。
|
|
378
|
-
|
|
379
|
-
**适用人群:**
|
|
380
|
-
|
|
381
|
-
- **AI 独立开发者** — 将个人 SOP、技术栈偏好、项目上下文存入 MindOS,任何 Agent 即插即用你的工作习惯。
|
|
382
|
-
- **知识工作者** — 用双链笔记管理研究资料,AI 助手基于你的完整上下文回答问题,而非泛泛而谈。
|
|
383
|
-
- **团队协作** — 团队成员共享同一个 MindOS 知识库作为 Single Source of Truth,人与 Agent 读同一份剧本,保持对齐。
|
|
384
|
-
- **Agent 自动运维** — 将标准流程写成笔记即指令的文档,Agent 直接执行,人类审计结果。
|
|
385
|
-
|
|
386
199
|
---
|
|
387
200
|
|
|
388
201
|
## 🤝 支持的 Agent
|
|
389
202
|
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
|
393
|
-
|
|
394
|
-
|
|
|
395
|
-
|
|
|
396
|
-
|
|
|
397
|
-
|
|
|
398
|
-
|
|
|
399
|
-
|
|
|
400
|
-
|
|
|
401
|
-
|
|
|
402
|
-
|
|
|
403
|
-
|
|
|
203
|
+
> 完整列表及 MCP 配置路径、手动配置方法:**[docs/zh/supported-agents.md](docs/zh/supported-agents.md)**
|
|
204
|
+
|
|
205
|
+
| Agent | MCP | Skills |
|
|
206
|
+
|:------|:---:|:------:|
|
|
207
|
+
| MindOS Agent | ✅ | ✅ |
|
|
208
|
+
| OpenClaw | ✅ | ✅ |
|
|
209
|
+
| Claude Desktop / Code | ✅ | ✅ |
|
|
210
|
+
| CodeBuddy | ✅ | ✅ |
|
|
211
|
+
| Cursor | ✅ | ✅ |
|
|
212
|
+
| Windsurf | ✅ | ✅ |
|
|
213
|
+
| Cline | ✅ | ✅ |
|
|
214
|
+
| Trae | ✅ | ✅ |
|
|
215
|
+
| Gemini CLI | ✅ | ✅ |
|
|
216
|
+
| GitHub Copilot | ✅ | ✅ |
|
|
217
|
+
| iFlow | ✅ | ✅ |
|
|
404
218
|
|
|
405
219
|
---
|
|
406
220
|
|
|
407
|
-
|
|
221
|
+
<details>
|
|
222
|
+
<summary><strong>📁 项目架构</strong></summary>
|
|
408
223
|
|
|
409
224
|
```bash
|
|
410
225
|
MindOS/
|
|
@@ -422,57 +237,24 @@ MindOS/
|
|
|
422
237
|
└── my-mind/ # 你的私有知识库(默认路径,onboard 时可自定义)
|
|
423
238
|
```
|
|
424
239
|
|
|
425
|
-
|
|
240
|
+
</details>
|
|
426
241
|
|
|
427
242
|
## ⌨️ CLI 命令
|
|
428
243
|
|
|
244
|
+
> 完整命令参考:**[docs/zh/cli-commands.md](docs/zh/cli-commands.md)**
|
|
245
|
+
|
|
429
246
|
| 命令 | 说明 |
|
|
430
247
|
| :--- | :--- |
|
|
431
248
|
| `mindos onboard` | 交互式初始化(生成配置、选择模板) |
|
|
432
|
-
| `mindos
|
|
433
|
-
| `mindos start` |
|
|
434
|
-
| `mindos
|
|
435
|
-
| `mindos
|
|
436
|
-
| `mindos
|
|
437
|
-
| `mindos
|
|
438
|
-
| `mindos
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
| `mindos mcp` | 仅启动 MCP 服务 |
|
|
442
|
-
| `mindos token` | 查看当前 Auth token 及 MCP 配置片段 |
|
|
443
|
-
| `mindos sync` | 查看同步状态(`sync status` 的别名) |
|
|
444
|
-
| `mindos sync init` | 交互式配置 Git 远程同步 |
|
|
445
|
-
| `mindos sync status` | 查看同步状态:最后同步时间、未推送提交、冲突 |
|
|
446
|
-
| `mindos sync now` | 手动触发完整同步(commit + push + pull) |
|
|
447
|
-
| `mindos sync on` | 启用自动同步 |
|
|
448
|
-
| `mindos sync off` | 禁用自动同步 |
|
|
449
|
-
| `mindos sync conflicts` | 列出未解决的冲突文件 |
|
|
450
|
-
| `mindos gateway install` | 安装后台服务(Linux 用 systemd,macOS 用 LaunchAgent) |
|
|
451
|
-
| `mindos gateway uninstall` | 卸载后台服务 |
|
|
452
|
-
| `mindos gateway start` | 启动后台服务 |
|
|
453
|
-
| `mindos gateway stop` | 停止后台服务 |
|
|
454
|
-
| `mindos gateway status` | 查看后台服务状态 |
|
|
455
|
-
| `mindos gateway logs` | 实时查看服务日志 |
|
|
456
|
-
| `mindos doctor` | 健康检查(配置、端口、构建、daemon 状态) |
|
|
457
|
-
| `mindos update` | 更新 MindOS 到最新版本 |
|
|
458
|
-
| `mindos uninstall` | 完整卸载 MindOS(停止进程、移除 daemon、npm 卸载) |
|
|
459
|
-
| `mindos logs` | 实时查看服务日志(`~/.mindos/mindos.log`) |
|
|
460
|
-
| `mindos config show` | 查看当前配置(API Key 脱敏显示) |
|
|
461
|
-
| `mindos config validate` | 验证配置文件 |
|
|
462
|
-
| `mindos config set <key> <val>` | 更新单个配置字段 |
|
|
463
|
-
| `mindos` | 使用 `~/.mindos/config.json` 中保存的模式启动 |
|
|
464
|
-
|
|
465
|
-
---
|
|
466
|
-
|
|
467
|
-
## ⌨️ 快捷键指南
|
|
468
|
-
|
|
469
|
-
| 快捷键 | 功能 |
|
|
470
|
-
| :--- | :--- |
|
|
471
|
-
| `⌘ + K` | 全局搜索知识库 |
|
|
472
|
-
| `⌘ + /` | 唤起 AI 问答 / 侧边栏 |
|
|
473
|
-
| `E` | 在阅读界面按 `E` 快速进入编辑模式 |
|
|
474
|
-
| `⌘ + S` | 保存当前编辑 |
|
|
475
|
-
| `Esc` | 取消编辑 / 关闭弹窗 |
|
|
249
|
+
| `mindos start` | 前台启动 app + MCP 服务 |
|
|
250
|
+
| `mindos start --daemon` | 以后台 OS 服务方式启动 |
|
|
251
|
+
| `mindos open` | 在浏览器中打开 Web UI |
|
|
252
|
+
| `mindos mcp install` | 自动将 MCP 配置写入 Agent |
|
|
253
|
+
| `mindos sync init` | 配置 Git 远程同步 |
|
|
254
|
+
| `mindos update` | 更新到最新版本 |
|
|
255
|
+
| `mindos doctor` | 健康检查 |
|
|
256
|
+
|
|
257
|
+
**快捷键:** `⌘K` 搜索 · `⌘/` AI 助手 · `E` 编辑 · `⌘S` 保存 · `Esc` 关闭
|
|
476
258
|
|
|
477
259
|
---
|
|
478
260
|
|
package/package.json
CHANGED