create-nexo 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 (239) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +185 -0
  3. package/dist/api/index.d.ts +196 -0
  4. package/dist/api/index.d.ts.map +1 -0
  5. package/dist/api/index.js +390 -0
  6. package/dist/api/index.js.map +1 -0
  7. package/dist/bin/nexo.d.ts +3 -0
  8. package/dist/bin/nexo.d.ts.map +1 -0
  9. package/dist/bin/nexo.js +427 -0
  10. package/dist/bin/nexo.js.map +1 -0
  11. package/dist/configurators/core/framework.d.ts +3 -0
  12. package/dist/configurators/core/framework.d.ts.map +1 -0
  13. package/dist/configurators/core/framework.js +56 -0
  14. package/dist/configurators/core/framework.js.map +1 -0
  15. package/dist/configurators/core/index.d.ts +4 -0
  16. package/dist/configurators/core/index.d.ts.map +1 -0
  17. package/dist/configurators/core/index.js +4 -0
  18. package/dist/configurators/core/index.js.map +1 -0
  19. package/dist/configurators/core/language.d.ts +3 -0
  20. package/dist/configurators/core/language.d.ts.map +1 -0
  21. package/dist/configurators/core/language.js +59 -0
  22. package/dist/configurators/core/language.js.map +1 -0
  23. package/dist/configurators/core/variant.d.ts +3 -0
  24. package/dist/configurators/core/variant.d.ts.map +1 -0
  25. package/dist/configurators/core/variant.js +22 -0
  26. package/dist/configurators/core/variant.js.map +1 -0
  27. package/dist/configurators/index.d.ts +5 -0
  28. package/dist/configurators/index.d.ts.map +1 -0
  29. package/dist/configurators/index.js +6 -0
  30. package/dist/configurators/index.js.map +1 -0
  31. package/dist/configurators/project/auth.d.ts +3 -0
  32. package/dist/configurators/project/auth.d.ts.map +1 -0
  33. package/dist/configurators/project/auth.js +82 -0
  34. package/dist/configurators/project/auth.js.map +1 -0
  35. package/dist/configurators/project/cicd.d.ts +30 -0
  36. package/dist/configurators/project/cicd.d.ts.map +1 -0
  37. package/dist/configurators/project/cicd.js +289 -0
  38. package/dist/configurators/project/cicd.js.map +1 -0
  39. package/dist/configurators/project/i18n.d.ts +3 -0
  40. package/dist/configurators/project/i18n.d.ts.map +1 -0
  41. package/dist/configurators/project/i18n.js +67 -0
  42. package/dist/configurators/project/i18n.js.map +1 -0
  43. package/dist/configurators/project/index.d.ts +6 -0
  44. package/dist/configurators/project/index.d.ts.map +1 -0
  45. package/dist/configurators/project/index.js +6 -0
  46. package/dist/configurators/project/index.js.map +1 -0
  47. package/dist/configurators/project/mandatory.d.ts +3 -0
  48. package/dist/configurators/project/mandatory.d.ts.map +1 -0
  49. package/dist/configurators/project/mandatory.js +167 -0
  50. package/dist/configurators/project/mandatory.js.map +1 -0
  51. package/dist/configurators/project/structure.d.ts +3 -0
  52. package/dist/configurators/project/structure.d.ts.map +1 -0
  53. package/dist/configurators/project/structure.js +34 -0
  54. package/dist/configurators/project/structure.js.map +1 -0
  55. package/dist/configurators/state/dataFetching.d.ts +3 -0
  56. package/dist/configurators/state/dataFetching.d.ts.map +1 -0
  57. package/dist/configurators/state/dataFetching.js +23 -0
  58. package/dist/configurators/state/dataFetching.js.map +1 -0
  59. package/dist/configurators/state/forms.d.ts +3 -0
  60. package/dist/configurators/state/forms.d.ts.map +1 -0
  61. package/dist/configurators/state/forms.js +35 -0
  62. package/dist/configurators/state/forms.js.map +1 -0
  63. package/dist/configurators/state/index.d.ts +5 -0
  64. package/dist/configurators/state/index.d.ts.map +1 -0
  65. package/dist/configurators/state/index.js +5 -0
  66. package/dist/configurators/state/index.js.map +1 -0
  67. package/dist/configurators/state/routing.d.ts +3 -0
  68. package/dist/configurators/state/routing.d.ts.map +1 -0
  69. package/dist/configurators/state/routing.js +23 -0
  70. package/dist/configurators/state/routing.js.map +1 -0
  71. package/dist/configurators/state/state.d.ts +3 -0
  72. package/dist/configurators/state/state.d.ts.map +1 -0
  73. package/dist/configurators/state/state.js +91 -0
  74. package/dist/configurators/state/state.js.map +1 -0
  75. package/dist/configurators/styling/icons.d.ts +3 -0
  76. package/dist/configurators/styling/icons.d.ts.map +1 -0
  77. package/dist/configurators/styling/icons.js +27 -0
  78. package/dist/configurators/styling/icons.js.map +1 -0
  79. package/dist/configurators/styling/index.d.ts +4 -0
  80. package/dist/configurators/styling/index.d.ts.map +1 -0
  81. package/dist/configurators/styling/index.js +4 -0
  82. package/dist/configurators/styling/index.js.map +1 -0
  83. package/dist/configurators/styling/styling.d.ts +3 -0
  84. package/dist/configurators/styling/styling.d.ts.map +1 -0
  85. package/dist/configurators/styling/styling.js +62 -0
  86. package/dist/configurators/styling/styling.js.map +1 -0
  87. package/dist/configurators/styling/ui.d.ts +3 -0
  88. package/dist/configurators/styling/ui.d.ts.map +1 -0
  89. package/dist/configurators/styling/ui.js +188 -0
  90. package/dist/configurators/styling/ui.js.map +1 -0
  91. package/dist/core/index.d.ts +7 -0
  92. package/dist/core/index.d.ts.map +1 -0
  93. package/dist/core/index.js +7 -0
  94. package/dist/core/index.js.map +1 -0
  95. package/dist/core/lazy-loader.d.ts +57 -0
  96. package/dist/core/lazy-loader.d.ts.map +1 -0
  97. package/dist/core/lazy-loader.js +231 -0
  98. package/dist/core/lazy-loader.js.map +1 -0
  99. package/dist/core/parallel.d.ts +29 -0
  100. package/dist/core/parallel.d.ts.map +1 -0
  101. package/dist/core/parallel.js +127 -0
  102. package/dist/core/parallel.js.map +1 -0
  103. package/dist/core/presets.d.ts +10 -0
  104. package/dist/core/presets.d.ts.map +1 -0
  105. package/dist/core/presets.js +73 -0
  106. package/dist/core/presets.js.map +1 -0
  107. package/dist/core/prompts/core.d.ts +18 -0
  108. package/dist/core/prompts/core.d.ts.map +1 -0
  109. package/dist/core/prompts/core.js +420 -0
  110. package/dist/core/prompts/core.js.map +1 -0
  111. package/dist/core/prompts/filter.d.ts +34 -0
  112. package/dist/core/prompts/filter.d.ts.map +1 -0
  113. package/dist/core/prompts/filter.js +48 -0
  114. package/dist/core/prompts/filter.js.map +1 -0
  115. package/dist/core/prompts/index.d.ts +10 -0
  116. package/dist/core/prompts/index.d.ts.map +1 -0
  117. package/dist/core/prompts/index.js +16 -0
  118. package/dist/core/prompts/index.js.map +1 -0
  119. package/dist/core/prompts/optional.d.ts +15 -0
  120. package/dist/core/prompts/optional.d.ts.map +1 -0
  121. package/dist/core/prompts/optional.js +228 -0
  122. package/dist/core/prompts/optional.js.map +1 -0
  123. package/dist/core/prompts/utils.d.ts +37 -0
  124. package/dist/core/prompts/utils.d.ts.map +1 -0
  125. package/dist/core/prompts/utils.js +72 -0
  126. package/dist/core/prompts/utils.js.map +1 -0
  127. package/dist/core/prompts.d.ts +6 -0
  128. package/dist/core/prompts.d.ts.map +1 -0
  129. package/dist/core/prompts.js +6 -0
  130. package/dist/core/prompts.js.map +1 -0
  131. package/dist/core/setup.d.ts +28 -0
  132. package/dist/core/setup.d.ts.map +1 -0
  133. package/dist/core/setup.js +96 -0
  134. package/dist/core/setup.js.map +1 -0
  135. package/dist/core/wizard.d.ts +39 -0
  136. package/dist/core/wizard.d.ts.map +1 -0
  137. package/dist/core/wizard.js +259 -0
  138. package/dist/core/wizard.js.map +1 -0
  139. package/dist/errors/index.d.ts +67 -0
  140. package/dist/errors/index.d.ts.map +1 -0
  141. package/dist/errors/index.js +253 -0
  142. package/dist/errors/index.js.map +1 -0
  143. package/dist/errors/messages.d.ts +56 -0
  144. package/dist/errors/messages.d.ts.map +1 -0
  145. package/dist/errors/messages.js +234 -0
  146. package/dist/errors/messages.js.map +1 -0
  147. package/dist/generators/index.d.ts +86 -0
  148. package/dist/generators/index.d.ts.map +1 -0
  149. package/dist/generators/index.js +441 -0
  150. package/dist/generators/index.js.map +1 -0
  151. package/dist/index.d.ts +16 -0
  152. package/dist/index.d.ts.map +1 -0
  153. package/dist/index.js +17 -0
  154. package/dist/index.js.map +1 -0
  155. package/dist/plugins/index.d.ts +48 -0
  156. package/dist/plugins/index.d.ts.map +1 -0
  157. package/dist/plugins/index.js +49 -0
  158. package/dist/plugins/index.js.map +1 -0
  159. package/dist/plugins/loader.d.ts +38 -0
  160. package/dist/plugins/loader.d.ts.map +1 -0
  161. package/dist/plugins/loader.js +229 -0
  162. package/dist/plugins/loader.js.map +1 -0
  163. package/dist/plugins/manager.d.ts +32 -0
  164. package/dist/plugins/manager.d.ts.map +1 -0
  165. package/dist/plugins/manager.js +220 -0
  166. package/dist/plugins/manager.js.map +1 -0
  167. package/dist/plugins/types.d.ts +186 -0
  168. package/dist/plugins/types.d.ts.map +1 -0
  169. package/dist/plugins/types.js +5 -0
  170. package/dist/plugins/types.js.map +1 -0
  171. package/dist/security/index.d.ts +59 -0
  172. package/dist/security/index.d.ts.map +1 -0
  173. package/dist/security/index.js +230 -0
  174. package/dist/security/index.js.map +1 -0
  175. package/dist/templates/entry.d.ts +9 -0
  176. package/dist/templates/entry.d.ts.map +1 -0
  177. package/dist/templates/entry.js +24 -0
  178. package/dist/templates/entry.js.map +1 -0
  179. package/dist/templates/index.d.ts +7 -0
  180. package/dist/templates/index.d.ts.map +1 -0
  181. package/dist/templates/index.js +10 -0
  182. package/dist/templates/index.js.map +1 -0
  183. package/dist/templates/main.d.ts +6 -0
  184. package/dist/templates/main.d.ts.map +1 -0
  185. package/dist/templates/main.js +72 -0
  186. package/dist/templates/main.js.map +1 -0
  187. package/dist/templates/readme.d.ts +3 -0
  188. package/dist/templates/readme.d.ts.map +1 -0
  189. package/dist/templates/readme.js +127 -0
  190. package/dist/templates/readme.js.map +1 -0
  191. package/dist/templates/styles.d.ts +6 -0
  192. package/dist/templates/styles.d.ts.map +1 -0
  193. package/dist/templates/styles.js +212 -0
  194. package/dist/templates/styles.js.map +1 -0
  195. package/dist/templates/welcome.d.ts +10 -0
  196. package/dist/templates/welcome.d.ts.map +1 -0
  197. package/dist/templates/welcome.js +322 -0
  198. package/dist/templates/welcome.js.map +1 -0
  199. package/dist/types/index.d.ts +46 -0
  200. package/dist/types/index.d.ts.map +1 -0
  201. package/dist/types/index.js +2 -0
  202. package/dist/types/index.js.map +1 -0
  203. package/dist/utils/batch-writer.d.ts +101 -0
  204. package/dist/utils/batch-writer.d.ts.map +1 -0
  205. package/dist/utils/batch-writer.js +232 -0
  206. package/dist/utils/batch-writer.js.map +1 -0
  207. package/dist/utils/cache.d.ts +60 -0
  208. package/dist/utils/cache.d.ts.map +1 -0
  209. package/dist/utils/cache.js +119 -0
  210. package/dist/utils/cache.js.map +1 -0
  211. package/dist/utils/fileTree.d.ts +3 -0
  212. package/dist/utils/fileTree.d.ts.map +1 -0
  213. package/dist/utils/fileTree.js +71 -0
  214. package/dist/utils/fileTree.js.map +1 -0
  215. package/dist/utils/fs.d.ts +22 -0
  216. package/dist/utils/fs.d.ts.map +1 -0
  217. package/dist/utils/fs.js +75 -0
  218. package/dist/utils/fs.js.map +1 -0
  219. package/dist/utils/helpers.d.ts +91 -0
  220. package/dist/utils/helpers.d.ts.map +1 -0
  221. package/dist/utils/helpers.js +192 -0
  222. package/dist/utils/helpers.js.map +1 -0
  223. package/dist/utils/index.d.ts +8 -0
  224. package/dist/utils/index.d.ts.map +1 -0
  225. package/dist/utils/index.js +8 -0
  226. package/dist/utils/index.js.map +1 -0
  227. package/dist/utils/progress.d.ts +85 -0
  228. package/dist/utils/progress.d.ts.map +1 -0
  229. package/dist/utils/progress.js +142 -0
  230. package/dist/utils/progress.js.map +1 -0
  231. package/dist/utils/spinner.d.ts +9 -0
  232. package/dist/utils/spinner.d.ts.map +1 -0
  233. package/dist/utils/spinner.js +56 -0
  234. package/dist/utils/spinner.js.map +1 -0
  235. package/dist/validation/index.d.ts +63 -0
  236. package/dist/validation/index.d.ts.map +1 -0
  237. package/dist/validation/index.js +262 -0
  238. package/dist/validation/index.js.map +1 -0
  239. package/package.json +71 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mohamed Shaban
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,185 @@
1
+ <div align="center">
2
+
3
+ # 🚀 NEXO CLI
4
+
5
+ **Next-generation scaffolding CLI for modern React projects**
6
+
7
+ [![npm version](https://img.shields.io/npm/v/nexo-cli.svg?style=flat-square)](https://www.npmjs.com/package/nexo-cli)
8
+ [![npm downloads](https://img.shields.io/npm/dm/nexo-cli.svg?style=flat-square)](https://www.npmjs.com/package/nexo-cli)
9
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](LICENSE)
10
+ [![Node.js](https://img.shields.io/badge/Node.js-24+-green.svg?style=flat-square)](https://nodejs.org/)
11
+ [![TypeScript](https://img.shields.io/badge/TypeScript-5.7+-blue.svg?style=flat-square)](https://www.typescriptlang.org/)
12
+
13
+ [Features](#-features) • [Quick Start](#-quick-start) • [Options](#-options) • [Documentation](#-documentation)
14
+
15
+ </div>
16
+
17
+ ---
18
+
19
+ ## ✨ Features
20
+
21
+ - 🎯 **Interactive CLI** — Guided project setup with smart defaults
22
+ - 📝 **TypeScript First** — Full type safety out of the box
23
+ - ⚡ **Vite Powered** — Lightning-fast development and builds
24
+ - 🔮 **Next.js Support** — Coming Soon!
25
+ - 🎨 **Modern Styling** — Tailwind CSS v4, CSS Modules, Sass
26
+ - 🧩 **UI Libraries** — shadcn/ui, Radix, Mantine, HeroUI
27
+ - 📋 **Forms** — React Hook Form + Zod/Yup, Formik
28
+ - 🗃️ **State Management** — Zustand, Redux Toolkit, Jotai
29
+ - 🛣️ **Routing** — React Router, TanStack Router
30
+ - 🔄 **Data Fetching** — TanStack Query, Axios
31
+ - 🌍 **i18n** — i18next, Lingui
32
+ - 🔐 **Auth Templates** — JWT, Auth.js patterns
33
+ - 🔧 **CI/CD** — GitHub Actions workflow included
34
+ - 📁 **Project Structures** — Feature-based, FSD, Atomic, Clean Architecture
35
+
36
+ ---
37
+
38
+ ## 📦 Quick Start
39
+
40
+ ```bash
41
+ # Recommended (no install needed)
42
+ npm create nexo
43
+
44
+ # Or with other package managers
45
+ pnpm create nexo
46
+ yarn create nexo
47
+
48
+ # Or install globally
49
+ npm install -g create-nexo
50
+ nexo create my-app
51
+ ```
52
+
53
+ ### Wizard Mode (for beginners)
54
+
55
+ ```bash
56
+ npm create nexo wizard
57
+ ```
58
+
59
+ ---
60
+
61
+ ## 🎯 Usage
62
+
63
+ ### Create a new project
64
+
65
+ ```bash
66
+ nexo create my-app
67
+ ```
68
+
69
+ ### With options
70
+
71
+ ```bash
72
+ # With CI/CD
73
+ nexo create my-app --cicd
74
+
75
+ # Faster with parallel execution
76
+ nexo create my-app --parallel
77
+
78
+ # Preview only (dry run)
79
+ nexo create my-app --dry-run
80
+
81
+ # Use a preset
82
+ nexo create my-app --preset=saas
83
+ ```
84
+
85
+ ### Generate components
86
+
87
+ ```bash
88
+ # Generate a component
89
+ nexo gc Button
90
+
91
+ # With tests and styles
92
+ nexo gc Button --with-tests --with-styles
93
+
94
+ # Generate a hook
95
+ nexo gh useAuth
96
+
97
+ # Generate a feature (FSD style)
98
+ nexo generate feature auth
99
+ ```
100
+
101
+ ---
102
+
103
+ ## 🎨 Options
104
+
105
+ ### Build Variants
106
+
107
+ | Option | Description |
108
+ |--------|-------------|
109
+ | TypeScript + React Compiler ⭐ | Auto-optimization with React 19 |
110
+ | TypeScript ⭐ | Standard TypeScript |
111
+ | TypeScript + SWC | 20x faster builds |
112
+ | JavaScript | No type system |
113
+
114
+ ### Styling
115
+
116
+ | Option | Description |
117
+ |--------|-------------|
118
+ | Tailwind CSS ⭐ | Utility-first CSS framework |
119
+ | CSS Modules | Scoped CSS by default |
120
+ | Sass/SCSS | CSS with superpowers |
121
+ | Plain CSS | Standard CSS files |
122
+
123
+ ### UI Libraries
124
+
125
+ | Option | Description |
126
+ |--------|-------------|
127
+ | shadcn/ui ⭐ | Beautiful copy-paste components |
128
+ | Radix UI | Unstyled, accessible primitives |
129
+ | Mantine | 100+ customizable components |
130
+ | HeroUI | Modern Tailwind-based UI |
131
+
132
+ ### State Management
133
+
134
+ | Option | Description |
135
+ |--------|-------------|
136
+ | Zustand ⭐ | Small, fast, scalable |
137
+ | Redux Toolkit | Industry standard |
138
+ | Jotai | Atomic state management |
139
+
140
+ ### Project Structures
141
+
142
+ | Option | Description |
143
+ |--------|-------------|
144
+ | Feature-based ⭐ | Organize by features/domain |
145
+ | FSD ⭐ | Feature-Sliced Design |
146
+ | Atomic Design | Atoms → Molecules → Organisms |
147
+ | Clean Architecture | Domain-driven layers |
148
+ | Simple | Minimal structure |
149
+
150
+ ⭐ = Recommended
151
+
152
+ ---
153
+
154
+ ## 📚 Documentation
155
+
156
+ - [API Reference](./docs/api.md)
157
+ - [CLI Commands](./docs/cli.md)
158
+
159
+ ---
160
+
161
+ ## 🔧 Development
162
+
163
+ ```bash
164
+ git clone https://github.com/YOUR_USERNAME/nexo-cli.git
165
+ cd nexo-cli
166
+ npm install
167
+ npm run build
168
+ node dist/bin/nexo.js
169
+ ```
170
+
171
+ ---
172
+
173
+ ## 📄 License
174
+
175
+ MIT © 2026
176
+
177
+ ---
178
+
179
+ <div align="center">
180
+
181
+ **Built with ❤️ for the modern web**
182
+
183
+ [Report Bug](https://github.com/Moshaban09/create-nexo/issues) • [Request Feature](https://github.com/Moshaban09/create-nexo/issues)
184
+
185
+ </div>
@@ -0,0 +1,196 @@
1
+ /**
2
+ * NEXO CLI - Programmatic API
3
+ *
4
+ * Allows programmatic usage of NEXO for tooling integration,
5
+ * scripts, and automated project creation.
6
+ *
7
+ * @example
8
+ * ```typescript
9
+ * import { nexo } from 'nexo-cli';
10
+ *
11
+ * const result = await nexo.create({
12
+ * projectName: 'my-app',
13
+ * targetDir: './projects',
14
+ * selections: {
15
+ * variant: 'ts',
16
+ * styling: 'tailwind',
17
+ * ui: 'shadcn'
18
+ * }
19
+ * });
20
+ * ```
21
+ */
22
+ import type { UserSelections } from '../types/index.js';
23
+ import { validateProjectName, type ValidationResult } from '../validation/index.js';
24
+ /**
25
+ * Options for creating a new project
26
+ */
27
+ export interface CreateOptions {
28
+ /** Name of the project (kebab-case recommended) */
29
+ projectName: string;
30
+ /** Directory to create the project in */
31
+ targetDir: string;
32
+ /** User selections for project configuration */
33
+ selections: Partial<UserSelections>;
34
+ /** If true, shows what would be created without creating files */
35
+ dryRun?: boolean;
36
+ /** If true, suppresses console output */
37
+ silent?: boolean;
38
+ /** If true, uses parallel execution for better performance */
39
+ parallel?: boolean;
40
+ /** If true, overwrites existing directory */
41
+ force?: boolean;
42
+ }
43
+ /**
44
+ * Result of a project creation
45
+ */
46
+ export interface CreateResult {
47
+ /** Whether the creation was successful */
48
+ success: boolean;
49
+ /** Full path to the created project */
50
+ projectPath: string;
51
+ /** Duration of the creation in milliseconds */
52
+ duration: number;
53
+ /** List of created files (if available) */
54
+ files: string[];
55
+ /** Error messages if creation failed */
56
+ errors: string[];
57
+ /** Warning messages */
58
+ warnings: string[];
59
+ /** Whether this was a dry run */
60
+ dryRun: boolean;
61
+ }
62
+ /**
63
+ * Options for previewing a project
64
+ */
65
+ export interface PreviewOptions {
66
+ /** User selections for project configuration */
67
+ selections: Partial<UserSelections>;
68
+ /** Project name (for file tree generation) */
69
+ projectName?: string;
70
+ }
71
+ /**
72
+ * Result of a project preview
73
+ */
74
+ export interface PreviewResult {
75
+ /** ASCII file tree representation */
76
+ fileTree: string;
77
+ /** List of dependencies that would be installed */
78
+ dependencies: DependencyInfo[];
79
+ /** Validation result */
80
+ validation: ValidationResult;
81
+ /** Estimated files count */
82
+ estimatedFileCount: number;
83
+ }
84
+ /**
85
+ * Dependency information
86
+ */
87
+ export interface DependencyInfo {
88
+ name: string;
89
+ version: string;
90
+ isDev: boolean;
91
+ reason: string;
92
+ }
93
+ /**
94
+ * Create a new NEXO project
95
+ *
96
+ * @param options - Configuration options for the project
97
+ * @returns Promise<CreateResult> - Result of the creation operation
98
+ *
99
+ * @example
100
+ * ```typescript
101
+ * const result = await create({
102
+ * projectName: 'my-app',
103
+ * targetDir: './projects',
104
+ * selections: {
105
+ * variant: 'ts',
106
+ * styling: 'tailwind',
107
+ * ui: 'shadcn'
108
+ * }
109
+ * });
110
+ *
111
+ * if (result.success) {
112
+ * console.log(`Created at: ${result.projectPath}`);
113
+ * }
114
+ * ```
115
+ */
116
+ export declare const create: (options: CreateOptions) => Promise<CreateResult>;
117
+ /**
118
+ * Validate project selections before creation
119
+ *
120
+ * @param selections - User selections to validate
121
+ * @returns ValidationResult - Validation result with errors and warnings
122
+ *
123
+ * @example
124
+ * ```typescript
125
+ * const result = validate({
126
+ * ui: 'shadcn',
127
+ * styling: 'plain-css' // Error: shadcn requires tailwind
128
+ * });
129
+ *
130
+ * if (!result.valid) {
131
+ * console.error(result.errors);
132
+ * }
133
+ * ```
134
+ */
135
+ export declare const validate: (selections: Partial<UserSelections>) => ValidationResult;
136
+ /**
137
+ * Preview what would be created without actually creating files
138
+ *
139
+ * @param options - Preview options
140
+ * @returns PreviewResult - Preview information including file tree and dependencies
141
+ *
142
+ * @example
143
+ * ```typescript
144
+ * const preview = await nexo.preview({
145
+ * selections: {
146
+ * variant: 'ts',
147
+ * styling: 'tailwind',
148
+ * ui: 'shadcn'
149
+ * }
150
+ * });
151
+ *
152
+ * console.log(preview.fileTree);
153
+ * console.log(`Dependencies: ${preview.dependencies.length}`);
154
+ * ```
155
+ */
156
+ export declare const preview: (options: PreviewOptions) => Promise<PreviewResult>;
157
+ /**
158
+ * Validate a project name
159
+ *
160
+ * @param name - Project name to validate
161
+ * @returns ValidationResult - Validation result
162
+ *
163
+ * @example
164
+ * ```typescript
165
+ * const result = nexo.validateProjectName('my-app');
166
+ * if (result.valid) {
167
+ * console.log('Valid project name!');
168
+ * }
169
+ * ```
170
+ */
171
+ export { validateProjectName };
172
+ /**
173
+ * NEXO CLI API namespace
174
+ *
175
+ * @example
176
+ * ```typescript
177
+ * import { nexo } from 'nexo-cli';
178
+ *
179
+ * // Create a project
180
+ * const result = await nexo.create({ ... });
181
+ *
182
+ * // Validate selections
183
+ * const validation = nexo.validate({ ... });
184
+ *
185
+ * // Preview what would be created
186
+ * const preview = await nexo.preview({ ... });
187
+ * ```
188
+ */
189
+ export declare const nexo: {
190
+ create: (options: CreateOptions) => Promise<CreateResult>;
191
+ validate: (selections: Partial<UserSelections>) => ValidationResult;
192
+ preview: (options: PreviewOptions) => Promise<PreviewResult>;
193
+ validateProjectName: (name: string) => ValidationResult;
194
+ };
195
+ export default nexo;
196
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAGxD,OAAO,EAEL,mBAAmB,EAEnB,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAMhC;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,mDAAmD;IACnD,WAAW,EAAE,MAAM,CAAC;IACpB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAC;IAClB,gDAAgD;IAChD,UAAU,EAAE,OAAO,CAAC,cAAc,CAAC,C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