@nexus-framework/cli 0.1.1

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 (124) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +545 -0
  3. package/bin/nexus.js +3 -0
  4. package/dist/cli.d.ts +7 -0
  5. package/dist/cli.d.ts.map +1 -0
  6. package/dist/cli.js +30 -0
  7. package/dist/cli.js.map +1 -0
  8. package/dist/commands/adopt.d.ts +25 -0
  9. package/dist/commands/adopt.d.ts.map +1 -0
  10. package/dist/commands/adopt.js +73 -0
  11. package/dist/commands/adopt.js.map +1 -0
  12. package/dist/commands/init.d.ts +24 -0
  13. package/dist/commands/init.d.ts.map +1 -0
  14. package/dist/commands/init.js +102 -0
  15. package/dist/commands/init.js.map +1 -0
  16. package/dist/generators/ai-config.d.ts +26 -0
  17. package/dist/generators/ai-config.d.ts.map +1 -0
  18. package/dist/generators/ai-config.js +305 -0
  19. package/dist/generators/ai-config.js.map +1 -0
  20. package/dist/generators/ci-cd.d.ts +12 -0
  21. package/dist/generators/ci-cd.d.ts.map +1 -0
  22. package/dist/generators/ci-cd.js +60 -0
  23. package/dist/generators/ci-cd.js.map +1 -0
  24. package/dist/generators/config.d.ts +12 -0
  25. package/dist/generators/config.d.ts.map +1 -0
  26. package/dist/generators/config.js +92 -0
  27. package/dist/generators/config.js.map +1 -0
  28. package/dist/generators/docs.d.ts +19 -0
  29. package/dist/generators/docs.d.ts.map +1 -0
  30. package/dist/generators/docs.js +431 -0
  31. package/dist/generators/docs.js.map +1 -0
  32. package/dist/generators/index.d.ts +24 -0
  33. package/dist/generators/index.d.ts.map +1 -0
  34. package/dist/generators/index.js +154 -0
  35. package/dist/generators/index.js.map +1 -0
  36. package/dist/generators/landing-page.d.ts +13 -0
  37. package/dist/generators/landing-page.d.ts.map +1 -0
  38. package/dist/generators/landing-page.js +448 -0
  39. package/dist/generators/landing-page.js.map +1 -0
  40. package/dist/generators/structure.d.ts +24 -0
  41. package/dist/generators/structure.d.ts.map +1 -0
  42. package/dist/generators/structure.js +174 -0
  43. package/dist/generators/structure.js.map +1 -0
  44. package/dist/generators/tests.d.ts +12 -0
  45. package/dist/generators/tests.d.ts.map +1 -0
  46. package/dist/generators/tests.js +97 -0
  47. package/dist/generators/tests.js.map +1 -0
  48. package/dist/index.d.ts +12 -0
  49. package/dist/index.d.ts.map +1 -0
  50. package/dist/index.js +11 -0
  51. package/dist/index.js.map +1 -0
  52. package/dist/prompts/data-strategy.d.ts +8 -0
  53. package/dist/prompts/data-strategy.d.ts.map +1 -0
  54. package/dist/prompts/data-strategy.js +34 -0
  55. package/dist/prompts/data-strategy.js.map +1 -0
  56. package/dist/prompts/features.d.ts +14 -0
  57. package/dist/prompts/features.d.ts.map +1 -0
  58. package/dist/prompts/features.js +46 -0
  59. package/dist/prompts/features.js.map +1 -0
  60. package/dist/prompts/frameworks.d.ts +9 -0
  61. package/dist/prompts/frameworks.d.ts.map +1 -0
  62. package/dist/prompts/frameworks.js +44 -0
  63. package/dist/prompts/frameworks.js.map +1 -0
  64. package/dist/prompts/index.d.ts +13 -0
  65. package/dist/prompts/index.d.ts.map +1 -0
  66. package/dist/prompts/index.js +67 -0
  67. package/dist/prompts/index.js.map +1 -0
  68. package/dist/prompts/patterns.d.ts +8 -0
  69. package/dist/prompts/patterns.d.ts.map +1 -0
  70. package/dist/prompts/patterns.js +44 -0
  71. package/dist/prompts/patterns.js.map +1 -0
  72. package/dist/prompts/project-type.d.ts +8 -0
  73. package/dist/prompts/project-type.d.ts.map +1 -0
  74. package/dist/prompts/project-type.js +29 -0
  75. package/dist/prompts/project-type.js.map +1 -0
  76. package/dist/types/config.d.ts +50 -0
  77. package/dist/types/config.d.ts.map +1 -0
  78. package/dist/types/config.js +7 -0
  79. package/dist/types/config.js.map +1 -0
  80. package/dist/types/index.d.ts +5 -0
  81. package/dist/types/index.d.ts.map +1 -0
  82. package/dist/types/index.js +2 -0
  83. package/dist/types/index.js.map +1 -0
  84. package/dist/types/prompts.d.ts +39 -0
  85. package/dist/types/prompts.d.ts.map +1 -0
  86. package/dist/types/prompts.js +7 -0
  87. package/dist/types/prompts.js.map +1 -0
  88. package/dist/types/templates.d.ts +38 -0
  89. package/dist/types/templates.d.ts.map +1 -0
  90. package/dist/types/templates.js +7 -0
  91. package/dist/types/templates.js.map +1 -0
  92. package/dist/utils/file-system.d.ts +27 -0
  93. package/dist/utils/file-system.d.ts.map +1 -0
  94. package/dist/utils/file-system.js +53 -0
  95. package/dist/utils/file-system.js.map +1 -0
  96. package/dist/utils/git.d.ts +14 -0
  97. package/dist/utils/git.d.ts.map +1 -0
  98. package/dist/utils/git.js +40 -0
  99. package/dist/utils/git.js.map +1 -0
  100. package/dist/utils/index.d.ts +8 -0
  101. package/dist/utils/index.d.ts.map +1 -0
  102. package/dist/utils/index.js +7 -0
  103. package/dist/utils/index.js.map +1 -0
  104. package/dist/utils/logger.d.ts +38 -0
  105. package/dist/utils/logger.d.ts.map +1 -0
  106. package/dist/utils/logger.js +106 -0
  107. package/dist/utils/logger.js.map +1 -0
  108. package/dist/utils/package-manager.d.ts +16 -0
  109. package/dist/utils/package-manager.d.ts.map +1 -0
  110. package/dist/utils/package-manager.js +51 -0
  111. package/dist/utils/package-manager.js.map +1 -0
  112. package/dist/utils/project-detector.d.ts +55 -0
  113. package/dist/utils/project-detector.d.ts.map +1 -0
  114. package/dist/utils/project-detector.js +125 -0
  115. package/dist/utils/project-detector.js.map +1 -0
  116. package/dist/utils/validator.d.ts +25 -0
  117. package/dist/utils/validator.d.ts.map +1 -0
  118. package/dist/utils/validator.js +59 -0
  119. package/dist/utils/validator.js.map +1 -0
  120. package/dist/version.d.ts +7 -0
  121. package/dist/version.d.ts.map +1 -0
  122. package/dist/version.js +7 -0
  123. package/dist/version.js.map +1 -0
  124. package/package.json +90 -0
@@ -0,0 +1,44 @@
1
+ /**
2
+ * NEXUS CLI - Application Patterns Prompt
3
+ *
4
+ * Asks the user which application patterns to include.
5
+ */
6
+ import { checkbox } from '@inquirer/prompts';
7
+ export async function promptPatterns() {
8
+ return checkbox({
9
+ message: 'Which application patterns do you need? (select all that apply)',
10
+ choices: [
11
+ {
12
+ value: 'pwa',
13
+ name: '📲 Progressive Web App (PWA)',
14
+ description: 'Installable, works offline, push notifications',
15
+ },
16
+ {
17
+ value: 'offline-first',
18
+ name: '📡 Offline First',
19
+ description: 'Full functionality without internet, smart sync',
20
+ },
21
+ {
22
+ value: 'theming',
23
+ name: '🎨 Theming / Dark Mode',
24
+ description: 'CSS variable-based theme system with light/dark toggle',
25
+ },
26
+ {
27
+ value: 'i18n',
28
+ name: '🌍 Internationalization (i18n)',
29
+ description: 'Multi-language support with translation files',
30
+ },
31
+ {
32
+ value: 'white-label',
33
+ name: '🏷️ White Label',
34
+ description: 'Rebrandable app with configurable themes and logos',
35
+ },
36
+ {
37
+ value: 'real-time',
38
+ name: '⚡ Real-time',
39
+ description: 'WebSocket or SSE for live updates',
40
+ },
41
+ ],
42
+ });
43
+ }
44
+ //# sourceMappingURL=patterns.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"patterns.js","sourceRoot":"","sources":["../../src/prompts/patterns.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAI7C,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,OAAO,QAAQ,CAAa;QAC1B,OAAO,EAAE,iEAAiE;QAC1E,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,8BAA8B;gBACpC,WAAW,EAAE,gDAAgD;aAC9D;YACD;gBACE,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,kBAAkB;gBACxB,WAAW,EAAE,iDAAiD;aAC/D;YACD;gBACE,KAAK,EAAE,SAAS;gBAChB,IAAI,EAAE,wBAAwB;gBAC9B,WAAW,EAAE,wDAAwD;aACtE;YACD;gBACE,KAAK,EAAE,MAAM;gBACb,IAAI,EAAE,gCAAgC;gBACtC,WAAW,EAAE,+CAA+C;aAC7D;YACD;gBACE,KAAK,EAAE,aAAa;gBACpB,IAAI,EAAE,kBAAkB;gBACxB,WAAW,EAAE,oDAAoD;aAClE;YACD;gBACE,KAAK,EAAE,WAAW;gBAClB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,mCAAmC;aACjD;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * NEXUS CLI - Project Type Prompt
3
+ *
4
+ * Asks the user what kind of project they're building.
5
+ */
6
+ import type { ProjectType } from '../types/config.js';
7
+ export declare function promptProjectType(): Promise<ProjectType>;
8
+ //# sourceMappingURL=project-type.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-type.d.ts","sourceRoot":"","sources":["../../src/prompts/project-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAIH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAEtD,wBAAsB,iBAAiB,IAAI,OAAO,CAAC,WAAW,CAAC,CAqB9D"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * NEXUS CLI - Project Type Prompt
3
+ *
4
+ * Asks the user what kind of project they're building.
5
+ */
6
+ import { select } from '@inquirer/prompts';
7
+ export async function promptProjectType() {
8
+ return select({
9
+ message: 'What are you building?',
10
+ choices: [
11
+ {
12
+ value: 'web',
13
+ name: '🌐 Web Application',
14
+ description: 'Full-stack or frontend web app (React, Next.js, Svelte, etc.)',
15
+ },
16
+ {
17
+ value: 'api',
18
+ name: '⚡ API / Backend Service',
19
+ description: 'REST or GraphQL API (Express, Fastify, NestJS)',
20
+ },
21
+ {
22
+ value: 'monorepo',
23
+ name: '📦 Monorepo',
24
+ description: 'Multi-package workspace (Turborepo)',
25
+ },
26
+ ],
27
+ });
28
+ }
29
+ //# sourceMappingURL=project-type.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-type.js","sourceRoot":"","sources":["../../src/prompts/project-type.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAI3C,MAAM,CAAC,KAAK,UAAU,iBAAiB;IACrC,OAAO,MAAM,CAAc;QACzB,OAAO,EAAE,wBAAwB;QACjC,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,oBAAoB;gBAC1B,WAAW,EAAE,+DAA+D;aAC7E;YACD;gBACE,KAAK,EAAE,KAAK;gBACZ,IAAI,EAAE,yBAAyB;gBAC/B,WAAW,EAAE,gDAAgD;aAC9D;YACD;gBACE,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE,aAAa;gBACnB,WAAW,EAAE,qCAAqC;aACnD;SACF;KACF,CAAC,CAAC;AACL,CAAC"}
@@ -0,0 +1,50 @@
1
+ /**
2
+ * NEXUS CLI - Type Definitions: Configuration
3
+ *
4
+ * Core configuration types used throughout the CLI.
5
+ */
6
+ /** Supported project types */
7
+ export type ProjectType = 'web' | 'api' | 'monorepo' | 'mobile' | 'desktop';
8
+ /** Data strategy options */
9
+ export type DataStrategy = 'local-only' | 'local-first' | 'cloud-first' | 'hybrid';
10
+ /** Application pattern flags */
11
+ export type AppPattern = 'pwa' | 'offline-first' | 'theming' | 'white-label' | 'i18n' | 'real-time';
12
+ /** Supported frontend frameworks */
13
+ export type FrontendFramework = 'nextjs' | 'react-vite' | 'sveltekit' | 'nuxt' | 'remix' | 'astro';
14
+ /** Supported backend frameworks */
15
+ export type BackendFramework = 'express' | 'fastify' | 'nestjs' | 'none';
16
+ /** Backend strategy options */
17
+ export type BackendStrategy = 'integrated' | 'separate' | 'serverless' | 'baas';
18
+ /** Supported test frameworks */
19
+ export type TestFramework = 'vitest' | 'jest' | 'none';
20
+ /** Supported package managers */
21
+ export type PackageManager = 'npm' | 'yarn' | 'pnpm';
22
+ /** Full project configuration resolved from user prompts */
23
+ export interface NexusConfig {
24
+ projectName: string;
25
+ projectType: ProjectType;
26
+ dataStrategy: DataStrategy;
27
+ appPatterns: AppPattern[];
28
+ frontendFramework: FrontendFramework;
29
+ backendStrategy: BackendStrategy;
30
+ backendFramework: BackendFramework;
31
+ testFramework: TestFramework;
32
+ packageManager: PackageManager;
33
+ git: boolean;
34
+ installDeps: boolean;
35
+ }
36
+ /** Partial config for incremental prompt building */
37
+ export type PartialNexusConfig = Partial<NexusConfig> & {
38
+ projectName: string;
39
+ };
40
+ /** NEXUS manifest.json shape (written into generated projects) */
41
+ export interface NexusManifest {
42
+ version: string;
43
+ generatedAt: string;
44
+ config: NexusConfig;
45
+ cli: {
46
+ version: string;
47
+ name: string;
48
+ };
49
+ }
50
+ //# sourceMappingURL=config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,8BAA8B;AAC9B,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,KAAK,GAAG,UAAU,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5E,4BAA4B;AAC5B,MAAM,MAAM,YAAY,GAAG,YAAY,GAAG,aAAa,GAAG,aAAa,GAAG,QAAQ,CAAC;AAEnF,gCAAgC;AAChC,MAAM,MAAM,UAAU,GAAG,KAAK,GAAG,eAAe,GAAG,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,WAAW,CAAC;AAEpG,oCAAoC;AACpC,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,YAAY,GAAG,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnG,mCAAmC;AACnC,MAAM,MAAM,gBAAgB,GAAG,SAAS,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,CAAC;AAEzE,+BAA+B;AAC/B,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,UAAU,GAAG,YAAY,GAAG,MAAM,CAAC;AAEhF,gCAAgC;AAChC,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,MAAM,GAAG,MAAM,CAAC;AAEvD,iCAAiC;AACjC,MAAM,MAAM,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,MAAM,CAAC;AAErD,4DAA4D;AAC5D,MAAM,WAAW,WAAW;IAC1B,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,YAAY,CAAC;IAC3B,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,iBAAiB,EAAE,iBAAiB,CAAC;IACrC,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,GAAG,EAAE,OAAO,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,qDAAqD;AACrD,MAAM,MAAM,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,GAAG;IAAE,WAAW,EAAE,MAAM,CAAA;CAAE,CAAC;AAEhF,kEAAkE;AAClE,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE;QACH,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * NEXUS CLI - Type Definitions: Configuration
3
+ *
4
+ * Core configuration types used throughout the CLI.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=config.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,5 @@
1
+ export type { NexusConfig, NexusManifest, PartialNexusConfig } from './config.js';
2
+ export type { AllPromptAnswers } from './prompts.js';
3
+ export type { GeneratedFile, GeneratorResult, TemplateContext } from './templates.js';
4
+ export type { ProjectInfo, ProjectSignals } from '../utils/project-detector.js';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAClF,YAAY,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AACrD,YAAY,EAAE,aAAa,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtF,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * NEXUS CLI - Type Definitions: Prompts
3
+ *
4
+ * Types for the interactive prompt system.
5
+ */
6
+ import type { AppPattern, BackendFramework, BackendStrategy, DataStrategy, FrontendFramework, PackageManager, ProjectType, TestFramework } from './config.js';
7
+ /** Answers from project-type prompt */
8
+ export interface ProjectTypeAnswers {
9
+ projectType: ProjectType;
10
+ }
11
+ /** Answers from data-strategy prompt */
12
+ export interface DataStrategyAnswers {
13
+ dataStrategy: DataStrategy;
14
+ }
15
+ /** Answers from patterns prompt */
16
+ export interface PatternsAnswers {
17
+ appPatterns: AppPattern[];
18
+ }
19
+ /** Answers from framework prompt */
20
+ export interface FrameworkAnswers {
21
+ frontendFramework: FrontendFramework;
22
+ }
23
+ /** Answers from backend prompt */
24
+ export interface BackendAnswers {
25
+ backendStrategy: BackendStrategy;
26
+ backendFramework: BackendFramework;
27
+ }
28
+ /** Answers from features/extras prompt */
29
+ export interface FeaturesAnswers {
30
+ testFramework: TestFramework;
31
+ packageManager: PackageManager;
32
+ git: boolean;
33
+ installDeps: boolean;
34
+ }
35
+ /** All prompt answers combined */
36
+ export type AllPromptAnswers = ProjectTypeAnswers & DataStrategyAnswers & PatternsAnswers & FrameworkAnswers & BackendAnswers & FeaturesAnswers & {
37
+ projectName: string;
38
+ };
39
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../../src/types/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EACV,UAAU,EACV,gBAAgB,EAChB,eAAe,EACf,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,aAAa,EACd,MAAM,aAAa,CAAC;AAErB,uCAAuC;AACvC,MAAM,WAAW,kBAAkB;IACjC,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED,wCAAwC;AACxC,MAAM,WAAW,mBAAmB;IAClC,YAAY,EAAE,YAAY,CAAC;CAC5B;AAED,mCAAmC;AACnC,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,UAAU,EAAE,CAAC;CAC3B;AAED,oCAAoC;AACpC,MAAM,WAAW,gBAAgB;IAC/B,iBAAiB,EAAE,iBAAiB,CAAC;CACtC;AAED,kCAAkC;AAClC,MAAM,WAAW,cAAc;IAC7B,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,gBAAgB,CAAC;CACpC;AAED,0CAA0C;AAC1C,MAAM,WAAW,eAAe;IAC9B,aAAa,EAAE,aAAa,CAAC;IAC7B,cAAc,EAAE,cAAc,CAAC;IAC/B,GAAG,EAAE,OAAO,CAAC;IACb,WAAW,EAAE,OAAO,CAAC;CACtB;AAED,kCAAkC;AAClC,MAAM,MAAM,gBAAgB,GAAG,kBAAkB,GAC/C,mBAAmB,GACnB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,eAAe,GAAG;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * NEXUS CLI - Type Definitions: Prompts
3
+ *
4
+ * Types for the interactive prompt system.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../../src/types/prompts.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * NEXUS CLI - Type Definitions: Templates
3
+ *
4
+ * Types for the template engine and generators.
5
+ */
6
+ import type { NexusConfig } from './config.js';
7
+ /** A single file to write during generation */
8
+ export interface GeneratedFile {
9
+ /** Relative path from project root (e.g. "src/app/page.tsx") */
10
+ path: string;
11
+ /** File content (already rendered if templated) */
12
+ content: string;
13
+ }
14
+ /** A directory to create during generation */
15
+ export interface GeneratedDirectory {
16
+ /** Relative path from project root */
17
+ path: string;
18
+ }
19
+ /** Result of a generator run */
20
+ export interface GeneratorResult {
21
+ files: GeneratedFile[];
22
+ directories: GeneratedDirectory[];
23
+ }
24
+ /** Template context passed to Mustache templates */
25
+ export interface TemplateContext {
26
+ projectName: string;
27
+ config: NexusConfig;
28
+ year: number;
29
+ date: string;
30
+ }
31
+ /** Template metadata stored alongside template files */
32
+ export interface TemplateManifest {
33
+ name: string;
34
+ description: string;
35
+ framework: string;
36
+ files: string[];
37
+ }
38
+ //# sourceMappingURL=templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../src/types/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAE/C,+CAA+C;AAC/C,MAAM,WAAW,aAAa;IAC5B,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,8CAA8C;AAC9C,MAAM,WAAW,kBAAkB;IACjC,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;CACd;AAED,gCAAgC;AAChC,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,aAAa,EAAE,CAAC;IACvB,WAAW,EAAE,kBAAkB,EAAE,CAAC;CACnC;AAED,oDAAoD;AACpD,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,WAAW,CAAC;IACpB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wDAAwD;AACxD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,EAAE,CAAC;CACjB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * NEXUS CLI - Type Definitions: Templates
3
+ *
4
+ * Types for the template engine and generators.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/types/templates.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,27 @@
1
+ /**
2
+ * NEXUS CLI - File System Utility
3
+ *
4
+ * Wrappers around fs-extra for project generation.
5
+ */
6
+ import type { GeneratedFile, GeneratedDirectory, TemplateContext } from '../types/templates.js';
7
+ /**
8
+ * Ensure a directory exists, creating it recursively if needed.
9
+ */
10
+ export declare function ensureDirectory(dirPath: string): Promise<void>;
11
+ /**
12
+ * Write a file, creating parent directories as needed.
13
+ */
14
+ export declare function writeFile(filePath: string, content: string): Promise<void>;
15
+ /**
16
+ * Write all generated files and directories to disk.
17
+ */
18
+ export declare function writeGeneratorResult(projectRoot: string, files: GeneratedFile[], directories: GeneratedDirectory[]): Promise<void>;
19
+ /**
20
+ * Read a template file and render it with Mustache.
21
+ */
22
+ export declare function renderTemplate(template: string, context: TemplateContext): string;
23
+ /**
24
+ * Check if a directory exists and is non-empty.
25
+ */
26
+ export declare function directoryExists(dirPath: string): Promise<boolean>;
27
+ //# sourceMappingURL=file-system.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.d.ts","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAOH,OAAO,KAAK,EAAE,aAAa,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAEhG;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEpE;AAED;;GAEG;AACH,wBAAsB,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGhF;AAED;;GAEG;AACH,wBAAsB,oBAAoB,CACxC,WAAW,EAAE,MAAM,EACnB,KAAK,EAAE,aAAa,EAAE,EACtB,WAAW,EAAE,kBAAkB,EAAE,GAChC,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,eAAe,GAAG,MAAM,CAEjF;AAED;;GAEG;AACH,wBAAsB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAOvE"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * NEXUS CLI - File System Utility
3
+ *
4
+ * Wrappers around fs-extra for project generation.
5
+ */
6
+ import path from 'node:path';
7
+ import fs from 'fs-extra';
8
+ import Mustache from 'mustache';
9
+ /**
10
+ * Ensure a directory exists, creating it recursively if needed.
11
+ */
12
+ export async function ensureDirectory(dirPath) {
13
+ await fs.ensureDir(dirPath);
14
+ }
15
+ /**
16
+ * Write a file, creating parent directories as needed.
17
+ */
18
+ export async function writeFile(filePath, content) {
19
+ await fs.ensureDir(path.dirname(filePath));
20
+ await fs.writeFile(filePath, content, 'utf-8');
21
+ }
22
+ /**
23
+ * Write all generated files and directories to disk.
24
+ */
25
+ export async function writeGeneratorResult(projectRoot, files, directories) {
26
+ // Create directories first
27
+ for (const dir of directories) {
28
+ await ensureDirectory(path.join(projectRoot, dir.path));
29
+ }
30
+ // Then write files
31
+ for (const file of files) {
32
+ await writeFile(path.join(projectRoot, file.path), file.content);
33
+ }
34
+ }
35
+ /**
36
+ * Read a template file and render it with Mustache.
37
+ */
38
+ export function renderTemplate(template, context) {
39
+ return Mustache.render(template, context);
40
+ }
41
+ /**
42
+ * Check if a directory exists and is non-empty.
43
+ */
44
+ export async function directoryExists(dirPath) {
45
+ try {
46
+ const stat = await fs.stat(dirPath);
47
+ return stat.isDirectory();
48
+ }
49
+ catch {
50
+ return false;
51
+ }
52
+ }
53
+ //# sourceMappingURL=file-system.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-system.js","sourceRoot":"","sources":["../../src/utils/file-system.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,QAAQ,MAAM,UAAU,CAAC;AAIhC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,MAAM,EAAE,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;AAC9B,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,SAAS,CAAC,QAAgB,EAAE,OAAe;IAC/D,MAAM,EAAE,CAAC,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3C,MAAM,EAAE,CAAC,SAAS,CAAC,QAAQ,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC;AACjD,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,oBAAoB,CACxC,WAAmB,EACnB,KAAsB,EACtB,WAAiC;IAEjC,2BAA2B;IAC3B,KAAK,MAAM,GAAG,IAAI,WAAW,EAAE,CAAC;QAC9B,MAAM,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC1D,CAAC;IAED,mBAAmB;IACnB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACnE,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAwB;IACvE,OAAO,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,OAAe;IACnD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;QACpC,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;IAC5B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * NEXUS CLI - Git Utility
3
+ *
4
+ * Git initialization and hook helpers.
5
+ */
6
+ /**
7
+ * Check if git is available on the system.
8
+ */
9
+ export declare function isGitInstalled(): Promise<boolean>;
10
+ /**
11
+ * Initialize a git repository in the given directory.
12
+ */
13
+ export declare function gitInit(cwd: string): Promise<boolean>;
14
+ //# sourceMappingURL=git.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAMH;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAOvD;AAED;;GAEG;AACH,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAgB3D"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * NEXUS CLI - Git Utility
3
+ *
4
+ * Git initialization and hook helpers.
5
+ */
6
+ import { execa } from 'execa';
7
+ import { logger } from './logger.js';
8
+ /**
9
+ * Check if git is available on the system.
10
+ */
11
+ export async function isGitInstalled() {
12
+ try {
13
+ await execa('git', ['--version']);
14
+ return true;
15
+ }
16
+ catch {
17
+ return false;
18
+ }
19
+ }
20
+ /**
21
+ * Initialize a git repository in the given directory.
22
+ */
23
+ export async function gitInit(cwd) {
24
+ try {
25
+ const hasGit = await isGitInstalled();
26
+ if (!hasGit) {
27
+ logger.warn('Git is not installed. Skipping git initialization.');
28
+ return false;
29
+ }
30
+ await execa('git', ['init'], { cwd });
31
+ await execa('git', ['add', '.'], { cwd });
32
+ await execa('git', ['commit', '-m', 'Initial commit from NEXUS CLI 🔮'], { cwd });
33
+ return true;
34
+ }
35
+ catch (err) {
36
+ logger.warn(`Failed to initialize git repository.: ${err instanceof Error ? err.message : String(err)}`);
37
+ return false;
38
+ }
39
+ }
40
+ //# sourceMappingURL=git.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"git.js","sourceRoot":"","sources":["../../src/utils/git.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAE9B,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAErC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,cAAc;IAClC,IAAI,CAAC;QACH,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;QAClC,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,OAAO,CAAC,GAAW;IACvC,IAAI,CAAC;QACH,MAAM,MAAM,GAAG,MAAM,cAAc,EAAE,CAAC;QACtC,IAAI,CAAC,MAAM,EAAE,CAAC;YACZ,MAAM,CAAC,IAAI,CAAC,oDAAoD,CAAC,CAAC;YAClE,OAAO,KAAK,CAAC;QACf,CAAC;QAED,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,MAAM,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QACtC,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,KAAK,EAAE,GAAG,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QAC1C,MAAM,KAAK,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE,IAAI,EAAE,kCAAkC,CAAC,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QAClF,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,CAAC,IAAI,CAAC,yCAAyC,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QACzG,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
@@ -0,0 +1,8 @@
1
+ export { logger } from './logger.js';
2
+ export { validateProjectName, sanitizeProjectName } from './validator.js';
3
+ export { detectPackageManager, getInstallCommand, getRunCommand } from './package-manager.js';
4
+ export { gitInit, isGitInstalled } from './git.js';
5
+ export { ensureDirectory, writeFile, writeGeneratorResult, renderTemplate } from './file-system.js';
6
+ export { isExistingProject, detectProject } from './project-detector.js';
7
+ export type { ProjectInfo, ProjectSignals } from './project-detector.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AACzE,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,7 @@
1
+ export { logger } from './logger.js';
2
+ export { validateProjectName, sanitizeProjectName } from './validator.js';
3
+ export { detectPackageManager, getInstallCommand, getRunCommand } from './package-manager.js';
4
+ export { gitInit, isGitInstalled } from './git.js';
5
+ export { ensureDirectory, writeFile, writeGeneratorResult, renderTemplate } from './file-system.js';
6
+ export { isExistingProject, detectProject } from './project-detector.js';
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC9F,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AACpG,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,38 @@
1
+ /**
2
+ * NEXUS CLI - Logger Utility
3
+ *
4
+ * Pretty, color-coded terminal output using Chalk.
5
+ */
6
+ /** Log an informational message */
7
+ export declare function info(message: string): void;
8
+ /** Log a success message */
9
+ export declare function success(message: string): void;
10
+ /** Log a warning message */
11
+ export declare function warn(message: string): void;
12
+ /** Log an error message */
13
+ export declare function error(message: string): void;
14
+ /** Log a branded NEXUS message */
15
+ export declare function nexus(message: string): void;
16
+ /** Print a blank line */
17
+ export declare function newline(): void;
18
+ /** Print a horizontal rule */
19
+ export declare function divider(): void;
20
+ /** Print the NEXUS banner */
21
+ export declare function banner(version: string): void;
22
+ /** Print final success with next steps */
23
+ export declare function complete(projectName: string): void;
24
+ /** Print adopt-mode completion with next steps */
25
+ export declare function adoptComplete(projectName: string): void;
26
+ export declare const logger: {
27
+ info: typeof info;
28
+ success: typeof success;
29
+ warn: typeof warn;
30
+ error: typeof error;
31
+ nexus: typeof nexus;
32
+ newline: typeof newline;
33
+ divider: typeof divider;
34
+ banner: typeof banner;
35
+ complete: typeof complete;
36
+ adoptComplete: typeof adoptComplete;
37
+ };
38
+ //# sourceMappingURL=logger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../../src/utils/logger.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAeH,mCAAmC;AACnC,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,4BAA4B;AAC5B,wBAAgB,OAAO,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE7C;AAED,4BAA4B;AAC5B,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE1C;AAED,2BAA2B;AAC3B,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAED,kCAAkC;AAClC,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAE3C;AAED,yBAAyB;AACzB,wBAAgB,OAAO,IAAI,IAAI,CAE9B;AAED,8BAA8B;AAC9B,wBAAgB,OAAO,IAAI,IAAI,CAE9B;AAED,6BAA6B;AAC7B,wBAAgB,MAAM,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAM5C;AAED,0CAA0C;AAC1C,wBAAgB,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAelD;AAED,kDAAkD;AAClD,wBAAgB,aAAa,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAsBvD;AAED,eAAO,MAAM,MAAM;;;;;;;;;;;CAWlB,CAAC"}
@@ -0,0 +1,106 @@
1
+ /**
2
+ * NEXUS CLI - Logger Utility
3
+ *
4
+ * Pretty, color-coded terminal output using Chalk.
5
+ */
6
+ import chalk from 'chalk';
7
+ /** Brand colors */
8
+ const COLORS = {
9
+ primary: chalk.cyan,
10
+ success: chalk.green,
11
+ warning: chalk.yellow,
12
+ error: chalk.red,
13
+ info: chalk.blue,
14
+ dim: chalk.dim,
15
+ bold: chalk.bold,
16
+ };
17
+ /** Log an informational message */
18
+ export function info(message) {
19
+ console.log(COLORS.info('ℹ'), message);
20
+ }
21
+ /** Log a success message */
22
+ export function success(message) {
23
+ console.log(COLORS.success('✔'), message);
24
+ }
25
+ /** Log a warning message */
26
+ export function warn(message) {
27
+ console.log(COLORS.warning('⚠'), message);
28
+ }
29
+ /** Log an error message */
30
+ export function error(message) {
31
+ console.log(COLORS.error('✖'), message);
32
+ }
33
+ /** Log a branded NEXUS message */
34
+ export function nexus(message) {
35
+ console.log(COLORS.primary('▸ NEXUS'), message);
36
+ }
37
+ /** Print a blank line */
38
+ export function newline() {
39
+ console.log();
40
+ }
41
+ /** Print a horizontal rule */
42
+ export function divider() {
43
+ console.log(COLORS.dim('━'.repeat(50)));
44
+ }
45
+ /** Print the NEXUS banner */
46
+ export function banner(version) {
47
+ newline();
48
+ console.log(COLORS.primary.bold(' 🔮 NEXUS CLI') + COLORS.dim(` v${version}`));
49
+ console.log(COLORS.dim(' AI-Native Project Scaffolding'));
50
+ divider();
51
+ newline();
52
+ }
53
+ /** Print final success with next steps */
54
+ export function complete(projectName) {
55
+ newline();
56
+ divider();
57
+ newline();
58
+ console.log(COLORS.success.bold(' ✅ Project created successfully!'));
59
+ newline();
60
+ console.log(COLORS.bold(' Next steps:'));
61
+ console.log(COLORS.primary(` cd ${projectName}`));
62
+ console.log(COLORS.primary(' npm run dev'));
63
+ newline();
64
+ console.log(COLORS.dim(' Open .nexus/docs/ to start filling in your project documentation.'));
65
+ console.log(COLORS.dim(' AI tools will use these files to understand your project.'));
66
+ newline();
67
+ divider();
68
+ newline();
69
+ }
70
+ /** Print adopt-mode completion with next steps */
71
+ export function adoptComplete(projectName) {
72
+ newline();
73
+ divider();
74
+ newline();
75
+ console.log(COLORS.success.bold(' ✅ NEXUS adopted successfully!'));
76
+ newline();
77
+ console.log(COLORS.bold(` "${projectName}" now has NEXUS documentation & AI config.`));
78
+ newline();
79
+ console.log(COLORS.bold(' What happens next:'));
80
+ console.log(COLORS.primary(' 1. Open your AI coding tool (Copilot, Cursor, Windsurf, etc.)'));
81
+ console.log(COLORS.primary(' 2. Ask it to do anything (e.g., "add a feature", "fix a bug")'));
82
+ console.log(COLORS.primary(' 3. It will detect the template docs and auto-populate them first'));
83
+ console.log(COLORS.primary(' 4. It will ask you questions for things it can\'t infer from code'));
84
+ newline();
85
+ console.log(COLORS.dim(' Files added:'));
86
+ console.log(COLORS.dim(' .nexus/docs/ — 8 structured documentation files (status: template)'));
87
+ console.log(COLORS.dim(' .nexus/ai/ — AI agent instructions (single source of truth)'));
88
+ console.log(COLORS.dim(' .cursorrules, .windsurfrules, .clinerules, AGENTS.md — AI tool pointers'));
89
+ console.log(COLORS.dim(' .github/copilot-instructions.md — GitHub Copilot config'));
90
+ newline();
91
+ divider();
92
+ newline();
93
+ }
94
+ export const logger = {
95
+ info,
96
+ success,
97
+ warn,
98
+ error,
99
+ nexus,
100
+ newline,
101
+ divider,
102
+ banner,
103
+ complete,
104
+ adoptComplete,
105
+ };
106
+ //# sourceMappingURL=logger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logger.js","sourceRoot":"","sources":["../../src/utils/logger.ts"],"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