@solidnumber/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.
Files changed (78) hide show
  1. package/README.md +150 -0
  2. package/dist/commands/auth.d.ts +6 -0
  3. package/dist/commands/auth.d.ts.map +1 -0
  4. package/dist/commands/auth.js +144 -0
  5. package/dist/commands/auth.js.map +1 -0
  6. package/dist/commands/clone.d.ts +19 -0
  7. package/dist/commands/clone.d.ts.map +1 -0
  8. package/dist/commands/clone.js +205 -0
  9. package/dist/commands/clone.js.map +1 -0
  10. package/dist/commands/dev.d.ts +6 -0
  11. package/dist/commands/dev.d.ts.map +1 -0
  12. package/dist/commands/dev.js +218 -0
  13. package/dist/commands/dev.js.map +1 -0
  14. package/dist/commands/docs.d.ts +17 -0
  15. package/dist/commands/docs.d.ts.map +1 -0
  16. package/dist/commands/docs.js +864 -0
  17. package/dist/commands/docs.js.map +1 -0
  18. package/dist/commands/droplet.d.ts +10 -0
  19. package/dist/commands/droplet.d.ts.map +1 -0
  20. package/dist/commands/droplet.js +292 -0
  21. package/dist/commands/droplet.js.map +1 -0
  22. package/dist/commands/health.d.ts +6 -0
  23. package/dist/commands/health.d.ts.map +1 -0
  24. package/dist/commands/health.js +129 -0
  25. package/dist/commands/health.js.map +1 -0
  26. package/dist/commands/integrations.d.ts +6 -0
  27. package/dist/commands/integrations.d.ts.map +1 -0
  28. package/dist/commands/integrations.js +380 -0
  29. package/dist/commands/integrations.js.map +1 -0
  30. package/dist/commands/kb.d.ts +9 -0
  31. package/dist/commands/kb.d.ts.map +1 -0
  32. package/dist/commands/kb.js +151 -0
  33. package/dist/commands/kb.js.map +1 -0
  34. package/dist/commands/pages.d.ts +8 -0
  35. package/dist/commands/pages.d.ts.map +1 -0
  36. package/dist/commands/pages.js +103 -0
  37. package/dist/commands/pages.js.map +1 -0
  38. package/dist/commands/pull.d.ts +16 -0
  39. package/dist/commands/pull.d.ts.map +1 -0
  40. package/dist/commands/pull.js +336 -0
  41. package/dist/commands/pull.js.map +1 -0
  42. package/dist/commands/push.d.ts +14 -0
  43. package/dist/commands/push.d.ts.map +1 -0
  44. package/dist/commands/push.js +370 -0
  45. package/dist/commands/push.js.map +1 -0
  46. package/dist/commands/services.d.ts +8 -0
  47. package/dist/commands/services.d.ts.map +1 -0
  48. package/dist/commands/services.js +66 -0
  49. package/dist/commands/services.js.map +1 -0
  50. package/dist/commands/status.d.ts +9 -0
  51. package/dist/commands/status.d.ts.map +1 -0
  52. package/dist/commands/status.js +89 -0
  53. package/dist/commands/status.js.map +1 -0
  54. package/dist/commands/train.d.ts +16 -0
  55. package/dist/commands/train.d.ts.map +1 -0
  56. package/dist/commands/train.js +338 -0
  57. package/dist/commands/train.js.map +1 -0
  58. package/dist/commands/vibe.d.ts +6 -0
  59. package/dist/commands/vibe.d.ts.map +1 -0
  60. package/dist/commands/vibe.js +176 -0
  61. package/dist/commands/vibe.js.map +1 -0
  62. package/dist/index.d.ts +19 -0
  63. package/dist/index.d.ts.map +1 -0
  64. package/dist/index.js +119 -0
  65. package/dist/index.js.map +1 -0
  66. package/dist/lib/api-client.d.ts +235 -0
  67. package/dist/lib/api-client.d.ts.map +1 -0
  68. package/dist/lib/api-client.js +287 -0
  69. package/dist/lib/api-client.js.map +1 -0
  70. package/dist/lib/config.d.ts +43 -0
  71. package/dist/lib/config.d.ts.map +1 -0
  72. package/dist/lib/config.js +189 -0
  73. package/dist/lib/config.js.map +1 -0
  74. package/dist/lib/ui.d.ts +49 -0
  75. package/dist/lib/ui.d.ts.map +1 -0
  76. package/dist/lib/ui.js +182 -0
  77. package/dist/lib/ui.js.map +1 -0
  78. package/package.json +60 -0
@@ -0,0 +1,864 @@
1
+ "use strict";
2
+ /**
3
+ * Docs command for Solid CLI
4
+ *
5
+ * Pulls developer documentation into the local project:
6
+ * ./docs/getting-started.md — Quick start guide
7
+ * ./docs/api-reference.md — API endpoints available to your company
8
+ * ./docs/blocks-reference.md — CMS block types and props
9
+ * ./docs/kb-guide.md — Knowledge base + AI training guide
10
+ * ./docs/vibe-guide.md — Vibe natural language commands
11
+ * ./docs/cli-reference.md — CLI command reference
12
+ *
13
+ * These are public docs — no proprietary code or internal architecture.
14
+ * They teach developers/agencies how to build on Solid#.
15
+ */
16
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
17
+ if (k2 === undefined) k2 = k;
18
+ var desc = Object.getOwnPropertyDescriptor(m, k);
19
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
20
+ desc = { enumerable: true, get: function() { return m[k]; } };
21
+ }
22
+ Object.defineProperty(o, k2, desc);
23
+ }) : (function(o, m, k, k2) {
24
+ if (k2 === undefined) k2 = k;
25
+ o[k2] = m[k];
26
+ }));
27
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
28
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
29
+ }) : function(o, v) {
30
+ o["default"] = v;
31
+ });
32
+ var __importStar = (this && this.__importStar) || (function () {
33
+ var ownKeys = function(o) {
34
+ ownKeys = Object.getOwnPropertyNames || function (o) {
35
+ var ar = [];
36
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
37
+ return ar;
38
+ };
39
+ return ownKeys(o);
40
+ };
41
+ return function (mod) {
42
+ if (mod && mod.__esModule) return mod;
43
+ var result = {};
44
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
45
+ __setModuleDefault(result, mod);
46
+ return result;
47
+ };
48
+ })();
49
+ var __importDefault = (this && this.__importDefault) || function (mod) {
50
+ return (mod && mod.__esModule) ? mod : { "default": mod };
51
+ };
52
+ Object.defineProperty(exports, "__esModule", { value: true });
53
+ exports.docsCommand = void 0;
54
+ const commander_1 = require("commander");
55
+ const ora_1 = __importDefault(require("ora"));
56
+ const chalk_1 = __importDefault(require("chalk"));
57
+ const fs = __importStar(require("fs"));
58
+ const path = __importStar(require("path"));
59
+ function ensureDir(dir) {
60
+ if (!fs.existsSync(dir)) {
61
+ fs.mkdirSync(dir, { recursive: true });
62
+ }
63
+ }
64
+ const DOCS = {
65
+ 'getting-started': {
66
+ filename: 'getting-started.md',
67
+ title: 'Getting Started with Solid#',
68
+ content: `---
69
+ title: Getting Started with Solid#
70
+ topic: developer-guide
71
+ ---
72
+
73
+ # Getting Started with Solid#
74
+
75
+ Welcome to Solid# — AI Business Infrastructure. This guide will get you building in minutes.
76
+
77
+ ## Quick Start
78
+
79
+ \`\`\`bash
80
+ # Install the CLI
81
+ npm install -g @solidnumber/cli
82
+
83
+ # Login to your company
84
+ solid auth login
85
+
86
+ # Pull your business data as local files
87
+ solid pull
88
+
89
+ # Edit files with your editor (VS Code, Cursor, etc.)
90
+ # Then push changes back
91
+ solid push
92
+ \`\`\`
93
+
94
+ ## Project Structure
95
+
96
+ After \`solid pull\`, your directory looks like this:
97
+
98
+ \`\`\`
99
+ my-business/
100
+ ├── pages/ # CMS page layouts (JSON)
101
+ │ ├── home.json
102
+ │ ├── about.json
103
+ │ └── services.json
104
+ ├── kb/ # Knowledge base entries (Markdown)
105
+ │ ├── welcome.md
106
+ │ ├── services-overview.md
107
+ │ └── faq.md
108
+ ├── services/ # Service catalog (JSON, read-only)
109
+ │ └── consultation.json
110
+ ├── products/ # Product catalog (JSON, read-only)
111
+ │ └── starter-kit.json
112
+ ├── docs/ # Developer documentation (this!)
113
+ ├── solid.config.json # Company settings + website config
114
+ └── .solid/
115
+ └── manifest.json # Sync metadata (do not edit)
116
+ \`\`\`
117
+
118
+ ## Editing Pages
119
+
120
+ Each page is a JSON file with a \`layout_json\` object containing sections:
121
+
122
+ \`\`\`json
123
+ {
124
+ "_id": 42,
125
+ "title": "Home",
126
+ "slug": "home",
127
+ "is_published": true,
128
+ "layout_json": {
129
+ "sections": [
130
+ {
131
+ "type": "hero",
132
+ "props": {
133
+ "headline": "Welcome to Our Business",
134
+ "subheadline": "We make great things happen",
135
+ "ctaText": "Get Started",
136
+ "ctaLink": "/contact"
137
+ }
138
+ }
139
+ ]
140
+ }
141
+ }
142
+ \`\`\`
143
+
144
+ Edit the sections, save, then \`solid push\` to deploy.
145
+
146
+ ## Editing Knowledge Base
147
+
148
+ KB entries are Markdown files with YAML frontmatter:
149
+
150
+ \`\`\`markdown
151
+ ---
152
+ id: 7
153
+ title: "Our Services"
154
+ category: services
155
+ ---
156
+
157
+ We offer three main services:
158
+
159
+ 1. **Consultation** — 30-minute strategy session
160
+ 2. **Implementation** — Full project build-out
161
+ 3. **Support** — Ongoing maintenance and updates
162
+ \`\`\`
163
+
164
+ The AI agents use your KB to answer customer questions accurately.
165
+ The better your KB, the smarter your AI.
166
+
167
+ ## Using Vibe (Natural Language)
168
+
169
+ Talk to your business in plain English:
170
+
171
+ \`\`\`bash
172
+ # Ask the AI to make changes
173
+ solid vibe "Add a testimonials section to the home page"
174
+ solid vibe "Update our hours to 9am-5pm Monday through Friday"
175
+ solid vibe "Create a new FAQ entry about returns policy"
176
+ \`\`\`
177
+
178
+ ## Workflow
179
+
180
+ 1. \`solid pull\` — Download latest from server
181
+ 2. Edit files locally (VS Code, Cursor, any editor)
182
+ 3. \`solid push\` — Deploy changes
183
+ 4. Repeat
184
+
185
+ Your changes are live immediately after push.
186
+
187
+ ## Need Help?
188
+
189
+ - \`solid status\` — Check your business setup
190
+ - \`solid health\` — Verify API connectivity
191
+ - \`solid --help\` — See all commands
192
+ `,
193
+ },
194
+ 'api-reference': {
195
+ filename: 'api-reference.md',
196
+ title: 'API Reference',
197
+ content: `---
198
+ title: Solid# API Reference
199
+ topic: developer-guide
200
+ ---
201
+
202
+ # API Reference
203
+
204
+ Base URL: \`https://api.solidnumber.com\`
205
+
206
+ All endpoints require authentication via Bearer token (from \`solid auth login\`).
207
+ All data is scoped to your company_id — you can only access your own business data.
208
+
209
+ ## Authentication
210
+
211
+ | Method | Endpoint | Description |
212
+ |--------|----------|-------------|
213
+ | POST | \`/api/v1/auth/login\` | Login with email + password |
214
+ | POST | \`/api/v1/auth/refresh\` | Refresh access token |
215
+ | GET | \`/api/v1/auth/me\` | Get current user info |
216
+
217
+ ## CMS Pages
218
+
219
+ | Method | Endpoint | Description |
220
+ |--------|----------|-------------|
221
+ | GET | \`/api/v1/cms/pages\` | List all pages |
222
+ | GET | \`/api/v1/cms/pages/:id\` | Get page with full layout_json |
223
+ | POST | \`/api/v1/cms/pages\` | Create a new page |
224
+ | PATCH | \`/api/v1/cms/pages/:id\` | Update a page |
225
+ | POST | \`/api/v1/cms/pages/:id/publish\` | Publish a page |
226
+ | POST | \`/api/v1/cms/pages/:id/unpublish\` | Unpublish a page |
227
+
228
+ ## Knowledge Base (via MCP)
229
+
230
+ | Method | Endpoint | Description |
231
+ |--------|----------|-------------|
232
+ | POST | \`/mcp/tools/kb.search\` | Search KB entries |
233
+ | POST | \`/mcp/tools/kb.create\` | Create KB entry |
234
+ | POST | \`/mcp/tools/kb.update\` | Update KB entry |
235
+ | POST | \`/mcp/tools/kb.delete\` | Delete KB entry |
236
+
237
+ ### KB Search
238
+
239
+ \`\`\`json
240
+ POST /mcp/tools/kb.search
241
+ {
242
+ "query": "returns policy",
243
+ "limit": 20
244
+ }
245
+ \`\`\`
246
+
247
+ ### KB Create
248
+
249
+ \`\`\`json
250
+ POST /mcp/tools/kb.create
251
+ {
252
+ "title": "Returns Policy",
253
+ "content": "We accept returns within 30 days...",
254
+ "category": "policies"
255
+ }
256
+ \`\`\`
257
+
258
+ ## Public Endpoints (No Auth Required)
259
+
260
+ These endpoints serve your public website. Pass \`company_id\` as a query param.
261
+
262
+ | Method | Endpoint | Description |
263
+ |--------|----------|-------------|
264
+ | GET | \`/api/v1/cms/pages/public/:slug\` | Get published page by slug |
265
+ | GET | \`/api/v1/cms/public/services\` | List public services |
266
+ | GET | \`/api/v1/cms/public/products\` | List public products |
267
+ | GET | \`/api/v1/cms/public/promotions\` | Active promotions |
268
+ | GET | \`/api/v1/cms/public/availability\` | Available appointment slots |
269
+
270
+ ## Website Settings
271
+
272
+ \`\`\`json
273
+ PATCH /api/v1/companies/:id
274
+ {
275
+ "website_settings": {
276
+ "primary_color": "#6366f1",
277
+ "show_services": true,
278
+ "show_products": true,
279
+ "show_appointments": true,
280
+ "show_pricing": true,
281
+ "show_promotions": false,
282
+ "default_locale": "en"
283
+ }
284
+ }
285
+ \`\`\`
286
+
287
+ ## AI Chat
288
+
289
+ \`\`\`json
290
+ POST /api/v1/chat/
291
+ {
292
+ "message": "What are your business hours?",
293
+ "agent": "sarah"
294
+ }
295
+ \`\`\`
296
+
297
+ Available agents depend on your subscription tier.
298
+
299
+ ## Health Check
300
+
301
+ | Method | Endpoint | Description |
302
+ |--------|----------|-------------|
303
+ | GET | \`/api/v1/healthcheck/quick\` | Quick health check |
304
+ | GET | \`/api/v1/healthcheck/\` | Full system health |
305
+
306
+ ## Rate Limits
307
+
308
+ - 100 requests per minute per company
309
+ - AI chat: governed by your tier's token budget
310
+ - File uploads: 10MB max
311
+
312
+ ## Error Format
313
+
314
+ \`\`\`json
315
+ {
316
+ "detail": "Error description",
317
+ "status_code": 400
318
+ }
319
+ \`\`\`
320
+ `,
321
+ },
322
+ 'blocks-reference': {
323
+ filename: 'blocks-reference.md',
324
+ title: 'CMS Blocks Reference',
325
+ content: `---
326
+ title: CMS Blocks Reference
327
+ topic: developer-guide
328
+ ---
329
+
330
+ # CMS Blocks Reference
331
+
332
+ Blocks are the building units of your pages. Each section in \`layout_json\` has a \`type\` and \`props\`.
333
+
334
+ ## Available Blocks
335
+
336
+ ### Layout & Content
337
+
338
+ | Type | Description |
339
+ |------|-------------|
340
+ | \`hero\` | Full-width hero with headline, subheadline, CTA |
341
+ | \`text\` | Rich text content section |
342
+ | \`features\` | Feature grid (icon + title + description) |
343
+ | \`stats\` | Statistics/metrics display |
344
+ | \`divider\` | Visual separator line |
345
+ | \`accordion\` | Expandable FAQ/content sections |
346
+
347
+ ### Social Proof
348
+
349
+ | Type | Description |
350
+ |------|-------------|
351
+ | \`testimonials\` | Customer testimonial carousel/grid |
352
+ | \`google_reviews\` | Google reviews integration |
353
+ | \`logo_cloud\` | Partner/client logo strip |
354
+ | \`before_after\` | Before/after image comparison slider |
355
+
356
+ ### Business
357
+
358
+ | Type | Description |
359
+ |------|-------------|
360
+ | \`services\` | Service catalog display |
361
+ | \`pricing\` | Pricing tiers table |
362
+ | \`team\` | Team member grid |
363
+ | \`process_steps\` | Step-by-step process flow |
364
+ | \`gallery\` | Image gallery grid |
365
+ | \`video\` | YouTube/Vimeo embed |
366
+ | \`blog_preview\` | Latest blog posts |
367
+
368
+ ### Conversion
369
+
370
+ | Type | Description |
371
+ |------|-------------|
372
+ | \`contact\` | Contact form |
373
+ | \`cta\` | Call-to-action banner |
374
+ | \`booking_widget\` | Appointment booking |
375
+ | \`countdown\` | Event countdown timer |
376
+ | \`chat_widget\` | Embedded AI chat |
377
+
378
+ ### Maps & Location
379
+
380
+ | Type | Description |
381
+ |------|-------------|
382
+ | \`map_embed\` | Google Maps embed |
383
+ | \`service_area\` | Service area map with regions |
384
+
385
+ ## Block Props Example
386
+
387
+ ### Hero Block
388
+
389
+ \`\`\`json
390
+ {
391
+ "type": "hero",
392
+ "props": {
393
+ "headline": "Your Main Headline",
394
+ "subheadline": "Supporting text goes here",
395
+ "ctaText": "Get Started",
396
+ "ctaLink": "/contact",
397
+ "backgroundImage": "https://...",
398
+ "alignment": "center",
399
+ "overlay": true
400
+ }
401
+ }
402
+ \`\`\`
403
+
404
+ ### Features Block
405
+
406
+ \`\`\`json
407
+ {
408
+ "type": "features",
409
+ "props": {
410
+ "headline": "Why Choose Us",
411
+ "features": [
412
+ {
413
+ "icon": "shield",
414
+ "title": "Reliable",
415
+ "description": "99.9% uptime guaranteed"
416
+ },
417
+ {
418
+ "icon": "zap",
419
+ "title": "Fast",
420
+ "description": "Average response time under 2 seconds"
421
+ }
422
+ ],
423
+ "columns": 3
424
+ }
425
+ }
426
+ \`\`\`
427
+
428
+ ### Testimonials Block
429
+
430
+ \`\`\`json
431
+ {
432
+ "type": "testimonials",
433
+ "props": {
434
+ "headline": "What Our Customers Say",
435
+ "testimonials": [
436
+ {
437
+ "name": "Jane Smith",
438
+ "role": "CEO, Acme Inc",
439
+ "quote": "Incredible service!",
440
+ "rating": 5
441
+ }
442
+ ],
443
+ "layout": "grid"
444
+ }
445
+ }
446
+ \`\`\`
447
+
448
+ ### Contact Block
449
+
450
+ \`\`\`json
451
+ {
452
+ "type": "contact",
453
+ "props": {
454
+ "headline": "Get In Touch",
455
+ "fields": ["name", "email", "phone", "message"],
456
+ "submitText": "Send Message",
457
+ "showMap": true,
458
+ "showPhone": true
459
+ }
460
+ }
461
+ \`\`\`
462
+
463
+ ## Adding Blocks
464
+
465
+ Add a new section to your page's \`layout_json.sections\` array:
466
+
467
+ \`\`\`json
468
+ {
469
+ "layout_json": {
470
+ "sections": [
471
+ { "type": "hero", "props": { ... } },
472
+ { "type": "features", "props": { ... } },
473
+ { "type": "testimonials", "props": { ... } },
474
+ { "type": "contact", "props": { ... } }
475
+ ]
476
+ }
477
+ }
478
+ \`\`\`
479
+
480
+ Sections render in order from top to bottom.
481
+ `,
482
+ },
483
+ 'kb-guide': {
484
+ filename: 'kb-guide.md',
485
+ title: 'Knowledge Base & AI Training Guide',
486
+ content: `---
487
+ title: Knowledge Base & AI Training Guide
488
+ topic: developer-guide
489
+ ---
490
+
491
+ # Knowledge Base & AI Training Guide
492
+
493
+ Your knowledge base (KB) is how you train your AI agents. Everything your AI knows about your business comes from KB entries.
494
+
495
+ ## How It Works
496
+
497
+ 1. You write KB entries (services, policies, FAQ, etc.)
498
+ 2. AI agents read your KB when customers ask questions
499
+ 3. Better KB = smarter, more accurate AI responses
500
+
501
+ ## KB File Format
502
+
503
+ KB entries are Markdown files with YAML frontmatter:
504
+
505
+ \`\`\`markdown
506
+ ---
507
+ id: 7
508
+ title: "Shipping Policy"
509
+ category: policies
510
+ ---
511
+
512
+ ## Standard Shipping
513
+
514
+ We ship within 2-3 business days. Free shipping on orders over $50.
515
+
516
+ ## Express Shipping
517
+
518
+ Next-day delivery available for $15.99.
519
+
520
+ ## International
521
+
522
+ We ship to 30+ countries. Delivery in 7-14 business days.
523
+ \`\`\`
524
+
525
+ ## Categories
526
+
527
+ Organize your KB by category for better AI retrieval:
528
+
529
+ | Category | What to Include |
530
+ |----------|----------------|
531
+ | \`services\` | What you offer, pricing, duration |
532
+ | \`policies\` | Returns, shipping, cancellation |
533
+ | \`faq\` | Common customer questions |
534
+ | \`about\` | Company story, mission, values |
535
+ | \`products\` | Product details, specifications |
536
+ | \`hours\` | Business hours, holidays, availability |
537
+ | \`promotions\` | Current deals, seasonal offers |
538
+ | \`general\` | Anything else |
539
+
540
+ ## Training Tips
541
+
542
+ ### Be Specific
543
+ \`\`\`markdown
544
+ # Bad
545
+ We have good prices.
546
+
547
+ # Good
548
+ Our basic plan starts at $29/month and includes:
549
+ - Up to 100 customers
550
+ - Email support (response within 24 hours)
551
+ - 5GB storage
552
+ \`\`\`
553
+
554
+ ### Write Like You Talk
555
+ The AI will paraphrase your KB in conversation. Write naturally:
556
+
557
+ \`\`\`markdown
558
+ # Bad
559
+ The organization provides consultation services
560
+ to eligible clientele during designated hours.
561
+
562
+ # Good
563
+ We offer free 30-minute consultations Monday through
564
+ Friday, 9am to 5pm. Just call or book online!
565
+ \`\`\`
566
+
567
+ ### Cover Edge Cases
568
+ Think about what customers actually ask:
569
+
570
+ \`\`\`markdown
571
+ ## Do you offer refunds?
572
+ Yes! Full refund within 30 days, no questions asked.
573
+ After 30 days, we offer store credit.
574
+
575
+ ## What if my order arrives damaged?
576
+ Contact us within 48 hours with a photo.
577
+ We'll send a replacement immediately — no need to return the damaged item.
578
+ \`\`\`
579
+
580
+ ### Keep It Current
581
+ Outdated KB = wrong AI answers. Review monthly:
582
+ - Are prices still correct?
583
+ - Have hours changed?
584
+ - Any new services or products?
585
+ - Seasonal promotions updated?
586
+
587
+ ## CLI Commands
588
+
589
+ \`\`\`bash
590
+ # Pull KB to local files
591
+ solid pull
592
+
593
+ # Edit kb/*.md files in your editor
594
+
595
+ # Push changes back
596
+ solid push
597
+
598
+ # Or manage directly:
599
+ solid kb list # List all entries
600
+ solid kb add # Add new entry
601
+ solid kb delete <id> # Remove entry
602
+ \`\`\`
603
+
604
+ ## The AI Agents
605
+
606
+ Your KB trains these agents (available depends on your tier):
607
+
608
+ | Agent | Role | Uses KB For |
609
+ |-------|------|-------------|
610
+ | Sarah | Customer Service | Answering questions, booking, support |
611
+ | Marcus | Growth Intelligence | Marketing copy, promotions, outreach |
612
+ | Devon | Operations | Scheduling, inventory, process flows |
613
+
614
+ The more complete your KB, the more capable each agent becomes.
615
+ `,
616
+ },
617
+ 'vibe-guide': {
618
+ filename: 'vibe-guide.md',
619
+ title: 'Vibe — Natural Language Commands',
620
+ content: `---
621
+ title: Vibe — Natural Language Commands
622
+ topic: developer-guide
623
+ ---
624
+
625
+ # Vibe — Natural Language Commands
626
+
627
+ Vibe lets you modify your business using plain English. No code required.
628
+
629
+ ## How It Works
630
+
631
+ 1. You describe what you want in natural language
632
+ 2. Solid# analyzes your intent and generates a preview
633
+ 3. You confirm, and the changes are applied
634
+
635
+ ## CLI Usage
636
+
637
+ \`\`\`bash
638
+ solid vibe "your instruction here"
639
+ \`\`\`
640
+
641
+ ## Examples
642
+
643
+ ### Pages
644
+ \`\`\`bash
645
+ solid vibe "Add a hero section to the home page with our tagline"
646
+ solid vibe "Create a new landing page for our summer sale"
647
+ solid vibe "Move the testimonials above the contact form on the about page"
648
+ \`\`\`
649
+
650
+ ### Knowledge Base
651
+ \`\`\`bash
652
+ solid vibe "Add a FAQ entry about our return policy"
653
+ solid vibe "Update the business hours to close at 6pm on Fridays"
654
+ solid vibe "Create KB entries for all our services"
655
+ \`\`\`
656
+
657
+ ### Settings
658
+ \`\`\`bash
659
+ solid vibe "Change the primary color to blue"
660
+ solid vibe "Enable the appointments module"
661
+ solid vibe "Set the default language to Spanish"
662
+ \`\`\`
663
+
664
+ ### AI Training
665
+ \`\`\`bash
666
+ solid vibe "Train the AI to recommend our premium plan for businesses over 50 employees"
667
+ solid vibe "Add context about our new partnership with Acme Corp"
668
+ solid vibe "Update the AI personality to be more casual and friendly"
669
+ \`\`\`
670
+
671
+ ## Safety
672
+
673
+ Vibe has built-in safety checks:
674
+ - **No deletion** — Vibe can create and update, but won't delete data
675
+ - **Preview first** — You always see what will change before confirming
676
+ - **Rollback** — Changes can be undone
677
+ - **Scoped** — Only affects your company, never others
678
+
679
+ ## Combining with CLI
680
+
681
+ Vibe works great alongside the file-based workflow:
682
+
683
+ \`\`\`bash
684
+ # Pull your files
685
+ solid pull
686
+
687
+ # Make big structural changes in your editor
688
+ # (rearrange sections, add new pages, etc.)
689
+
690
+ # Push the structural changes
691
+ solid push
692
+
693
+ # Then use Vibe for quick tweaks
694
+ solid vibe "Update the hero headline to 'Welcome Home'"
695
+ solid vibe "Add a testimonial from John at Acme Corp"
696
+ \`\`\`
697
+ `,
698
+ },
699
+ 'cli-reference': {
700
+ filename: 'cli-reference.md',
701
+ title: 'CLI Command Reference',
702
+ content: `---
703
+ title: Solid# CLI Command Reference
704
+ topic: developer-guide
705
+ ---
706
+
707
+ # CLI Command Reference
708
+
709
+ ## Installation
710
+
711
+ \`\`\`bash
712
+ npm install -g @solidnumber/cli
713
+ \`\`\`
714
+
715
+ ## Authentication
716
+
717
+ \`\`\`bash
718
+ solid auth login # Login with email + password
719
+ solid auth status # Check login status
720
+ solid auth logout # Clear credentials
721
+ \`\`\`
722
+
723
+ Credentials are stored in \`~/.solid/config.json\`.
724
+ Your session is scoped to one company_id — you can only access your own data.
725
+
726
+ ## Business Overview
727
+
728
+ \`\`\`bash
729
+ solid status # Full business status
730
+ solid status --json # JSON output
731
+ \`\`\`
732
+
733
+ ## Pull & Push (File Workflow)
734
+
735
+ \`\`\`bash
736
+ solid pull # Download all business data as files
737
+ solid pull --pages-only # Only pull pages
738
+ solid pull --kb-only # Only pull knowledge base
739
+ solid pull -d ./my-project # Pull to specific directory
740
+
741
+ solid push # Push local changes to server
742
+ solid push --dry-run # See what would change (no changes made)
743
+ solid push --pages-only # Only push page changes
744
+ solid push --kb-only # Only push KB changes
745
+ solid push --settings-only # Only push website settings
746
+ solid push --yes # Skip confirmation prompt
747
+ \`\`\`
748
+
749
+ ## Knowledge Base
750
+
751
+ \`\`\`bash
752
+ solid kb list # List all KB entries
753
+ solid kb list --query "returns" # Search entries
754
+ solid kb add # Add new entry (interactive)
755
+ solid kb delete <id> # Delete an entry
756
+ \`\`\`
757
+
758
+ ## Pages
759
+
760
+ \`\`\`bash
761
+ solid pages list # List all pages
762
+ solid pages list --json # JSON output
763
+ solid pages publish <id> # Publish a page
764
+ solid pages unpublish <id> # Unpublish a page
765
+ \`\`\`
766
+
767
+ ## Services
768
+
769
+ \`\`\`bash
770
+ solid services list # List service catalog
771
+ solid services list --json # JSON output
772
+ \`\`\`
773
+
774
+ ## Vibe (Natural Language)
775
+
776
+ \`\`\`bash
777
+ solid vibe "your instruction" # Execute a natural language command
778
+ solid vibe analyze "instruction" # Preview without applying
779
+ \`\`\`
780
+
781
+ ## Integrations
782
+
783
+ \`\`\`bash
784
+ solid integrations list # List active integrations
785
+ solid integrations catalog # Browse available integrations
786
+ solid integrations health # Check integration health
787
+ solid integrations generate # Generate new integration
788
+ solid integrations test <id> # Test an integration
789
+ solid integrations deploy <id> # Deploy integration
790
+ solid integrations logs <id> # View integration logs
791
+ \`\`\`
792
+
793
+ ## Health & Diagnostics
794
+
795
+ \`\`\`bash
796
+ solid health # Quick health check
797
+ solid health --full # Detailed system health
798
+ solid health --mcp # MCP/agent system health
799
+ \`\`\`
800
+
801
+ ## Developer Docs
802
+
803
+ \`\`\`bash
804
+ solid docs # Pull developer documentation
805
+ solid docs --force # Re-download docs (overwrite)
806
+ \`\`\`
807
+
808
+ ## Global Options
809
+
810
+ \`\`\`bash
811
+ --help # Show help for any command
812
+ --version # Show CLI version
813
+ \`\`\`
814
+
815
+ ## Environment
816
+
817
+ | Variable | Default | Description |
818
+ |----------|---------|-------------|
819
+ | \`SOLID_API_URL\` | \`https://api.solidnumber.com\` | API base URL |
820
+
821
+ ## Troubleshooting
822
+
823
+ **"Not logged in"** — Run \`solid auth login\`
824
+ **"No company_id"** — Your login may have expired. Re-login.
825
+ **"Company mismatch"** — You're logged in as a different company than the project. Use \`--force\` or switch directories.
826
+ **Push failed** — Check \`solid health\` to verify connectivity.
827
+ `,
828
+ },
829
+ };
830
+ exports.docsCommand = new commander_1.Command('docs')
831
+ .description('Pull developer documentation into your project')
832
+ .option('-d, --dir <directory>', 'Project directory', '.')
833
+ .option('--force', 'Overwrite existing docs')
834
+ .action(async (options) => {
835
+ const baseDir = path.resolve(options.dir);
836
+ const docsDir = path.join(baseDir, 'docs');
837
+ // Check if docs already exist
838
+ if (fs.existsSync(docsDir) && !options.force) {
839
+ const existingFiles = fs.readdirSync(docsDir).filter((f) => f.endsWith('.md'));
840
+ if (existingFiles.length > 0) {
841
+ console.log(chalk_1.default.yellow(' Docs already exist. Use --force to overwrite.'));
842
+ console.log(chalk_1.default.dim(` ${docsDir}`));
843
+ return;
844
+ }
845
+ }
846
+ const spinner = (0, ora_1.default)('Writing developer docs...').start();
847
+ ensureDir(docsDir);
848
+ let count = 0;
849
+ for (const [, doc] of Object.entries(DOCS)) {
850
+ fs.writeFileSync(path.join(docsDir, doc.filename), doc.content);
851
+ count++;
852
+ }
853
+ spinner.succeed(chalk_1.default.green(`${count} docs → ./docs/`));
854
+ console.log('');
855
+ for (const [, doc] of Object.entries(DOCS)) {
856
+ console.log(chalk_1.default.dim(` docs/${doc.filename}`));
857
+ }
858
+ console.log('');
859
+ console.log(chalk_1.default.bold.green(' ✓ Developer docs ready'));
860
+ console.log(chalk_1.default.dim(' These docs teach you how to build on Solid#.'));
861
+ console.log(chalk_1.default.dim(' They contain no proprietary code — safe to share with your team.'));
862
+ console.log('');
863
+ });
864
+ //# sourceMappingURL=docs.js.map