@nihalcastelino/project-brain-mcp 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/NPM_PUBLISH_CHECKLIST.md +421 -0
- package/PUBLISH_INSTRUCTIONS.md +107 -0
- package/README.md +356 -0
- package/SETUP_GUIDE.md +251 -0
- package/TESTING_GUIDE.md +397 -0
- package/dist/formatter.d.ts +48 -0
- package/dist/formatter.d.ts.map +1 -0
- package/dist/formatter.js +525 -0
- package/dist/formatter.js.map +1 -0
- package/dist/server.d.ts +32 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +94 -0
- package/dist/server.js.map +1 -0
- package/dist/storage/index.d.ts +74 -0
- package/dist/storage/index.d.ts.map +1 -0
- package/dist/storage/index.js +9 -0
- package/dist/storage/index.js.map +1 -0
- package/dist/storage/sqlite-local.d.ts +80 -0
- package/dist/storage/sqlite-local.d.ts.map +1 -0
- package/dist/storage/sqlite-local.js +565 -0
- package/dist/storage/sqlite-local.js.map +1 -0
- package/dist/tools/index.d.ts +4 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +495 -0
- package/dist/tools/index.js.map +1 -0
- package/nul +2 -0
- package/package.json +53 -0
- package/project-brain-mcp-1.0.0.tgz +0 -0
- package/publish-auto.js +142 -0
- package/publish.bat +72 -0
- package/scripts/setup.cjs +238 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Project Brain Inc.
|
|
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.
|
|
@@ -0,0 +1,421 @@
|
|
|
1
|
+
# NPM Publication Checklist
|
|
2
|
+
|
|
3
|
+
## Pre-Publication Tests ✅
|
|
4
|
+
|
|
5
|
+
### 1. Build Test
|
|
6
|
+
- [x] `npm run build` - Compiles without errors
|
|
7
|
+
- [x] `dist/` folder created with all files
|
|
8
|
+
- [x] TypeScript types generated (.d.ts files)
|
|
9
|
+
|
|
10
|
+
### 2. Package Test
|
|
11
|
+
- [x] `npm pack` - Creates tarball successfully
|
|
12
|
+
- [x] Package size reasonable (72.6 kB compressed)
|
|
13
|
+
- [x] All required files included (dist/, scripts/, README, LICENSE)
|
|
14
|
+
- [x] Source files excluded (.npmignore working)
|
|
15
|
+
|
|
16
|
+
### 3. Local Install Test
|
|
17
|
+
- [x] `npm install` from directory - Works
|
|
18
|
+
- [x] Setup script runs automatically
|
|
19
|
+
- [x] Database directory created
|
|
20
|
+
|
|
21
|
+
### 4. Global Install Test
|
|
22
|
+
- [x] `npm install -g <tarball>` - Works
|
|
23
|
+
- [x] Binary created (`project-brain-mcp` command)
|
|
24
|
+
- [x] Setup script auto-configures Claude Desktop
|
|
25
|
+
- [x] Config file updated correctly
|
|
26
|
+
- [x] Existing configs preserved
|
|
27
|
+
|
|
28
|
+
### 5. Functional Tests (TODO)
|
|
29
|
+
- [ ] Restart Claude Desktop
|
|
30
|
+
- [ ] Test: "Create a task called 'Test free tier'"
|
|
31
|
+
- [ ] Verify task created in `~/.project-brain/tasks.db`
|
|
32
|
+
- [ ] Test: "List all my tasks"
|
|
33
|
+
- [ ] Test: "Search for tasks containing 'test'"
|
|
34
|
+
- [ ] Test: Export project functionality
|
|
35
|
+
|
|
36
|
+
## Package Metadata
|
|
37
|
+
|
|
38
|
+
### package.json Validation
|
|
39
|
+
- [x] Name: `@project-brain/mcp` (scoped package)
|
|
40
|
+
- [x] Version: `1.0.0`
|
|
41
|
+
- [x] Description: Clear and concise
|
|
42
|
+
- [x] License: MIT
|
|
43
|
+
- [x] Repository: GitHub URL (update to public repo before publish!)
|
|
44
|
+
- [x] Homepage: project-brain.io
|
|
45
|
+
- [x] Keywords: Relevant keywords for npm search
|
|
46
|
+
- [x] Engines: Node.js >= 16.0.0
|
|
47
|
+
- [x] Main entry: `./dist/server.js`
|
|
48
|
+
- [x] Binary: `project-brain-mcp` command
|
|
49
|
+
|
|
50
|
+
### Required Files
|
|
51
|
+
- [x] README.md - User-facing documentation
|
|
52
|
+
- [x] LICENSE - MIT license file
|
|
53
|
+
- [x] SETUP_GUIDE.md - Detailed setup instructions
|
|
54
|
+
- [x] dist/ - Compiled JavaScript
|
|
55
|
+
- [x] scripts/setup.cjs - Auto-setup script
|
|
56
|
+
|
|
57
|
+
### Excluded Files (via .npmignore)
|
|
58
|
+
- [x] src/ - TypeScript source (only ship compiled)
|
|
59
|
+
- [x] node_modules/ - Dependencies
|
|
60
|
+
- [x] .env - Environment files
|
|
61
|
+
- [x] *.db - Database files
|
|
62
|
+
- [x] test/ - Test files
|
|
63
|
+
|
|
64
|
+
## NPM Account Setup
|
|
65
|
+
|
|
66
|
+
### Before First Publish
|
|
67
|
+
|
|
68
|
+
1. **Create npm account** (if you don't have one)
|
|
69
|
+
```bash
|
|
70
|
+
npm adduser
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
2. **Login to npm**
|
|
74
|
+
```bash
|
|
75
|
+
npm login
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
3. **Verify login**
|
|
79
|
+
```bash
|
|
80
|
+
npm whoami
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
4. **Check if package name is available**
|
|
84
|
+
```bash
|
|
85
|
+
npm view @project-brain/mcp
|
|
86
|
+
# Should return 404 if available
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
### Scoped Package Permissions
|
|
90
|
+
|
|
91
|
+
Since `@project-brain/mcp` is a scoped package, you need to:
|
|
92
|
+
|
|
93
|
+
1. **Create organization** (if using organization scope)
|
|
94
|
+
- Go to npmjs.com
|
|
95
|
+
- Create organization: "project-brain"
|
|
96
|
+
- Invite team members (if any)
|
|
97
|
+
|
|
98
|
+
2. **OR use user scope**
|
|
99
|
+
- Change package name to `@yourusername/project-brain-mcp`
|
|
100
|
+
- Requires no organization
|
|
101
|
+
|
|
102
|
+
3. **Set public access** (scoped packages are private by default)
|
|
103
|
+
```bash
|
|
104
|
+
npm publish --access public
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Publication Steps
|
|
108
|
+
|
|
109
|
+
### Step 1: Pre-Publish Checks
|
|
110
|
+
|
|
111
|
+
```bash
|
|
112
|
+
# 1. Make sure you're in the right directory
|
|
113
|
+
cd project-brain-mcp
|
|
114
|
+
|
|
115
|
+
# 2. Run tests (if you have them)
|
|
116
|
+
npm test
|
|
117
|
+
|
|
118
|
+
# 3. Build the package
|
|
119
|
+
npm run build
|
|
120
|
+
|
|
121
|
+
# 4. Check what will be published
|
|
122
|
+
npm pack --dry-run
|
|
123
|
+
|
|
124
|
+
# 5. Verify package contents
|
|
125
|
+
npm pack
|
|
126
|
+
tar -tzf project-brain-mcp-1.0.0.tgz | less
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Step 2: Version Management
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Check current version
|
|
133
|
+
npm version
|
|
134
|
+
|
|
135
|
+
# Bump version (if needed)
|
|
136
|
+
npm version patch # 1.0.0 -> 1.0.1
|
|
137
|
+
npm version minor # 1.0.0 -> 1.1.0
|
|
138
|
+
npm version major # 1.0.0 -> 2.0.0
|
|
139
|
+
|
|
140
|
+
# Or manually edit package.json
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Step 3: Update Repository URL
|
|
144
|
+
|
|
145
|
+
**IMPORTANT:** Before publishing, update the repository URL in `package.json`:
|
|
146
|
+
|
|
147
|
+
```json
|
|
148
|
+
{
|
|
149
|
+
"repository": {
|
|
150
|
+
"type": "git",
|
|
151
|
+
"url": "https://github.com/project-brain/project-brain-mcp.git"
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Make sure this points to the **PUBLIC** repo, not your private one!
|
|
157
|
+
|
|
158
|
+
### Step 4: Publish to npm
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Dry run (see what would happen)
|
|
162
|
+
npm publish --dry-run --access public
|
|
163
|
+
|
|
164
|
+
# Actually publish
|
|
165
|
+
npm publish --access public
|
|
166
|
+
|
|
167
|
+
# If you get permission errors, login again
|
|
168
|
+
npm login
|
|
169
|
+
npm publish --access public
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Step 5: Verify Publication
|
|
173
|
+
|
|
174
|
+
```bash
|
|
175
|
+
# Check if package is live
|
|
176
|
+
npm view @project-brain/mcp
|
|
177
|
+
|
|
178
|
+
# Install from npm to test
|
|
179
|
+
npm install -g @project-brain/mcp
|
|
180
|
+
|
|
181
|
+
# Verify it works
|
|
182
|
+
project-brain-mcp --version
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
## Post-Publication Tasks
|
|
186
|
+
|
|
187
|
+
### 1. Create GitHub Release
|
|
188
|
+
|
|
189
|
+
```bash
|
|
190
|
+
# Tag the release
|
|
191
|
+
git tag v1.0.0
|
|
192
|
+
git push origin v1.0.0
|
|
193
|
+
|
|
194
|
+
# Or create release on GitHub UI
|
|
195
|
+
# Include:
|
|
196
|
+
# - Release notes
|
|
197
|
+
# - Installation instructions
|
|
198
|
+
# - Link to npm package
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
### 2. Update Documentation
|
|
202
|
+
|
|
203
|
+
- [ ] Update main README with npm install instructions
|
|
204
|
+
- [ ] Add badge: `[](https://www.npmjs.com/package/@project-brain/mcp)`
|
|
205
|
+
- [ ] Add download stats badge
|
|
206
|
+
- [ ] Update examples to use published package
|
|
207
|
+
|
|
208
|
+
### 3. Announce the Release
|
|
209
|
+
|
|
210
|
+
**Where to announce:**
|
|
211
|
+
- [ ] Twitter/X
|
|
212
|
+
- [ ] Reddit: r/ClaudeAI, r/ChatGPT, r/LocalLLaMA
|
|
213
|
+
- [ ] Hacker News (Show HN)
|
|
214
|
+
- [ ] Product Hunt
|
|
215
|
+
- [ ] Dev.to blog post
|
|
216
|
+
- [ ] Discord communities (AI/MCP related)
|
|
217
|
+
|
|
218
|
+
**Announcement Template:**
|
|
219
|
+
```markdown
|
|
220
|
+
🎉 Just released Project Brain MCP v1.0.0!
|
|
221
|
+
|
|
222
|
+
Coordinate multiple AI coding agents (Claude, Cursor, etc.) with zero configuration.
|
|
223
|
+
|
|
224
|
+
Features:
|
|
225
|
+
✅ One-command install (npm install -g @project-brain/mcp)
|
|
226
|
+
✅ Auto-configures Claude Desktop & Cursor
|
|
227
|
+
✅ 100% local, no API keys needed
|
|
228
|
+
✅ Full-text search
|
|
229
|
+
✅ Import/export
|
|
230
|
+
|
|
231
|
+
Free tier: 100 tasks per project
|
|
232
|
+
MIT licensed 🚀
|
|
233
|
+
|
|
234
|
+
Try it: npm install -g @project-brain/mcp
|
|
235
|
+
|
|
236
|
+
GitHub: https://github.com/project-brain/project-brain-mcp
|
|
237
|
+
npm: https://www.npmjs.com/package/@project-brain/mcp
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
### 4. Monitor Initial Feedback
|
|
241
|
+
|
|
242
|
+
- [ ] Watch GitHub issues
|
|
243
|
+
- [ ] Monitor npm download stats
|
|
244
|
+
- [ ] Respond to questions/issues quickly
|
|
245
|
+
- [ ] Gather user feedback
|
|
246
|
+
- [ ] Fix critical bugs immediately
|
|
247
|
+
|
|
248
|
+
## Troubleshooting npm Publish
|
|
249
|
+
|
|
250
|
+
### "You do not have permission to publish"
|
|
251
|
+
|
|
252
|
+
**Solution:**
|
|
253
|
+
```bash
|
|
254
|
+
npm login
|
|
255
|
+
# Or check package name isn't taken
|
|
256
|
+
npm view @project-brain/mcp
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
### "Package name too similar to existing package"
|
|
260
|
+
|
|
261
|
+
**Solution:**
|
|
262
|
+
- Choose different name
|
|
263
|
+
- Or prove you own the trademark
|
|
264
|
+
|
|
265
|
+
### "Forbidden - must be scoped to publish as public"
|
|
266
|
+
|
|
267
|
+
**Solution:**
|
|
268
|
+
```bash
|
|
269
|
+
npm publish --access public
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
### "Version already published"
|
|
273
|
+
|
|
274
|
+
**Solution:**
|
|
275
|
+
```bash
|
|
276
|
+
# Bump version
|
|
277
|
+
npm version patch
|
|
278
|
+
npm publish --access public
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
## Rollback Plan
|
|
282
|
+
|
|
283
|
+
If something goes wrong after publishing:
|
|
284
|
+
|
|
285
|
+
### Unpublish (within 72 hours only)
|
|
286
|
+
|
|
287
|
+
```bash
|
|
288
|
+
# Unpublish specific version
|
|
289
|
+
npm unpublish @project-brain/mcp@1.0.0
|
|
290
|
+
|
|
291
|
+
# Unpublish entire package (risky!)
|
|
292
|
+
npm unpublish @project-brain/mcp --force
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
**WARNING:** Can only unpublish within 72 hours of publishing. After that, you can only deprecate.
|
|
296
|
+
|
|
297
|
+
### Deprecate (after 72 hours)
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
# Deprecate a version
|
|
301
|
+
npm deprecate @project-brain/mcp@1.0.0 "This version has a critical bug, please upgrade"
|
|
302
|
+
|
|
303
|
+
# Publish fixed version
|
|
304
|
+
npm version patch
|
|
305
|
+
npm publish --access public
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Versioning Strategy
|
|
309
|
+
|
|
310
|
+
### Semantic Versioning
|
|
311
|
+
|
|
312
|
+
Follow semver: `MAJOR.MINOR.PATCH`
|
|
313
|
+
|
|
314
|
+
- **PATCH** (1.0.0 -> 1.0.1): Bug fixes, no breaking changes
|
|
315
|
+
- **MINOR** (1.0.0 -> 1.1.0): New features, backward compatible
|
|
316
|
+
- **MAJOR** (1.0.0 -> 2.0.0): Breaking changes
|
|
317
|
+
|
|
318
|
+
### Pre-release Versions
|
|
319
|
+
|
|
320
|
+
For testing before stable release:
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
# Beta release
|
|
324
|
+
npm version 1.0.0-beta.1
|
|
325
|
+
npm publish --tag beta --access public
|
|
326
|
+
|
|
327
|
+
# Users install with:
|
|
328
|
+
npm install -g @project-brain/mcp@beta
|
|
329
|
+
|
|
330
|
+
# Release candidate
|
|
331
|
+
npm version 1.0.0-rc.1
|
|
332
|
+
npm publish --tag next --access public
|
|
333
|
+
```
|
|
334
|
+
|
|
335
|
+
### Recommended First Release Strategy
|
|
336
|
+
|
|
337
|
+
**Option 1: Start with 1.0.0 (confident)**
|
|
338
|
+
- Shows maturity
|
|
339
|
+
- Full commitment
|
|
340
|
+
- Higher expectations
|
|
341
|
+
|
|
342
|
+
**Option 2: Start with 0.9.0 (cautious)**
|
|
343
|
+
- Beta phase
|
|
344
|
+
- Allows breaking changes
|
|
345
|
+
- Lower expectations
|
|
346
|
+
- Can gather feedback before 1.0.0
|
|
347
|
+
|
|
348
|
+
**Recommendation for Project Brain:** Use **1.0.0** since:
|
|
349
|
+
- Free tier is well-tested
|
|
350
|
+
- Feature set is stable
|
|
351
|
+
- Professional impression
|
|
352
|
+
- Shows confidence
|
|
353
|
+
|
|
354
|
+
## Final Checklist Before Publish
|
|
355
|
+
|
|
356
|
+
### Code Quality
|
|
357
|
+
- [x] No console.log (except intentional output)
|
|
358
|
+
- [x] No TODO comments in published code
|
|
359
|
+
- [x] Error handling in place
|
|
360
|
+
- [x] No hardcoded paths (except examples)
|
|
361
|
+
- [x] No secrets or API keys
|
|
362
|
+
|
|
363
|
+
### Documentation
|
|
364
|
+
- [x] README is complete and accurate
|
|
365
|
+
- [x] Installation instructions tested
|
|
366
|
+
- [x] Examples work
|
|
367
|
+
- [x] Links are correct
|
|
368
|
+
- [ ] Update repository URL to public repo
|
|
369
|
+
|
|
370
|
+
### Testing
|
|
371
|
+
- [x] Build passes
|
|
372
|
+
- [x] Package installs globally
|
|
373
|
+
- [x] Setup script works
|
|
374
|
+
- [ ] Test in Claude Desktop (restart and create task)
|
|
375
|
+
- [ ] Test on another machine (if possible)
|
|
376
|
+
|
|
377
|
+
### Legal
|
|
378
|
+
- [x] MIT License included
|
|
379
|
+
- [x] No copyrighted code
|
|
380
|
+
- [x] Dependencies are compatible licenses
|
|
381
|
+
- [x] Package name doesn't infringe trademarks
|
|
382
|
+
|
|
383
|
+
### npm Specific
|
|
384
|
+
- [ ] npm account created
|
|
385
|
+
- [ ] Logged in (`npm whoami`)
|
|
386
|
+
- [ ] Package name available
|
|
387
|
+
- [ ] Organization created (if using @project-brain scope)
|
|
388
|
+
- [ ] Ready to publish with `--access public`
|
|
389
|
+
|
|
390
|
+
## After First Publish
|
|
391
|
+
|
|
392
|
+
### Week 1 Goals
|
|
393
|
+
- 100 downloads
|
|
394
|
+
- 10 GitHub stars
|
|
395
|
+
- No critical bugs reported
|
|
396
|
+
|
|
397
|
+
### Monitor
|
|
398
|
+
- npm download stats: https://npm-stat.com/charts.html?package=@project-brain/mcp
|
|
399
|
+
- GitHub traffic
|
|
400
|
+
- Issues and discussions
|
|
401
|
+
- User feedback
|
|
402
|
+
|
|
403
|
+
### Iterate
|
|
404
|
+
- Fix bugs quickly
|
|
405
|
+
- Respond to issues
|
|
406
|
+
- Gather feature requests
|
|
407
|
+
- Plan v1.1.0 with improvements
|
|
408
|
+
|
|
409
|
+
---
|
|
410
|
+
|
|
411
|
+
## Ready to Publish?
|
|
412
|
+
|
|
413
|
+
When all checkboxes are complete, run:
|
|
414
|
+
|
|
415
|
+
```bash
|
|
416
|
+
cd project-brain-mcp
|
|
417
|
+
npm login
|
|
418
|
+
npm publish --access public
|
|
419
|
+
```
|
|
420
|
+
|
|
421
|
+
🚀 **Good luck!**
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
# How to Publish to npm (Automated)
|
|
2
|
+
|
|
3
|
+
## 🚀 Quick Start (3 Steps)
|
|
4
|
+
|
|
5
|
+
### Step 1: Add Your npm Token to .env
|
|
6
|
+
|
|
7
|
+
1. **Get your npm access token:**
|
|
8
|
+
- Go to: https://www.npmjs.com/settings/nihalcastelino/tokens
|
|
9
|
+
- Click "Generate New Token"
|
|
10
|
+
- Choose "Automation" type
|
|
11
|
+
- Copy the token
|
|
12
|
+
|
|
13
|
+
2. **Edit the .env file:**
|
|
14
|
+
- Open: `C:\Users\Nihal\dev\project-brain-ai\project-brain-mcp\.env`
|
|
15
|
+
- Replace `YOUR_NPM_ACCESS_TOKEN_HERE` with your actual token
|
|
16
|
+
- Save the file
|
|
17
|
+
|
|
18
|
+
**Example .env:**
|
|
19
|
+
```
|
|
20
|
+
NPM_TOKEN=npm_aBcDeFgHiJkLmNoPqRsTuVwXyZ1234567890
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
### Step 2: Run the Automated Publish
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
cd C:\Users\Nihal\dev\project-brain-ai\project-brain-mcp
|
|
27
|
+
npm run publish:auto
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**That's it!** The script will:
|
|
31
|
+
- ✅ Build the package
|
|
32
|
+
- ✅ Authenticate with npm using your token
|
|
33
|
+
- ✅ Publish to npm
|
|
34
|
+
- ✅ Clean up automatically
|
|
35
|
+
|
|
36
|
+
### Step 3: Verify Publication
|
|
37
|
+
|
|
38
|
+
Visit: https://www.npmjs.com/package/@nihalcastelino/project-brain-mcp
|
|
39
|
+
|
|
40
|
+
**Should show:** Your package with v1.0.0
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## 🔐 Security Notes
|
|
45
|
+
|
|
46
|
+
**Your .env file is safe:**
|
|
47
|
+
- ✅ Already in `.gitignore` (won't be committed to git)
|
|
48
|
+
- ✅ Token stays on your local machine
|
|
49
|
+
- ✅ Script creates temporary `.npmrc` and cleans up after
|
|
50
|
+
|
|
51
|
+
**NEVER:**
|
|
52
|
+
- ❌ Commit .env to git
|
|
53
|
+
- ❌ Share your npm token
|
|
54
|
+
- ❌ Push .env to GitHub
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## 🐛 Troubleshooting
|
|
59
|
+
|
|
60
|
+
### Error: "NPM_TOKEN not set"
|
|
61
|
+
|
|
62
|
+
**Fix:** Open `.env` and make sure you replaced `YOUR_NPM_ACCESS_TOKEN_HERE` with your real token
|
|
63
|
+
|
|
64
|
+
### Error: "Version already exists"
|
|
65
|
+
|
|
66
|
+
**Fix:** Bump version in package.json:
|
|
67
|
+
```json
|
|
68
|
+
"version": "1.0.1"
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Then run `npm run publish:auto` again
|
|
72
|
+
|
|
73
|
+
### Error: "Unauthorized"
|
|
74
|
+
|
|
75
|
+
**Fix:** Your token might be invalid. Generate a new one:
|
|
76
|
+
1. Go to: https://www.npmjs.com/settings/nihalcastelino/tokens
|
|
77
|
+
2. Delete old token
|
|
78
|
+
3. Create new "Automation" token
|
|
79
|
+
4. Update .env with new token
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## ✅ After Publishing
|
|
84
|
+
|
|
85
|
+
1. **Verify on npm:**
|
|
86
|
+
https://www.npmjs.com/package/@nihalcastelino/project-brain-mcp
|
|
87
|
+
|
|
88
|
+
2. **Test installation:**
|
|
89
|
+
```bash
|
|
90
|
+
npm install -g @nihalcastelino/project-brain-mcp
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
3. **Make GitHub repo public:**
|
|
94
|
+
https://github.com/nihalcastelino/project-brain-mcp/settings
|
|
95
|
+
|
|
96
|
+
4. **Announce beta!**
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## 📝 Quick Reference
|
|
101
|
+
|
|
102
|
+
**Command:** `npm run publish:auto`
|
|
103
|
+
**Package:** `@nihalcastelino/project-brain-mcp`
|
|
104
|
+
**npm URL:** https://www.npmjs.com/package/@nihalcastelino/project-brain-mcp
|
|
105
|
+
**GitHub:** https://github.com/nihalcastelino/project-brain-mcp
|
|
106
|
+
|
|
107
|
+
**Token location:** `.env` file (local only, not committed to git)
|