@vibe-db/cli 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/PUBLISHING.md ADDED
@@ -0,0 +1,558 @@
1
+ # Publishing VibeDB CLI to npm
2
+
3
+ **Status:** Ready to Publish
4
+ **Package Name:** `vibedb` (check availability on npm)
5
+ **Current Version:** 1.0.0
6
+
7
+ ---
8
+
9
+ ## 📋 Pre-Publishing Checklist
10
+
11
+ ### 1. Test the CLI Locally
12
+
13
+ ```bash
14
+ cd /vibedb/cli
15
+
16
+ # Install dependencies
17
+ npm install
18
+
19
+ # Test all commands
20
+ node bin/vibedb.js --help
21
+ node bin/vibedb.js signup
22
+ node bin/vibedb.js login
23
+ node bin/vibedb.js list
24
+ node bin/vibedb.js billing info
25
+ ```
26
+
27
+ ### 2. Update package.json
28
+
29
+ Current package.json should have:
30
+
31
+ ```json
32
+ {
33
+ "name": "vibedb",
34
+ "version": "1.0.0",
35
+ "description": "Instant database provisioning for AI-powered development",
36
+ "main": "src/api.js",
37
+ "bin": {
38
+ "vibedb": "./bin/vibedb.js"
39
+ },
40
+ "scripts": {
41
+ "test": "echo \"Error: no test specified\" && exit 1"
42
+ },
43
+ "keywords": [
44
+ "database",
45
+ "postgres",
46
+ "mysql",
47
+ "redis",
48
+ "ai",
49
+ "claude",
50
+ "gpt",
51
+ "development",
52
+ "devtools",
53
+ "provisioning"
54
+ ],
55
+ "author": "VibeDB",
56
+ "license": "MIT",
57
+ "repository": {
58
+ "type": "git",
59
+ "url": "https://github.com/yourusername/vibedb-cli.git"
60
+ },
61
+ "homepage": "https://vibedb.dev",
62
+ "bugs": {
63
+ "url": "https://github.com/yourusername/vibedb-cli/issues"
64
+ },
65
+ "engines": {
66
+ "node": ">=16.0.0"
67
+ },
68
+ "dependencies": {
69
+ "axios": "^1.6.0",
70
+ "chalk": "^4.1.2",
71
+ "cli-table3": "^0.6.3",
72
+ "commander": "^11.1.0",
73
+ "inquirer": "^8.2.5"
74
+ }
75
+ }
76
+ ```
77
+
78
+ **Important fields to verify:**
79
+ - ✅ `name`: Must be unique on npm
80
+ - ✅ `version`: Start with 1.0.0
81
+ - ✅ `bin`: Points to executable
82
+ - ✅ `repository`: Your GitHub repo
83
+ - ✅ `homepage`: Your website
84
+ - ✅ `keywords`: For discoverability
85
+
86
+ ### 3. Create/Update README.md
87
+
88
+ The CLI already has a README.md at `/vibedb/cli/README.md`. Make sure it includes:
89
+
90
+ - [ ] Installation instructions
91
+ - [ ] Quick start guide
92
+ - [ ] Command reference
93
+ - [ ] Authentication setup
94
+ - [ ] Examples
95
+ - [ ] Links to docs
96
+
97
+ ### 4. Add LICENSE File
98
+
99
+ ```bash
100
+ cd /vibedb/cli
101
+ cat > LICENSE << 'EOF'
102
+ MIT License
103
+
104
+ Copyright (c) 2026 VibeDB
105
+
106
+ Permission is hereby granted, free of charge, to any person obtaining a copy
107
+ of this software and associated documentation files (the "Software"), to deal
108
+ in the Software without restriction, including without limitation the rights
109
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110
+ copies of the Software, and to permit persons to whom the Software is
111
+ furnished to do so, subject to the following conditions:
112
+
113
+ The above copyright notice and this permission notice shall be included in all
114
+ copies or substantial portions of the Software.
115
+
116
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
122
+ SOFTWARE.
123
+ EOF
124
+ ```
125
+
126
+ ### 5. Create .npmignore
127
+
128
+ ```bash
129
+ cd /vibedb/cli
130
+ cat > .npmignore << 'EOF'
131
+ # Development files
132
+ node_modules/
133
+ .git/
134
+ .gitignore
135
+ .DS_Store
136
+
137
+ # Documentation
138
+ *.md
139
+ !README.md
140
+
141
+ # Test files
142
+ test/
143
+ tests/
144
+ *.test.js
145
+ *.spec.js
146
+
147
+ # CI/CD
148
+ .github/
149
+ .gitlab-ci.yml
150
+ .travis.yml
151
+
152
+ # IDE
153
+ .vscode/
154
+ .idea/
155
+ *.swp
156
+ *.swo
157
+
158
+ # Logs
159
+ logs/
160
+ *.log
161
+ npm-debug.log*
162
+
163
+ # Misc
164
+ .env
165
+ .env.*
166
+ EOF
167
+ ```
168
+
169
+ ---
170
+
171
+ ## 🚀 Publishing Steps
172
+
173
+ ### Step 1: Create npm Account
174
+
175
+ If you don't have one:
176
+
177
+ 1. Go to https://www.npmjs.com/signup
178
+ 2. Create account
179
+ 3. Verify email
180
+
181
+ ### Step 2: Login to npm CLI
182
+
183
+ ```bash
184
+ npm login
185
+ ```
186
+
187
+ Enter:
188
+ - Username
189
+ - Password
190
+ - Email
191
+ - OTP (if 2FA enabled)
192
+
193
+ Verify login:
194
+ ```bash
195
+ npm whoami
196
+ ```
197
+
198
+ ### Step 3: Check Package Name Availability
199
+
200
+ ```bash
201
+ npm view vibedb
202
+ ```
203
+
204
+ If it shows "npm ERR! 404" - the name is available!
205
+
206
+ If it's taken, you'll need to choose a different name:
207
+ - `@your-username/vibedb` (scoped package)
208
+ - `vibedb-cli`
209
+ - `vibedb-tool`
210
+ - `vibe-db`
211
+
212
+ Update package.json with the available name.
213
+
214
+ ### Step 4: Dry Run
215
+
216
+ Test what will be published:
217
+
218
+ ```bash
219
+ cd /vibedb/cli
220
+ npm pack --dry-run
221
+ ```
222
+
223
+ This shows what files will be included.
224
+
225
+ ### Step 5: Test Installation Locally
226
+
227
+ ```bash
228
+ # Create a tarball
229
+ npm pack
230
+
231
+ # Install globally from tarball
232
+ npm install -g vibedb-1.0.0.tgz
233
+
234
+ # Test it works
235
+ vibedb --help
236
+
237
+ # Uninstall test version
238
+ npm uninstall -g vibedb
239
+ ```
240
+
241
+ ### Step 6: Publish to npm
242
+
243
+ ```bash
244
+ cd /vibedb/cli
245
+
246
+ # First time publishing (public package)
247
+ npm publish --access public
248
+
249
+ # Or if using scoped package
250
+ npm publish --access public
251
+ ```
252
+
253
+ **You'll see output like:**
254
+ ```
255
+ + vibedb@1.0.0
256
+ ```
257
+
258
+ ### Step 7: Verify Publication
259
+
260
+ ```bash
261
+ # Check it's live
262
+ npm view vibedb
263
+
264
+ # Install from npm
265
+ npm install -g vibedb
266
+
267
+ # Test
268
+ vibedb --help
269
+ ```
270
+
271
+ ---
272
+
273
+ ## 📦 Future Updates
274
+
275
+ ### Semantic Versioning
276
+
277
+ Use semantic versioning (semver):
278
+ - **Major** (1.0.0 → 2.0.0): Breaking changes
279
+ - **Minor** (1.0.0 → 1.1.0): New features, backward compatible
280
+ - **Patch** (1.0.0 → 1.0.1): Bug fixes
281
+
282
+ ### Publishing Updates
283
+
284
+ ```bash
285
+ cd /vibedb/cli
286
+
287
+ # 1. Make your changes
288
+ # 2. Update version in package.json
289
+
290
+ # Option A: Manual version bump
291
+ # Edit package.json, change "version": "1.0.0" to "1.0.1"
292
+
293
+ # Option B: Use npm version command
294
+ npm version patch # 1.0.0 → 1.0.1
295
+ npm version minor # 1.0.0 → 1.1.0
296
+ npm version major # 1.0.0 → 2.0.0
297
+
298
+ # 3. Test locally
299
+ npm install
300
+ node bin/vibedb.js --help
301
+
302
+ # 4. Publish
303
+ npm publish
304
+
305
+ # 5. Tag in git (if using version control)
306
+ git add .
307
+ git commit -m "Release v1.0.1"
308
+ git tag v1.0.1
309
+ git push && git push --tags
310
+ ```
311
+
312
+ ---
313
+
314
+ ## 🏷️ npm Tags
315
+
316
+ ### Publishing Beta/Alpha Versions
317
+
318
+ ```bash
319
+ # For pre-release versions
320
+ npm version prerelease --preid=beta
321
+ # Creates: 1.0.1-beta.0
322
+
323
+ npm publish --tag beta
324
+ ```
325
+
326
+ Users can install with:
327
+ ```bash
328
+ npm install -g vibedb@beta
329
+ ```
330
+
331
+ ### Setting Latest Tag
332
+
333
+ ```bash
334
+ # Make a specific version the "latest"
335
+ npm dist-tag add vibedb@1.0.0 latest
336
+ ```
337
+
338
+ ---
339
+
340
+ ## 📊 Package Analytics
341
+
342
+ After publishing, you can track usage:
343
+
344
+ 1. **npm stats:** https://npmjs.com/package/vibedb
345
+ - Downloads per day/week/month
346
+ - Version distribution
347
+
348
+ 2. **npm trends:** https://npmtrends.com/vibedb
349
+ - Compare with other packages
350
+ - Historical download data
351
+
352
+ ---
353
+
354
+ ## 🔧 Troubleshooting
355
+
356
+ ### Error: Package name already taken
357
+
358
+ **Solution:** Use a scoped package or different name
359
+
360
+ ```json
361
+ {
362
+ "name": "@your-org/vibedb",
363
+ // or
364
+ "name": "vibedb-cli"
365
+ }
366
+ ```
367
+
368
+ ### Error: 402 Payment Required
369
+
370
+ **Solution:** You need to publish as public
371
+
372
+ ```bash
373
+ npm publish --access public
374
+ ```
375
+
376
+ ### Error: You need to authorize this machine
377
+
378
+ **Solution:** Login again with 2FA
379
+
380
+ ```bash
381
+ npm login
382
+ # Enter OTP from authenticator app
383
+ ```
384
+
385
+ ### Error: ENEEDAUTH
386
+
387
+ **Solution:** Login expired
388
+
389
+ ```bash
390
+ npm logout
391
+ npm login
392
+ ```
393
+
394
+ ### Version already published
395
+
396
+ **Solution:** Can't republish same version, bump it
397
+
398
+ ```bash
399
+ npm version patch
400
+ npm publish
401
+ ```
402
+
403
+ ---
404
+
405
+ ## ✅ Post-Publishing Checklist
406
+
407
+ After publishing:
408
+
409
+ - [ ] Test installation: `npm install -g vibedb`
410
+ - [ ] Update website with install instructions
411
+ - [ ] Update documentation
412
+ - [ ] Announce on social media/blog
413
+ - [ ] Add npm badge to README
414
+ - [ ] Set up GitHub Actions for auto-publishing (optional)
415
+ - [ ] Monitor for issues/feedback
416
+
417
+ ### Add npm Badge to README
418
+
419
+ ```markdown
420
+ [![npm version](https://badge.fury.io/js/vibedb.svg)](https://www.npmjs.com/package/vibedb)
421
+ [![npm downloads](https://img.shields.io/npm/dm/vibedb.svg)](https://www.npmjs.com/package/vibedb)
422
+ ```
423
+
424
+ ---
425
+
426
+ ## 🤖 Automated Publishing (Optional)
427
+
428
+ ### Set up GitHub Actions
429
+
430
+ Create `.github/workflows/publish.yml`:
431
+
432
+ ```yaml
433
+ name: Publish to npm
434
+
435
+ on:
436
+ release:
437
+ types: [created]
438
+
439
+ jobs:
440
+ publish:
441
+ runs-on: ubuntu-latest
442
+ steps:
443
+ - uses: actions/checkout@v3
444
+
445
+ - uses: actions/setup-node@v3
446
+ with:
447
+ node-version: '18'
448
+ registry-url: 'https://registry.npmjs.org'
449
+
450
+ - run: cd cli && npm install
451
+
452
+ - run: cd cli && npm test
453
+ if: steps.test.outcome == 'success'
454
+
455
+ - run: cd cli && npm publish --access public
456
+ env:
457
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
458
+ ```
459
+
460
+ **Setup:**
461
+ 1. Get npm token: https://www.npmjs.com/settings/YOUR_USERNAME/tokens
462
+ 2. Add as GitHub secret: Settings → Secrets → NPM_TOKEN
463
+ 3. Create GitHub release → Auto publishes to npm
464
+
465
+ ---
466
+
467
+ ## 📝 Quick Reference
468
+
469
+ ### Essential Commands
470
+
471
+ ```bash
472
+ # Login
473
+ npm login
474
+
475
+ # Check what's logged in
476
+ npm whoami
477
+
478
+ # Check package name availability
479
+ npm view PACKAGE_NAME
480
+
481
+ # Test publish (dry run)
482
+ npm pack --dry-run
483
+
484
+ # Publish
485
+ npm publish --access public
486
+
487
+ # Update version
488
+ npm version patch|minor|major
489
+
490
+ # Check published package
491
+ npm view vibedb
492
+
493
+ # Unpublish (within 72 hours)
494
+ npm unpublish vibedb@1.0.0
495
+ ```
496
+
497
+ ### Useful Links
498
+
499
+ - npm Dashboard: https://www.npmjs.com/~YOUR_USERNAME
500
+ - Package Page: https://www.npmjs.com/package/vibedb
501
+ - Downloads Stats: https://npm-stat.com/charts.html?package=vibedb
502
+ - Search Rankings: https://www.npmjs.com/search?q=vibedb
503
+
504
+ ---
505
+
506
+ ## 🎯 Launch Checklist
507
+
508
+ Before first publish:
509
+
510
+ - [ ] Package name is available
511
+ - [ ] README.md is complete and clear
512
+ - [ ] LICENSE file exists
513
+ - [ ] .npmignore excludes dev files
514
+ - [ ] package.json has correct metadata
515
+ - [ ] All commands tested locally
516
+ - [ ] Version is 1.0.0
517
+ - [ ] bin executable has shebang: `#!/usr/bin/env node`
518
+ - [ ] bin file has execute permissions: `chmod +x bin/vibedb.js`
519
+
520
+ After publish:
521
+
522
+ - [ ] Package installs correctly: `npm install -g vibedb`
523
+ - [ ] All commands work: `vibedb --help`
524
+ - [ ] Documentation updated
525
+ - [ ] Announcement prepared
526
+ - [ ] Support channels ready (email, GitHub issues)
527
+
528
+ ---
529
+
530
+ ## 🚀 You're Ready!
531
+
532
+ Once published, users can install with:
533
+
534
+ ```bash
535
+ npm install -g vibedb
536
+ ```
537
+
538
+ And use immediately:
539
+
540
+ ```bash
541
+ vibedb signup
542
+ vibedb login
543
+ vibedb list
544
+ vibedb billing info
545
+ ```
546
+
547
+ **Next steps after publishing:**
548
+ 1. Update landing page with npm install command
549
+ 2. Add to website: https://vibedb.dev
550
+ 3. Submit to:
551
+ - Product Hunt
552
+ - Hacker News (Show HN)
553
+ - Reddit /r/SideProject
554
+ - Dev.to
555
+ 4. Monitor npm stats and GitHub issues
556
+ 5. Iterate based on feedback
557
+
558
+ Good luck with the launch! 🎉