@revstackhq/cli 0.0.0-dev-20260227103607 → 0.0.0-dev-20260228062053

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 (56) hide show
  1. package/.turbo/turbo-build.log +51 -42
  2. package/CHANGELOG.md +18 -0
  3. package/dist/cli.js +622 -49
  4. package/dist/cli.js.map +1 -1
  5. package/dist/commands/init.d.ts +0 -7
  6. package/dist/commands/init.js +443 -24
  7. package/dist/commands/init.js.map +1 -1
  8. package/dist/commands/login.d.ts +0 -6
  9. package/dist/commands/login.js.map +1 -1
  10. package/dist/commands/logout.d.ts +0 -5
  11. package/dist/commands/logout.js.map +1 -1
  12. package/dist/commands/pull.d.ts +0 -7
  13. package/dist/commands/pull.js +120 -11
  14. package/dist/commands/pull.js.map +1 -1
  15. package/dist/commands/push.js +59 -14
  16. package/dist/commands/push.js.map +1 -1
  17. package/dist/commands/templates/ai-agent-platform.d.ts +5 -0
  18. package/dist/commands/templates/ai-agent-platform.js +119 -0
  19. package/dist/commands/templates/ai-agent-platform.js.map +1 -0
  20. package/dist/commands/templates/b2b-saas.js +23 -10
  21. package/dist/commands/templates/b2b-saas.js.map +1 -1
  22. package/dist/commands/templates/developer-tools.d.ts +5 -0
  23. package/dist/commands/templates/developer-tools.js +131 -0
  24. package/dist/commands/templates/developer-tools.js.map +1 -0
  25. package/dist/commands/templates/ecommerce-platform.d.ts +5 -0
  26. package/dist/commands/templates/ecommerce-platform.js +144 -0
  27. package/dist/commands/templates/ecommerce-platform.js.map +1 -0
  28. package/dist/commands/templates/index.js +437 -23
  29. package/dist/commands/templates/index.js.map +1 -1
  30. package/dist/commands/templates/starter.d.ts +1 -0
  31. package/dist/commands/templates/starter.js +13 -8
  32. package/dist/commands/templates/starter.js.map +1 -1
  33. package/dist/commands/templates/usage-based.js +18 -4
  34. package/dist/commands/templates/usage-based.js.map +1 -1
  35. package/dist/utils/auth.d.ts +0 -5
  36. package/dist/utils/auth.js.map +1 -1
  37. package/dist/utils/config-loader.d.ts +0 -6
  38. package/dist/utils/config-loader.js +4 -0
  39. package/dist/utils/config-loader.js.map +1 -1
  40. package/package.json +2 -2
  41. package/src/commands/init.ts +6 -8
  42. package/src/commands/login.ts +0 -6
  43. package/src/commands/logout.ts +0 -5
  44. package/src/commands/pull.ts +148 -60
  45. package/src/commands/push.ts +67 -16
  46. package/src/commands/templates/ai-agent-platform.ts +114 -0
  47. package/src/commands/templates/b2b-saas.ts +23 -10
  48. package/src/commands/templates/developer-tools.ts +126 -0
  49. package/src/commands/templates/ecommerce-platform.ts +139 -0
  50. package/src/commands/templates/index.ts +6 -0
  51. package/src/commands/templates/starter.ts +14 -8
  52. package/src/commands/templates/usage-based.ts +18 -4
  53. package/src/utils/auth.ts +0 -6
  54. package/src/utils/config-loader.ts +6 -7
  55. package/tests/integration/pull.test.ts +6 -0
  56. package/tests/integration/push.test.ts +3 -0
@@ -26,9 +26,9 @@ export const addons = {
26
26
  name: "5 Extra Seats",
27
27
  description: "Add 5 more team members to your workspace.",
28
28
  type: "recurring",
29
- prices: [
30
- { amount: 1500, currency: "USD", billing_interval: "monthly" }
31
- ],
29
+ amount: 1500,
30
+ currency: "USD",
31
+ billing_interval: "monthly",
32
32
  features: {
33
33
  seats: { value_limit: 5, type: "increment", is_hard_limit: false },
34
34
  }
@@ -37,9 +37,9 @@ export const addons = {
37
37
  name: "Priority Support",
38
38
  description: "24/7 Slack channel support.",
39
39
  type: "recurring",
40
- prices: [
41
- { amount: 9900, currency: "USD", billing_interval: "monthly" }
42
- ],
40
+ amount: 9900,
41
+ currency: "USD",
42
+ billing_interval: "monthly",
43
43
  features: {
44
44
  priority_support: { has_access: true },
45
45
  }
@@ -65,25 +65,30 @@ export const plans = {
65
65
  is_default: false,
66
66
  is_public: true,
67
67
  type: "paid",
68
- available_addons: ["extra_seats", "vip_support"],
69
68
  prices: [
70
- { amount: 2900, currency: "USD", billing_interval: "monthly", trial_period_days: 14 }
69
+ { amount: 2900, currency: "USD", billing_interval: "monthly", trial_period_days: 14, available_addons: ["extra_seats", "vip_support"] }
71
70
  ],
72
71
  features: {
73
72
  seats: { value_limit: 5, is_hard_limit: true },
74
73
  },
75
74
  }),
76
75
  };
76
+ `,
77
+ coupons: `import type { DiscountDef } from "@revstackhq/core";
78
+
79
+ export const coupons: DiscountDef[] = [];
77
80
  `,
78
81
  index: `import { defineConfig } from "@revstackhq/core";
79
82
  import { features } from "./features";
80
83
  import { addons } from "./addons";
81
84
  import { plans } from "./plans";
85
+ import { coupons } from "./coupons";
82
86
 
83
87
  export default defineConfig({
84
88
  features,
85
89
  addons,
86
90
  plans,
91
+ coupons,
87
92
  });
88
93
  `,
89
94
  root: `import config from "./revstack";
@@ -110,9 +115,9 @@ export const addons = {
110
115
  name: "10 Extra Users",
111
116
  description: "Add 10 more active users to your workspace.",
112
117
  type: "recurring",
113
- prices: [
114
- { amount: 5000, currency: "USD", billing_interval: "monthly" }
115
- ],
118
+ amount: 5000,
119
+ currency: "USD",
120
+ billing_interval: "monthly",
116
121
  features: {
117
122
  active_users: { value_limit: 10, type: "increment", is_hard_limit: true },
118
123
  }
@@ -121,12 +126,25 @@ export const addons = {
121
126
  name: "Dedicated Support",
122
127
  description: "Enterprise SLA with 1-hour response time.",
123
128
  type: "recurring",
124
- prices: [
125
- { amount: 49900, currency: "USD", billing_interval: "monthly" }
126
- ],
129
+ amount: 49900,
130
+ currency: "USD",
131
+ billing_interval: "monthly",
127
132
  features: {}
128
133
  })
129
134
  };
135
+ `,
136
+ coupons: `import type { DiscountDef } from "@revstackhq/core";
137
+
138
+ export const coupons: DiscountDef[] = [
139
+ {
140
+ code: "ENTERPRISE_B2B",
141
+ name: "Annual Contract Rebate",
142
+ type: "amount",
143
+ value: 50000,
144
+ duration: "once",
145
+ applies_to_plans: ["enterprise"]
146
+ }
147
+ ];
130
148
  `,
131
149
  plans: `import { definePlan } from "@revstackhq/core";
132
150
  import { features } from "./features";
@@ -146,9 +164,8 @@ export const plans = {
146
164
  is_default: false,
147
165
  is_public: true,
148
166
  type: "paid",
149
- available_addons: ["extra_users"],
150
167
  prices: [
151
- { amount: 9900, currency: "USD", billing_interval: "monthly" }
168
+ { amount: 9900, currency: "USD", billing_interval: "monthly", available_addons: ["extra_users"] }
152
169
  ],
153
170
  features: {
154
171
  active_users: { value_limit: 10, is_hard_limit: true },
@@ -162,9 +179,8 @@ export const plans = {
162
179
  is_default: false,
163
180
  is_public: true,
164
181
  type: "paid",
165
- available_addons: ["extra_users", "dedicated_support"],
166
182
  prices: [
167
- { amount: 49900, currency: "USD", billing_interval: "monthly" }
183
+ { amount: 49900, currency: "USD", billing_interval: "monthly", available_addons: ["extra_users", "dedicated_support"] }
168
184
  ],
169
185
  features: {
170
186
  active_users: { value_limit: 100, is_hard_limit: false },
@@ -178,11 +194,13 @@ export const plans = {
178
194
  import { features } from "./features";
179
195
  import { addons } from "./addons";
180
196
  import { plans } from "./plans";
197
+ import { coupons } from "./coupons";
181
198
 
182
199
  export default defineConfig({
183
200
  features,
184
201
  addons,
185
202
  plans,
203
+ coupons,
186
204
  });
187
205
  `,
188
206
  root: `import config from "./revstack";
@@ -208,12 +226,24 @@ export const addons = {
208
226
  name: "Premium Support",
209
227
  description: "24/7 dedicated support.",
210
228
  type: "recurring",
211
- prices: [
212
- { amount: 20000, currency: "USD", billing_interval: "monthly" }
213
- ],
229
+ amount: 20000,
230
+ currency: "USD",
231
+ billing_interval: "monthly",
214
232
  features: {}
215
233
  })
216
234
  };
235
+ `,
236
+ coupons: `import type { DiscountDef } from "@revstackhq/core";
237
+
238
+ export const coupons: DiscountDef[] = [
239
+ {
240
+ code: "STARTUP_ACCELERATOR",
241
+ name: "Startup Program Credits",
242
+ type: "amount",
243
+ value: 500000, // $5,000 credit
244
+ duration: "forever",
245
+ }
246
+ ];
217
247
  `,
218
248
  plans: `import { definePlan } from "@revstackhq/core";
219
249
  import { features } from "./features";
@@ -233,12 +263,12 @@ export const plans = {
233
263
  is_default: false,
234
264
  is_public: true,
235
265
  type: "paid",
236
- available_addons: ["premium_support"],
237
266
  prices: [
238
267
  {
239
268
  amount: 0,
240
269
  currency: "USD",
241
270
  billing_interval: "monthly",
271
+ available_addons: ["premium_support"],
242
272
  overage_configuration: {
243
273
  api_requests: { overage_amount: 15, overage_unit: 1000 }, // $0.15 per 1k extra requests
244
274
  storage_gb: { overage_amount: 50, overage_unit: 1 }, // $0.50 per extra GB
@@ -256,11 +286,392 @@ export const plans = {
256
286
  import { features } from "./features";
257
287
  import { addons } from "./addons";
258
288
  import { plans } from "./plans";
289
+ import { coupons } from "./coupons";
290
+
291
+ export default defineConfig({
292
+ features,
293
+ addons,
294
+ plans,
295
+ coupons,
296
+ });
297
+ `,
298
+ root: `import config from "./revstack";
299
+
300
+ export default config;
301
+ `
302
+ };
303
+
304
+ // src/commands/templates/ecommerce-platform.ts
305
+ var ecommercePlatform = {
306
+ features: `import { defineFeature } from "@revstackhq/core";
307
+
308
+ export const features = {
309
+ orders: defineFeature({ name: "Monthly Orders", type: "metered", unit_type: "count" }),
310
+ storefronts: defineFeature({ name: "Storefronts", type: "static", unit_type: "count" }),
311
+ advanced_analytics: defineFeature({ name: "Advanced Analytics", type: "boolean", unit_type: "custom" }),
312
+ };
313
+ `,
314
+ addons: `import { defineAddon } from "@revstackhq/core";
315
+ import { features } from "./features";
316
+
317
+ export const addons = {
318
+ extra_storefront: defineAddon<typeof features>({
319
+ name: "Additional Storefront",
320
+ description: "Launch a new brand under the same account.",
321
+ type: "recurring",
322
+ amount: 5000,
323
+ currency: "USD",
324
+ billing_interval: "monthly",
325
+ features: {
326
+ storefronts: { value_limit: 1, type: "increment", is_hard_limit: true },
327
+ }
328
+ }),
329
+ custom_domain_ssl: defineAddon<typeof features>({
330
+ name: "Custom Domain & SSL",
331
+ description: "Secure your storefront with a custom domain.",
332
+ type: "recurring",
333
+ amount: 1500,
334
+ currency: "USD",
335
+ billing_interval: "monthly",
336
+ features: {}
337
+ })
338
+ };
339
+ `,
340
+ plans: `import { definePlan } from "@revstackhq/core";
341
+ import { features } from "./features";
342
+
343
+ export const plans = {
344
+ default: definePlan<typeof features>({
345
+ name: "Default Sandbox",
346
+ description: "Test your store safely before going live.",
347
+ is_default: true,
348
+ is_public: false,
349
+ type: "free",
350
+ features: {},
351
+ }),
352
+ basic: definePlan<typeof features>({
353
+ name: "Basic Commerce",
354
+ description: "Everything you need to sell online.",
355
+ is_default: false,
356
+ is_public: true,
357
+ type: "paid",
358
+ prices: [
359
+ {
360
+ amount: 2900,
361
+ currency: "USD",
362
+ billing_interval: "monthly",
363
+ available_addons: ["custom_domain_ssl"],
364
+ overage_configuration: {
365
+ orders: { overage_amount: 50, overage_unit: 100 } // $0.50 per 100 extra orders
366
+ }
367
+ }
368
+ ],
369
+ features: {
370
+ orders: { value_limit: 500, is_hard_limit: false, reset_period: "monthly" },
371
+ storefronts: { value_limit: 1, is_hard_limit: true },
372
+ advanced_analytics: { value_bool: false },
373
+ },
374
+ }),
375
+ pro: definePlan<typeof features>({
376
+ name: "Pro Seller",
377
+ description: "For scaling businesses.",
378
+ is_default: false,
379
+ is_public: true,
380
+ type: "paid",
381
+ prices: [
382
+ {
383
+ amount: 19900,
384
+ currency: "USD",
385
+ billing_interval: "monthly",
386
+ available_addons: ["extra_storefront", "custom_domain_ssl"],
387
+ overage_configuration: {
388
+ orders: { overage_amount: 30, overage_unit: 100 } // $0.30 per 100 extra orders
389
+ }
390
+ }
391
+ ],
392
+ features: {
393
+ orders: { value_limit: 5000, is_hard_limit: false, reset_period: "monthly" },
394
+ storefronts: { value_limit: 2, is_hard_limit: true },
395
+ advanced_analytics: { value_bool: true },
396
+ },
397
+ }),
398
+ };
399
+ `,
400
+ coupons: `import type { DiscountDef } from "@revstackhq/core";
401
+
402
+ export const coupons: DiscountDef[] = [
403
+ {
404
+ code: "BFCM_PROMO",
405
+ name: "Black Friday Cyber Monday 20%",
406
+ type: "percent",
407
+ value: 20,
408
+ duration: "repeating",
409
+ duration_in_months: 6,
410
+ expires_at: "2024-11-29T00:00:00Z", // Ephemeral timestamp
411
+ max_redemptions: 5000
412
+ },
413
+ {
414
+ code: "FIRST_MONTH_FREE",
415
+ name: "New Store Launch",
416
+ type: "percent",
417
+ value: 100,
418
+ duration: "repeating",
419
+ duration_in_months: 1,
420
+ applies_to_plans: ["basic"]
421
+ }
422
+ ];
423
+ `,
424
+ index: `import { defineConfig } from "@revstackhq/core";
425
+ import { features } from "./features";
426
+ import { addons } from "./addons";
427
+ import { plans } from "./plans";
428
+ import { coupons } from "./coupons";
429
+
430
+ export default defineConfig({
431
+ features,
432
+ addons,
433
+ plans,
434
+ coupons,
435
+ });
436
+ `,
437
+ root: `import config from "./revstack";
438
+
439
+ export default config;
440
+ `
441
+ };
442
+
443
+ // src/commands/templates/developer-tools.ts
444
+ var developerTools = {
445
+ features: `import { defineFeature } from "@revstackhq/core";
446
+
447
+ export const features = {
448
+ bandwidth_gb: defineFeature({ name: "Bandwidth (GB)", type: "metered", unit_type: "custom" }),
449
+ compute_hours: defineFeature({ name: "Compute (GB-Hours)", type: "metered", unit_type: "custom" }),
450
+ serverless_invokes: defineFeature({ name: "Serverless Invocations", type: "metered", unit_type: "count" }),
451
+ sso_auth: defineFeature({ name: "Enterprise SSO", type: "boolean", unit_type: "custom" })
452
+ };
453
+ `,
454
+ addons: `import { defineAddon } from "@revstackhq/core";
455
+ import { features } from "./features";
456
+
457
+ export const addons = {
458
+ dedicated_ipv4: defineAddon<typeof features>({
459
+ name: "Dedicated IPv4 Address",
460
+ description: "Assign a static IP to your deployments.",
461
+ type: "recurring",
462
+ amount: 500,
463
+ currency: "USD",
464
+ billing_interval: "monthly",
465
+ features: {}
466
+ }),
467
+ premium_sla: defineAddon<typeof features>({
468
+ name: "Premium Escalation SLA",
469
+ description: "Direct engineering support with 30-min response time.",
470
+ type: "recurring",
471
+ amount: 150000,
472
+ currency: "USD",
473
+ billing_interval: "monthly",
474
+ features: {}
475
+ })
476
+ };
477
+ `,
478
+ plans: `import { definePlan } from "@revstackhq/core";
479
+ import { features } from "./features";
480
+
481
+ export const plans = {
482
+ default: definePlan<typeof features>({
483
+ name: "Hobby",
484
+ description: "For personal or non-commercial projects.",
485
+ is_default: true,
486
+ is_public: true,
487
+ type: "free",
488
+ features: {
489
+ bandwidth_gb: { value_limit: 100, is_hard_limit: true, reset_period: "monthly" },
490
+ compute_hours: { value_limit: 100, is_hard_limit: true, reset_period: "monthly" },
491
+ serverless_invokes: { value_limit: 100000, is_hard_limit: true, reset_period: "monthly" },
492
+ sso_auth: { value_bool: false }
493
+ },
494
+ }),
495
+ pro: definePlan<typeof features>({
496
+ name: "Pro",
497
+ description: "For production apps and growing teams.",
498
+ is_default: false,
499
+ is_public: true,
500
+ type: "paid",
501
+ prices: [
502
+ {
503
+ amount: 2000,
504
+ currency: "USD",
505
+ billing_interval: "monthly",
506
+ available_addons: ["dedicated_ipv4"],
507
+ overage_configuration: {
508
+ bandwidth_gb: { overage_amount: 40, overage_unit: 100 }, // $0.40 per 100GB extra
509
+ compute_hours: { overage_amount: 2, overage_unit: 1 }, // $0.02 per extra GB hr
510
+ serverless_invokes: { overage_amount: 50, overage_unit: 1000000 } // $0.50 per 1M invokes
511
+ }
512
+ }
513
+ ],
514
+ features: {
515
+ bandwidth_gb: { value_limit: 1000, is_hard_limit: false, reset_period: "monthly" },
516
+ compute_hours: { value_limit: 1000, is_hard_limit: false, reset_period: "monthly" },
517
+ serverless_invokes: { value_limit: 5000000, is_hard_limit: false, reset_period: "monthly" },
518
+ sso_auth: { value_bool: false }
519
+ },
520
+ }),
521
+ enterprise: definePlan<typeof features>({
522
+ name: "Enterprise",
523
+ description: "Custom infrastructure and legal compliance.",
524
+ is_default: false,
525
+ is_public: true,
526
+ type: "custom",
527
+ prices: [],
528
+ features: {
529
+ bandwidth_gb: { value_limit: 50000, is_hard_limit: false, reset_period: "monthly" },
530
+ compute_hours: { value_limit: 10000, is_hard_limit: false, reset_period: "monthly" },
531
+ serverless_invokes: { value_limit: 100000000, is_hard_limit: false, reset_period: "monthly" },
532
+ sso_auth: { value_bool: true }
533
+ },
534
+ }),
535
+ };
536
+ `,
537
+ coupons: `import type { DiscountDef } from "@revstackhq/core";
538
+
539
+ export const coupons: DiscountDef[] = [
540
+ {
541
+ code: "YCOMBINATOR",
542
+ name: "YC Startup Accelerator Credit",
543
+ type: "amount",
544
+ value: 1000000, // $10,000 credit
545
+ duration: "forever",
546
+ applies_to_plans: ["pro", "enterprise"]
547
+ }
548
+ ];
549
+ `,
550
+ index: `import { defineConfig } from "@revstackhq/core";
551
+ import { features } from "./features";
552
+ import { addons } from "./addons";
553
+ import { plans } from "./plans";
554
+ import { coupons } from "./coupons";
259
555
 
260
556
  export default defineConfig({
261
557
  features,
262
558
  addons,
263
559
  plans,
560
+ coupons,
561
+ });
562
+ `,
563
+ root: `import config from "./revstack";
564
+
565
+ export default config;
566
+ `
567
+ };
568
+
569
+ // src/commands/templates/ai-agent-platform.ts
570
+ var aiAgentPlatform = {
571
+ features: `import { defineFeature } from "@revstackhq/core";
572
+
573
+ export const features = {
574
+ llm_tokens: defineFeature({ name: "LLM Tokens (Input+Output)", type: "metered", unit_type: "count" }),
575
+ active_agents: defineFeature({ name: "Concurrent Agents", type: "static", unit_type: "count" }),
576
+ vector_storage_gb: defineFeature({ name: "Vector Database (GB)", type: "metered", unit_type: "custom" }),
577
+ custom_fine_tuning: defineFeature({ name: "Model Fine-Tuning", type: "boolean", unit_type: "custom" })
578
+ };
579
+ `,
580
+ addons: `import { defineAddon } from "@revstackhq/core";
581
+ import { features } from "./features";
582
+
583
+ export const addons = {
584
+ extra_vector_storage: defineAddon<typeof features>({
585
+ name: "10GB Vector Storage Block",
586
+ description: "Retain long-term memory for your AI agents.",
587
+ type: "recurring",
588
+ amount: 1000,
589
+ currency: "USD",
590
+ billing_interval: "monthly",
591
+ features: {
592
+ vector_storage_gb: { value_limit: 10, type: "increment", is_hard_limit: false }
593
+ }
594
+ }),
595
+ fine_tuning_job: defineAddon<typeof features>({
596
+ name: "Fine-Tuning Job Runner",
597
+ description: "Pay once to run a distributed model fine-tuning job on your dataset.",
598
+ type: "one_time",
599
+ amount: 25000,
600
+ currency: "USD",
601
+ features: {
602
+ custom_fine_tuning: { has_access: true }
603
+ }
604
+ })
605
+ };
606
+ `,
607
+ plans: `import { definePlan } from "@revstackhq/core";
608
+ import { features } from "./features";
609
+
610
+ export const plans = {
611
+ default: definePlan<typeof features>({
612
+ name: "Free Preview",
613
+ description: "Trial sandbox using shared models.",
614
+ is_default: true,
615
+ is_public: true,
616
+ type: "free",
617
+ features: {
618
+ llm_tokens: { value_limit: 100000, is_hard_limit: true, reset_period: "monthly" },
619
+ active_agents: { value_limit: 1, is_hard_limit: true },
620
+ vector_storage_gb: { value_limit: 0, is_hard_limit: true, reset_period: "never" },
621
+ custom_fine_tuning: { value_bool: false }
622
+ },
623
+ }),
624
+ builder: definePlan<typeof features>({
625
+ name: "AI Builder",
626
+ description: "High concurrency and dedicated model endpoints.",
627
+ is_default: false,
628
+ is_public: true,
629
+ type: "paid",
630
+ prices: [
631
+ {
632
+ amount: 4900,
633
+ currency: "USD",
634
+ billing_interval: "monthly",
635
+ available_addons: ["extra_vector_storage", "fine_tuning_job"],
636
+ overage_configuration: {
637
+ llm_tokens: { overage_amount: 15, overage_unit: 1000000 } // $0.15 per 1M tokens
638
+ }
639
+ }
640
+ ],
641
+ features: {
642
+ llm_tokens: { value_limit: 10000000, is_hard_limit: false, reset_period: "monthly" }, // 10M free tokens included
643
+ active_agents: { value_limit: 10, is_hard_limit: true },
644
+ vector_storage_gb: { value_limit: 5, is_hard_limit: true, reset_period: "never" }, // Hard limit until they buy the addon
645
+ custom_fine_tuning: { value_bool: false } // Only unlocked via the one-off addon
646
+ },
647
+ }),
648
+ };
649
+ `,
650
+ coupons: `import type { DiscountDef } from "@revstackhq/core";
651
+
652
+ export const coupons: DiscountDef[] = [
653
+ {
654
+ code: "BETA_TESTER",
655
+ name: "Early Beta Access Discount",
656
+ type: "percent",
657
+ value: 50,
658
+ duration: "repeating",
659
+ duration_in_months: 12,
660
+ max_redemptions: 100
661
+ }
662
+ ];
663
+ `,
664
+ index: `import { defineConfig } from "@revstackhq/core";
665
+ import { features } from "./features";
666
+ import { addons } from "./addons";
667
+ import { plans } from "./plans";
668
+ import { coupons } from "./coupons";
669
+
670
+ export default defineConfig({
671
+ features,
672
+ addons,
673
+ plans,
674
+ coupons,
264
675
  });
265
676
  `,
266
677
  root: `import config from "./revstack";
@@ -273,13 +684,16 @@ export default config;
273
684
  var TEMPLATES = {
274
685
  starter,
275
686
  "b2b-saas": b2bSaas,
276
- "usage-based": usageBased
687
+ "usage-based": usageBased,
688
+ "ecommerce-platform": ecommercePlatform,
689
+ "developer-tools": developerTools,
690
+ "ai-agent-platform": aiAgentPlatform
277
691
  };
278
692
 
279
693
  // src/commands/init.ts
280
694
  var initCommand = new Command("init").description("Scaffold a new revstack.config.ts in the current directory").option(
281
695
  "-t, --template <name>",
282
- "Choose a starting template (starter, b2b-saas, usage-based)",
696
+ `Choose a starting template (${Object.keys(TEMPLATES).join(", ")})`,
283
697
  "starter"
284
698
  ).action(async (options) => {
285
699
  const templateName = options.template || "starter";
@@ -316,6 +730,11 @@ var initCommand = new Command("init").description("Scaffold a new revstack.confi
316
730
  template.addons,
317
731
  "utf-8"
318
732
  );
733
+ fs.writeFileSync(
734
+ path.resolve(revstackDir, "coupons.ts"),
735
+ template.coupons,
736
+ "utf-8"
737
+ );
319
738
  fs.writeFileSync(
320
739
  path.resolve(revstackDir, "plans.ts"),
321
740
  template.plans,