neuronlayer 0.1.0 → 0.1.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.
- package/README.md +156 -96
- package/dist/index.js +515 -493
- package/package.json +13 -13
- package/src/cli/commands.ts +133 -3
- package/src/index.ts +1 -1
package/README.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
#
|
|
1
|
+
# NeuronLayer
|
|
2
2
|
|
|
3
3
|
**Persistent memory layer for AI coding assistants. Your codebase documents itself.**
|
|
4
4
|
|
|
5
|
+
[](https://www.npmjs.com/package/neuronlayer)
|
|
5
6
|
[](LICENSE)
|
|
6
7
|
[](https://nodejs.org/)
|
|
7
8
|
[](https://modelcontextprotocol.io/)
|
|
@@ -23,7 +24,7 @@ AI coding assistants are powerful but forgetful:
|
|
|
23
24
|
|
|
24
25
|
## The Solution
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
NeuronLayer gives AI assistants persistent, intelligent memory:
|
|
27
28
|
|
|
28
29
|
- **Never forget context** - Decisions, patterns, and history persist across sessions
|
|
29
30
|
- **Self-documenting codebase** - Architecture docs generate automatically
|
|
@@ -33,27 +34,16 @@ MemoryLayer gives AI assistants persistent, intelligent memory:
|
|
|
33
34
|
|
|
34
35
|
---
|
|
35
36
|
|
|
36
|
-
##
|
|
37
|
-
|
|
38
|
-
### Core Features (Free)
|
|
37
|
+
## Compatibility
|
|
39
38
|
|
|
40
|
-
|
|
|
41
|
-
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
| Feature | Description |
|
|
50
|
-
|---------|-------------|
|
|
51
|
-
| **Living Documentation** | Auto-generated architecture docs |
|
|
52
|
-
| **Context Rot Prevention** | Smart compaction keeps AI focused |
|
|
53
|
-
| **Confidence Scoring** | Know when AI is guessing vs confident |
|
|
54
|
-
| **Change Intelligence** | "What changed?" and "Why did it break?" |
|
|
55
|
-
| **Architecture Enforcement** | Suggest existing functions, prevent duplication |
|
|
56
|
-
| **Test-Aware Suggestions** | Predict test failures before they happen |
|
|
39
|
+
| Tool | Supported | Auto-Configure |
|
|
40
|
+
|------|-----------|----------------|
|
|
41
|
+
| Claude Desktop | Yes | `neuronlayer init` |
|
|
42
|
+
| Claude Code (CLI) | Yes | `neuronlayer init` |
|
|
43
|
+
| OpenCode | Yes | `neuronlayer init` |
|
|
44
|
+
| VS Code + Continue | Yes | Manual config |
|
|
45
|
+
| Cursor | Not yet | No MCP support |
|
|
46
|
+
| Any MCP Client | Yes | Manual config |
|
|
57
47
|
|
|
58
48
|
---
|
|
59
49
|
|
|
@@ -62,43 +52,118 @@ MemoryLayer gives AI assistants persistent, intelligent memory:
|
|
|
62
52
|
### Installation
|
|
63
53
|
|
|
64
54
|
```bash
|
|
65
|
-
npm install -g
|
|
55
|
+
npm install -g neuronlayer
|
|
66
56
|
```
|
|
67
57
|
|
|
68
|
-
###
|
|
58
|
+
### One-Command Setup
|
|
69
59
|
|
|
70
|
-
|
|
60
|
+
```bash
|
|
61
|
+
cd your-project
|
|
62
|
+
neuronlayer init
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
That's it! This automatically:
|
|
66
|
+
1. Registers your project
|
|
67
|
+
2. Configures Claude Desktop
|
|
68
|
+
3. Configures OpenCode
|
|
69
|
+
4. Configures Claude Code
|
|
70
|
+
|
|
71
|
+
Just restart your AI tool and NeuronLayer is active.
|
|
72
|
+
|
|
73
|
+
### Output
|
|
74
|
+
|
|
75
|
+
```
|
|
76
|
+
NeuronLayer initialized!
|
|
77
|
+
|
|
78
|
+
Project: my-project
|
|
79
|
+
Path: /home/user/my-project
|
|
80
|
+
Data: ~/.memorylayer/projects/my-project-abc123
|
|
81
|
+
|
|
82
|
+
Configured MCP Clients:
|
|
83
|
+
✓ Claude Desktop: ~/.config/claude/claude_desktop_config.json
|
|
84
|
+
✓ OpenCode: ~/.opencode/config.json
|
|
85
|
+
✓ Claude Code: ~/.claude.json
|
|
86
|
+
|
|
87
|
+
Restart your AI tools to activate.
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
---
|
|
91
|
+
|
|
92
|
+
## Manual Configuration
|
|
93
|
+
|
|
94
|
+
If you prefer manual setup or use a different MCP client:
|
|
95
|
+
|
|
96
|
+
### Claude Desktop
|
|
97
|
+
|
|
98
|
+
Add to `claude_desktop_config.json`:
|
|
71
99
|
|
|
72
100
|
```json
|
|
73
101
|
{
|
|
74
102
|
"mcpServers": {
|
|
75
|
-
"
|
|
103
|
+
"neuronlayer": {
|
|
76
104
|
"command": "npx",
|
|
77
|
-
"args": ["-y", "
|
|
105
|
+
"args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
|
|
78
106
|
}
|
|
79
107
|
}
|
|
80
108
|
}
|
|
81
109
|
```
|
|
82
110
|
|
|
83
|
-
|
|
111
|
+
Config locations:
|
|
112
|
+
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
|
|
113
|
+
- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
|
|
114
|
+
- **Linux**: `~/.config/claude/claude_desktop_config.json`
|
|
84
115
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
116
|
+
### OpenCode
|
|
117
|
+
|
|
118
|
+
Add to `~/.opencode/config.json`:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{
|
|
122
|
+
"mcpServers": {
|
|
123
|
+
"neuronlayer": {
|
|
124
|
+
"command": "npx",
|
|
125
|
+
"args": ["-y", "neuronlayer", "--project", "/path/to/your/project"]
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
88
129
|
```
|
|
89
130
|
|
|
90
131
|
---
|
|
91
132
|
|
|
133
|
+
## Features
|
|
134
|
+
|
|
135
|
+
### Core Features
|
|
136
|
+
|
|
137
|
+
| Feature | Description |
|
|
138
|
+
|---------|-------------|
|
|
139
|
+
| **Semantic Search** | Find code by meaning, not just keywords |
|
|
140
|
+
| **Decision Recording** | Log architectural decisions with context |
|
|
141
|
+
| **Pattern Library** | Learn and enforce coding patterns |
|
|
142
|
+
| **File Indexing** | AST-based symbol extraction |
|
|
143
|
+
|
|
144
|
+
### Advanced Features
|
|
145
|
+
|
|
146
|
+
| Feature | Description |
|
|
147
|
+
|---------|-------------|
|
|
148
|
+
| **Living Documentation** | Auto-generated architecture docs |
|
|
149
|
+
| **Context Rot Prevention** | Smart compaction keeps AI focused |
|
|
150
|
+
| **Confidence Scoring** | Know when AI is guessing vs confident |
|
|
151
|
+
| **Change Intelligence** | "What changed?" and "Why did it break?" |
|
|
152
|
+
| **Architecture Enforcement** | Suggest existing functions, prevent duplication |
|
|
153
|
+
| **Test-Aware Suggestions** | Predict test failures before they happen |
|
|
154
|
+
|
|
155
|
+
---
|
|
156
|
+
|
|
92
157
|
## How It Works
|
|
93
158
|
|
|
94
159
|
```
|
|
95
160
|
+-------------------------------------------------------------+
|
|
96
|
-
|
|
|
161
|
+
| NEURONLAYER |
|
|
97
162
|
+-------------------------------------------------------------+
|
|
98
163
|
| |
|
|
99
164
|
| +--------------+ +--------------+ +--------------+ |
|
|
100
165
|
| | AI Tool |--->| MCP Server |--->| Memory | |
|
|
101
|
-
| |
|
|
166
|
+
| | Claude/Open | | (stdio) | | Engine | |
|
|
102
167
|
| +--------------+ +--------------+ +--------------+ |
|
|
103
168
|
| | |
|
|
104
169
|
| +--------------------+--+----+ |
|
|
@@ -121,7 +186,7 @@ memorylayer --project /path/to/your/project
|
|
|
121
186
|
|
|
122
187
|
## MCP Tools
|
|
123
188
|
|
|
124
|
-
|
|
189
|
+
NeuronLayer exposes 25+ MCP tools:
|
|
125
190
|
|
|
126
191
|
### Query & Search
|
|
127
192
|
- `memory_query` - Semantic search across codebase
|
|
@@ -152,55 +217,65 @@ MemoryLayer exposes 25+ MCP tools:
|
|
|
152
217
|
|
|
153
218
|
---
|
|
154
219
|
|
|
155
|
-
##
|
|
220
|
+
## CLI Commands
|
|
221
|
+
|
|
222
|
+
```bash
|
|
223
|
+
# Quick setup (auto-configures AI tools)
|
|
224
|
+
neuronlayer init
|
|
156
225
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
- **macOS/Linux**: `~/.memorylayer/<project-hash>/`
|
|
226
|
+
# Initialize specific project
|
|
227
|
+
neuronlayer init /path/to/project
|
|
160
228
|
|
|
161
|
-
|
|
229
|
+
# List all registered projects
|
|
230
|
+
neuronlayer projects list
|
|
162
231
|
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
232
|
+
# Add a new project
|
|
233
|
+
neuronlayer projects add /path/to/my-project
|
|
234
|
+
|
|
235
|
+
# Switch active project
|
|
236
|
+
neuronlayer projects switch <id>
|
|
166
237
|
|
|
167
|
-
# Export decisions
|
|
168
|
-
|
|
238
|
+
# Export decisions to ADR files
|
|
239
|
+
neuronlayer export --format madr
|
|
240
|
+
|
|
241
|
+
# Discover projects in common locations
|
|
242
|
+
neuronlayer projects discover
|
|
169
243
|
|
|
170
244
|
# Show help
|
|
171
|
-
|
|
245
|
+
neuronlayer help
|
|
172
246
|
```
|
|
173
247
|
|
|
174
248
|
---
|
|
175
249
|
|
|
176
|
-
##
|
|
250
|
+
## Data Storage
|
|
251
|
+
|
|
252
|
+
NeuronLayer stores project data separately for each project:
|
|
177
253
|
|
|
178
254
|
```
|
|
179
|
-
|
|
180
|
-
├──
|
|
181
|
-
│ ├──
|
|
182
|
-
│ ├──
|
|
183
|
-
│
|
|
184
|
-
│
|
|
185
|
-
│
|
|
186
|
-
│
|
|
187
|
-
|
|
188
|
-
├── server/
|
|
189
|
-
│ ├── mcp.ts # MCP protocol handler
|
|
190
|
-
│ ├── tools.ts # Tool definitions
|
|
191
|
-
│ └── gateways/ # Unified tool APIs
|
|
192
|
-
├── storage/
|
|
193
|
-
│ ├── tier1.ts # Hot cache
|
|
194
|
-
│ ├── tier2.ts # SQLite storage
|
|
195
|
-
│ └── tier3.ts # Vector embeddings
|
|
196
|
-
├── indexing/
|
|
197
|
-
│ ├── indexer.ts # File indexing
|
|
198
|
-
│ ├── ast.ts # AST parsing
|
|
199
|
-
│ ├── embeddings.ts # Embedding generation
|
|
200
|
-
│ └── watcher.ts # File watching
|
|
201
|
-
└── types/ # TypeScript definitions
|
|
255
|
+
~/.memorylayer/
|
|
256
|
+
├── projects/
|
|
257
|
+
│ ├── project-a-abc123/
|
|
258
|
+
│ │ ├── memorylayer.db # SQLite database
|
|
259
|
+
│ │ └── embeddings/ # Vector index
|
|
260
|
+
│ └── project-b-def456/
|
|
261
|
+
│ ├── memorylayer.db
|
|
262
|
+
│ └── embeddings/
|
|
263
|
+
└── registry.json # Project registry
|
|
202
264
|
```
|
|
203
265
|
|
|
266
|
+
Each project is isolated - no data mixing between projects.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
## Privacy
|
|
271
|
+
|
|
272
|
+
NeuronLayer is **100% local by default**:
|
|
273
|
+
|
|
274
|
+
- All data stored on your machine
|
|
275
|
+
- No cloud services required
|
|
276
|
+
- No telemetry or tracking
|
|
277
|
+
- Works completely offline
|
|
278
|
+
|
|
204
279
|
---
|
|
205
280
|
|
|
206
281
|
## Development
|
|
@@ -214,8 +289,8 @@ src/
|
|
|
214
289
|
|
|
215
290
|
```bash
|
|
216
291
|
# Clone the repository
|
|
217
|
-
git clone https://github.com/
|
|
218
|
-
cd
|
|
292
|
+
git clone https://github.com/abhisavakar/neuronlayer.git
|
|
293
|
+
cd neuronlayer
|
|
219
294
|
|
|
220
295
|
# Install dependencies
|
|
221
296
|
npm install
|
|
@@ -230,29 +305,6 @@ npm test
|
|
|
230
305
|
npm run typecheck
|
|
231
306
|
```
|
|
232
307
|
|
|
233
|
-
### Scripts
|
|
234
|
-
|
|
235
|
-
| Script | Description |
|
|
236
|
-
|--------|-------------|
|
|
237
|
-
| `npm run build` | Build the project |
|
|
238
|
-
| `npm run dev` | Development mode with watch |
|
|
239
|
-
| `npm run test` | Run tests |
|
|
240
|
-
| `npm run typecheck` | Type check without building |
|
|
241
|
-
| `npm run benchmark` | Run performance benchmarks |
|
|
242
|
-
|
|
243
|
-
---
|
|
244
|
-
|
|
245
|
-
## Privacy
|
|
246
|
-
|
|
247
|
-
MemoryLayer is **100% local by default**:
|
|
248
|
-
|
|
249
|
-
- All data stored on your machine
|
|
250
|
-
- No cloud services required
|
|
251
|
-
- No telemetry or tracking
|
|
252
|
-
- Works offline
|
|
253
|
-
|
|
254
|
-
Optional cloud features (coming soon) will use your own infrastructure.
|
|
255
|
-
|
|
256
308
|
---
|
|
257
309
|
|
|
258
310
|
## Contributing
|
|
@@ -263,9 +315,9 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
263
315
|
|
|
264
316
|
- Additional language support (Python, Go, Rust AST)
|
|
265
317
|
- IDE extensions (VS Code, JetBrains)
|
|
318
|
+
- Cursor integration (when they add MCP support)
|
|
266
319
|
- Documentation improvements
|
|
267
320
|
- Performance optimizations
|
|
268
|
-
- Bug fixes and test coverage
|
|
269
321
|
|
|
270
322
|
---
|
|
271
323
|
|
|
@@ -278,9 +330,11 @@ We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
|
278
330
|
- [x] Change Intelligence
|
|
279
331
|
- [x] Architecture Enforcement
|
|
280
332
|
- [x] Test-Aware Suggestions
|
|
333
|
+
- [x] Auto-setup for Claude Desktop
|
|
334
|
+
- [x] Auto-setup for OpenCode
|
|
281
335
|
- [ ] VS Code extension
|
|
336
|
+
- [ ] Cursor support (pending MCP)
|
|
282
337
|
- [ ] Team features (shared memory)
|
|
283
|
-
- [ ] Enterprise deployment (AWS Bedrock)
|
|
284
338
|
|
|
285
339
|
---
|
|
286
340
|
|
|
@@ -290,6 +344,12 @@ MIT License - see [LICENSE](LICENSE) for details.
|
|
|
290
344
|
|
|
291
345
|
---
|
|
292
346
|
|
|
347
|
+
## Author
|
|
348
|
+
|
|
349
|
+
**Abhishek Arun Savakar** - [savakar.com](https://savakar.com)
|
|
350
|
+
|
|
351
|
+
---
|
|
352
|
+
|
|
293
353
|
## Acknowledgments
|
|
294
354
|
|
|
295
355
|
Built with:
|