@dtoolkit/dbrain 0.2.1 → 0.2.2

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.
Files changed (2) hide show
  1. package/README.md +26 -89
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,33 +1,34 @@
1
1
  <p align="center">
2
- <img src="logo.png" alt="dbrain" width="600">
2
+ <img src="logo.png" alt="dbrain" />
3
3
  </p>
4
4
 
5
+ <h1 align="center">@dtoolkit/dbrain</h1>
6
+ <p align="center">Your distributed mind. Persistent knowledge across all your AIs.</p>
7
+
5
8
  <p align="center">
6
- <a href="https://www.npmjs.com/package/dbrain"><img src="https://img.shields.io/npm/v/dbrain?style=for-the-badge" alt="npm"></a>
7
- <a href="LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" alt="License"></a>
8
- <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D20-green?style=for-the-badge" alt="Node"></a>
9
+ <a href="https://www.npmjs.com/package/@dtoolkit/dbrain"><img src="https://img.shields.io/npm/v/@dtoolkit/dbrain.svg" alt="npm"></a>
10
+ <a href="../../LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License"></a>
9
11
  </p>
10
12
 
11
- ---
12
-
13
- Every AI conversation starts from zero. Switch machines, switch apps, and your AI forgets everything. **dbrain** fixes that.
14
-
15
13
  Install it once, connect every AI you use — Claude Code at home, Claude Code at work, Gemini on your phone. All share the same identity, the same memories, the same knowledge.
16
14
 
17
15
  ```
18
16
  [Home] Claude Code ──MCP──┐
19
17
  [Work] Claude Code ──MCP──┤ ┌─────────────────────────────────┐
20
18
  [Mobile] Gemini ──REST──────┼────→│ dbrain (your mind) │
21
- [Server] OpenClaw ──REST────┤ │ identity + memory + knowledge.
19
+ [Server] OpenClaw ──REST────┤ │ identity + memory + knowledge
22
20
  [Other] Custom AI ──API────┘ └─────────────────────────────────┘
23
21
  ```
24
22
 
25
- Not an AI agent. Not an assistant. Not a model. **Just memory** — structured, searchable, persistent.
23
+ ## Install
24
+
25
+ ```bash
26
+ npm install -g @dtoolkit/dbrain
27
+ ```
26
28
 
27
- ## Quick Start
29
+ ## Quick start
28
30
 
29
31
  ```bash
30
- npm install -g dbrain
31
32
  dbrain init # interactive wizard — creates DB, config, identity
32
33
  dbrain start # starts API on :7878 + dashboard on :7879
33
34
  ```
@@ -38,46 +39,9 @@ Then connect Claude Code from any machine:
38
39
  dbrain connect claude
39
40
  ```
40
41
 
41
- The wizard asks for the brain URL and token (shown during `init`):
42
-
43
- ```
44
- ┌ dbrain — Connect to a brain
45
-
46
- ◇ Brain URL
47
- │ http://localhost:7878
48
-
49
- ◇ Access token
50
- │ sk-dbr_...
51
-
52
- ◇ Brain found
53
-
54
- ● Brain: dBrain — 2 entities, 0 facts
55
-
56
- ◇ Claude Code configured
57
-
58
- ◇ Files updated ──────────────────────────────────────────────╮
59
- │ │
60
- │ ~/.claude.json MCP server registered │
61
- │ ~/.claude/settings.json Permissions granted │
62
- │ ~/.claude/CLAUDE.md Behavioral instructions installed │
63
- │ │
64
- ├──────────────────────────────────────────────────────────────╯
65
-
66
- └ Connected. Restart Claude Code to activate.
67
- ```
68
-
69
- Restart Claude Code and it will start using the brain. You can also skip the wizard:
70
-
71
- ```bash
72
- dbrain connect claude http://your-server:7878 --token=sk-dbr_...
73
- ```
74
-
75
42
  ## Docker
76
43
 
77
44
  ```bash
78
- git clone https://github.com/ivncmp/dbrain.git
79
- cd dbrain
80
- cp .env.example .env # edit token, names, port
81
45
  docker compose up -d
82
46
  ```
83
47
 
@@ -87,7 +51,7 @@ Then from any client machine:
87
51
  dbrain connect claude http://your-server:7878
88
52
  ```
89
53
 
90
- ## How It Works
54
+ ## How it works
91
55
 
92
56
  The brain has 4 layers:
93
57
 
@@ -98,7 +62,7 @@ The brain has 4 layers:
98
62
  | **Knowledge** | Structured facts organized by PARA | `entities` + `facts` tables with hot/warm/cold tiers |
99
63
  | **Recall** | Full-text search over all facts | FTS5 with OR logic for multi-language queries |
100
64
 
101
- ### Memory Tiers
65
+ ### Memory tiers
102
66
 
103
67
  Memories fade if you don't use them — like a real brain.
104
68
 
@@ -108,11 +72,7 @@ Memories fade if you don't use them — like a real brain.
108
72
  | **warm** | 8–30 days since last access |
109
73
  | **cold** | > 30 days — fading, candidate for archival |
110
74
 
111
- Every search bumps accessed facts back to hot. The brain stays sharp on what matters.
112
-
113
- ## MCP Tools
114
-
115
- Available to any MCP client (Claude Code, etc.):
75
+ ## MCP tools
116
76
 
117
77
  | Tool | Purpose |
118
78
  | --------------- | ------------------------------------------- |
@@ -142,20 +102,18 @@ All endpoints require `Authorization: Bearer <token>` except `/health`.
142
102
  | `POST` | `/search` | Full-text search over all facts |
143
103
  | `GET` | `/memory/summary` | Overview: entities x tiers |
144
104
 
145
- ## CLI Commands
146
-
147
- | Command | Where | Purpose |
148
- | ---------------------- | ------ | ----------------------------------------- |
149
- | `dbrain init [path]` | Server | Create a new brain (DB, config, identity) |
150
- | `dbrain start [path]` | Server | Start the API server + dashboard |
151
- | `dbrain connect <client> [url]` | Client | Connect a client to a running brain |
152
- | `dbrain status [path]` | Server | Check brain status |
105
+ ## CLI commands
153
106
 
154
- `init` runs on the **server** (creates the brain). `connect` runs on the **client** (configures Claude Code). The brain serves its own client config via `GET /connect`.
107
+ | Command | Where | Purpose |
108
+ | -------------------------------- | ------ | ----------------------------------------- |
109
+ | `dbrain init [path]` | Server | Create a new brain (DB, config, identity) |
110
+ | `dbrain start [path]` | Server | Start the API server + dashboard |
111
+ | `dbrain connect <client> [url]` | Client | Connect a client to a running brain |
112
+ | `dbrain status [path]` | Server | Check brain status |
155
113
 
156
114
  ## Dashboard
157
115
 
158
- Web dashboard on port `7879`. Shows brain stats, entities with PARA categories, fact tiers, conversations, and full-text search. Single-file React app — no build step.
116
+ Web dashboard on port `7879`. Shows brain stats, entities with PARA categories, fact tiers, conversations, and full-text search.
159
117
 
160
118
  ## Stack
161
119
 
@@ -169,28 +127,7 @@ Web dashboard on port `7879`. Shows brain stats, entities with PARA categories,
169
127
  | CLI | @clack/prompts |
170
128
  | Dashboard | React 18 (CDN, no build step) |
171
129
 
172
- ## Development
173
-
174
- ```bash
175
- git clone https://github.com/ivncmp/dbrain.git
176
- cd dbrain
177
- npm install # installs deps + builds (prepare script)
178
- npx dbrain init # create a brain (only needed once)
179
- npm run dev # starts the server with file watching
180
- ```
181
-
182
- | Script | What it does |
183
- | -------------------- | ---------------------------------------- |
184
- | `npm run dev` | Dev server with file watching (tsx) |
185
- | `npm run build` | Compile TypeScript + copy dashboard HTML |
186
- | `npm start` | Start the compiled server from `dist/` |
187
- | `npm test` | Run tests with vitest |
188
- | `npm run lint` | ESLint check |
189
- | `npm run lint:fix` | ESLint auto-fix |
190
- | `npm run format` | Prettier format |
191
- | `npm run check` | Lint + format + build (full pipeline) |
192
-
193
- ## Environment Variables
130
+ ## Environment variables
194
131
 
195
132
  For non-interactive setup (Docker, CI):
196
133
 
@@ -206,4 +143,4 @@ For non-interactive setup (Docker, CI):
206
143
 
207
144
  ## License
208
145
 
209
- [MIT](LICENSE)
146
+ [MIT](../../LICENSE)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dtoolkit/dbrain",
3
- "version": "0.2.1",
3
+ "version": "0.2.2",
4
4
  "description": "Your distributed mind. Persistent knowledge across all your AIs.",
5
5
  "type": "module",
6
6
  "license": "MIT",