@configjs/cli 1.1.0 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.fr.md ADDED
@@ -0,0 +1,454 @@
1
+ # ConfigJS
2
+
3
+ **Le CLI intelligent qui configure votre stack frontend complète en moins de 2 minutes**
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@configjs/cli?style=flat-square&color=blue)](https://www.npmjs.com/package/@configjs/cli)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@configjs/cli?style=flat-square&color=brightgreen)](https://www.npmjs.com/package/@configjs/cli)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
8
+ [![Node version](https://img.shields.io/node/v/@configjs/cli?style=flat-square)](https://nodejs.org)
9
+ [![Bundle size](https://img.shields.io/bundlephobia/min/@configjs/cli?style=flat-square)](https://bundlephobia.com/package/@configjs/cli)
10
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
11
+ [![Sponsor](https://img.shields.io/badge/Sponsor-❤-red?style=for-the-badge&logo=github)](https://github.com/sponsors/julien-lin)
12
+
13
+ **[Démarrage Rapide](#-démarrage-rapide) • [Fonctionnalités](#-fonctionnalités-clés) • [Documentation](#-documentation) • [Plugins](#-bibliothèques-supportées-40-plugins) • [Contribuer](#-contribuer)**
14
+
15
+ > **[🇬🇧 English version](./README.md)**
16
+
17
+ ---
18
+
19
+ ## 💡 Pourquoi ConfigJS ?
20
+
21
+ Configurer un projet React moderne prend généralement **2 à 4 heures** :
22
+ - Installer les bibliothèques une par une
23
+ - Lire la documentation de chaque outil
24
+ - Écrire la configuration boilerplate
25
+ - Résoudre les conflits de versions
26
+ - Créer la structure de code initiale
27
+
28
+ **ConfigJS réduit cela à moins de 2 minutes** sans effort.
29
+
30
+ ### Le Problème
31
+ ```bash
32
+ npm install react-router-dom axios zustand tailwindcss ...
33
+ # Puis passer des heures à configurer chaque bibliothèque manuellement
34
+ # Se battre avec les erreurs TypeScript
35
+ # Débugger les conflits de versions
36
+ # Écrire du boilerplate répétitif
37
+ ```
38
+
39
+ ### La Solution ConfigJS
40
+ ```bash
41
+ npx @configjs/cli react
42
+ # Assistant interactif vous guide
43
+ # Tout installé ET configuré
44
+ # Zéro conflit garanti
45
+ # Code prêt pour la production généré
46
+ ```
47
+
48
+ ## 🚀 Démarrage Rapide
49
+
50
+ **Aucune installation requise !** Utilisez directement avec `npx` :
51
+
52
+ ```bash
53
+ cd votre-projet-react
54
+ npx @configjs/cli react
55
+ ```
56
+
57
+ C'est tout ! ConfigJS va :
58
+ 1. 🔍 **Détecter** votre environnement (version React, TypeScript, bundler)
59
+ 2. 🎯 **Vous guider** dans la sélection des bibliothèques par catégorie
60
+ 3. 📦 **Installer** tous les packages séquentiellement (aucun conflit)
61
+ 4. ⚙️ **Configurer** tout avec du code fonctionnel
62
+ 5. ✅ **Valider** la compatibilité et les dépendances
63
+ 6. 🎉 **Terminé !** Votre projet est prêt pour la production
64
+
65
+ ### Exemple de Session
66
+
67
+ ```bash
68
+ $ npx @configjs/cli react
69
+
70
+ ✔ Choisissez votre langue › Français
71
+
72
+ 🔍 Détection du contexte...
73
+ ✓ Framework: React 19.2.0
74
+ ✓ TypeScript: Oui
75
+ ✓ Bundler: Vite 7.2.4
76
+ ✓ Gestionnaire de paquets: npm
77
+
78
+ ✔ CSS / Styling › TailwindCSS
79
+ ✔ Routing › React Router
80
+ ✔ Gestion d'état › Zustand
81
+ ✔ Client HTTP › Axios
82
+ ✔ Composants UI › Shadcn/ui
83
+ ✔ Formulaires › React Hook Form + Zod
84
+ ✔ Outillage › ESLint, Prettier, Husky
85
+
86
+ ✓ 7 bibliothèques sélectionnées
87
+
88
+ ✨ Installation terminée en 1.8s
89
+
90
+ 📦 Packages installés:
91
+ ✓ TailwindCSS (^4.1.18)
92
+ ✓ React Router (^7.11.0)
93
+ ✓ Zustand (^5.0.9)
94
+ ✓ Axios (^1.13.2)
95
+ ...
96
+
97
+ 📝 Fichiers créés:
98
+ • src/router.tsx
99
+ • src/store/index.ts
100
+ • src/lib/api.ts
101
+ • components.json
102
+ ...
103
+
104
+ 🚀 Prochaines étapes:
105
+ 1. npm run dev
106
+ 2. Visitez http://localhost:5173
107
+ ```
108
+
109
+ ---
110
+
111
+ ## ✨ Fonctionnalités Clés
112
+
113
+ ### 🎯 Détection Intelligente
114
+
115
+ ConfigJS détecte automatiquement la configuration de votre projet :
116
+ - ✅ **Framework & Version** (React 18/19)
117
+ - ✅ **Langage** (JavaScript/TypeScript)
118
+ - ✅ **Bundler** (Vite, Webpack, Create React App)
119
+ - ✅ **Gestionnaire de Paquets** (npm, yarn, pnpm, bun)
120
+ - ✅ **Bibliothèques Déjà Installées** (ignore les doublons)
121
+ - ✅ **Structure du Projet** (adapte la configuration)
122
+
123
+ ### ⚙️ Configuration Complète (Pas Seulement l'Installation !)
124
+
125
+ Contrairement aux simples installateurs, ConfigJS **configure réellement** vos bibliothèques avec du code fonctionnel :
126
+
127
+ **Exemple React Router :**
128
+ ```typescript
129
+ ✓ Installation de react-router-dom
130
+ ✓ Création de src/router.tsx avec les routes
131
+ ✓ Création de src/routes/Home.tsx
132
+ ✓ Création de src/routes/About.tsx
133
+ ✓ Intégration de RouterProvider dans App.tsx
134
+ ✓ Types TypeScript configurés
135
+ → Prêt à utiliser immédiatement !
136
+ ```
137
+
138
+ **Exemple TailwindCSS :**
139
+ ```typescript
140
+ ✓ Installation de tailwindcss + @tailwindcss/vite
141
+ ✓ Mise à jour de vite.config.ts avec le plugin
142
+ ✓ Injection des directives dans src/index.css
143
+ ✓ Mode JIT activé
144
+ → Commencez à utiliser les classes Tailwind maintenant !
145
+ ```
146
+
147
+ **Exemple Redux Toolkit :**
148
+ ```typescript
149
+ ✓ Installation de @reduxjs/toolkit + react-redux
150
+ ✓ Création de src/store/index.ts avec configureStore
151
+ ✓ Création de src/store/slices/counterSlice.ts
152
+ ✓ Création de src/store/hooks.ts (hooks typés)
153
+ ✓ Enveloppe App dans <Provider>
154
+ → Configuration Redux complète en quelques secondes !
155
+ ```
156
+
157
+ ### 🛡️ Validation Intelligente de Compatibilité
158
+
159
+ ConfigJS prévient les conflits avant qu'ils ne se produisent :
160
+
161
+ - ❌ **Conflits Exclusifs** : Impossible d'installer Redux + Zustand (un seul gestionnaire d'état)
162
+ - ❌ **Routing Exclusif** : React Router OU TanStack Router (pas les deux)
163
+ - ⚠️ **Avertissements** : TailwindCSS + Bootstrap (philosophies différentes)
164
+ - ✅ **Dépendances Automatiques** : TailwindCSS nécessite PostCSS → installé automatiquement
165
+ - ✅ **Suivi des Plugins** : Mémorise les plugins installés (`.configjsrc`)
166
+
167
+ ### 📦 Bibliothèques Supportées (40+ Plugins)
168
+
169
+ #### 🎨 CSS / Styling
170
+ - TailwindCSS v4 (avec @tailwindcss/vite)
171
+ - Styled Components
172
+ - React Bootstrap
173
+ - Emotion
174
+ - CSS Modules
175
+
176
+ #### 🧭 Routing
177
+ - React Router v7
178
+ - TanStack Router
179
+
180
+ #### 🗂️ Gestion d'État
181
+ - Redux Toolkit
182
+ - Zustand
183
+ - Jotai
184
+ - MobX
185
+
186
+ #### 🌐 Client HTTP
187
+ - Axios
188
+ - TanStack Query (React Query)
189
+ - Fetch Wrapper
190
+
191
+ #### 📝 Formulaires
192
+ - React Hook Form
193
+ - Formik
194
+ - Zod (validation)
195
+ - Yup (validation)
196
+
197
+ #### 🎨 Composants UI
198
+ - Shadcn/ui
199
+ - Radix UI
200
+ - React Icons
201
+ - Lucide Icons
202
+ - React Hot Toast
203
+
204
+ #### 🧪 Tests
205
+ - React Testing Library
206
+ - Vitest
207
+ - Jest
208
+
209
+ #### 🛠️ Outillage
210
+ - ESLint
211
+ - Prettier
212
+ - Husky (Git hooks)
213
+ - lint-staged
214
+ - date-fns
215
+
216
+ #### ✨ Animation
217
+ - Framer Motion
218
+ - React Spring
219
+
220
+ #### 🔧 Utilitaires
221
+ - Lodash
222
+ - clsx / classnames
223
+
224
+ ### 🔄 Rollback Automatique
225
+
226
+ Si quelque chose se passe mal, ConfigJS restaure automatiquement tout :
227
+
228
+ ```bash
229
+ ❌ Erreur détectée durant la configuration
230
+ ↺ Rollback en cours...
231
+ ✓ package.json restauré
232
+ ✓ Tous les fichiers modifiés restaurés
233
+ ✓ Fichiers créés supprimés
234
+ ✅ Projet restauré à l'état précédent
235
+ ```
236
+
237
+ ### 🎯 Système de Suivi des Plugins
238
+
239
+ Ne réinstallez jamais la même bibliothèque deux fois :
240
+
241
+ ```bash
242
+ # Première exécution
243
+ $ npx @configjs/cli react
244
+ ✔ TailwindCSS › Sélectionné
245
+
246
+ # Deuxième exécution (même projet)
247
+ $ npx @configjs/cli react
248
+ ℹ TailwindCSS est déjà installé, ignoré...
249
+
250
+ # Vérifier les plugins installés
251
+ $ npx @configjs/cli installed
252
+ 📦 Plugins installés:
253
+ ✓ TailwindCSS (^4.1.18) - installé il y a 2 heures
254
+ ✓ React Router (^7.11.0) - installé il y a 2 heures
255
+ ```
256
+
257
+ ConfigJS crée un fichier `.configjsrc` pour suivre les installations et prévenir les conflits.
258
+
259
+ ---
260
+
261
+ ## 📖 Documentation
262
+
263
+ ### Commandes
264
+
265
+ ```bash
266
+ # Installation interactive
267
+ npx @configjs/cli react
268
+
269
+ # Lister les plugins disponibles
270
+ npx @configjs/cli list
271
+ npx @configjs/cli list --category routing
272
+
273
+ # Vérifier les plugins installés
274
+ npx @configjs/cli installed
275
+
276
+ # Retirer un plugin du suivi
277
+ npx @configjs/cli remove <nom-du-plugin>
278
+
279
+ # Valider la compatibilité du projet
280
+ npx @configjs/cli check
281
+ ```
282
+
283
+ ### Options CLI
284
+
285
+ ```bash
286
+ npx @configjs/cli react [options]
287
+ ```
288
+
289
+ | Option | Description |
290
+ |--------|-------------|
291
+ | `--yes`, `-y` | Ignorer les prompts, utiliser les valeurs par défaut |
292
+ | `--dry-run`, `-d` | Simuler sans écrire de fichiers |
293
+ | `--silent`, `-s` | Aucune sortie (mode CI/CD) |
294
+ | `--no-install` | Générer seulement les configs, ignorer npm install |
295
+ | `--debug` | Logs verbeux |
296
+
297
+ ### Exemples d'Utilisation
298
+
299
+ **Configuration rapide avec les valeurs par défaut :**
300
+ ```bash
301
+ npx @configjs/cli react --yes
302
+ ```
303
+
304
+ **Mode CI/CD :**
305
+ ```bash
306
+ npx @configjs/cli react --silent --yes
307
+ ```
308
+
309
+ **Prévisualiser les changements uniquement :**
310
+ ```bash
311
+ npx @configjs/cli react --dry-run
312
+ ```
313
+
314
+ **Générer les configs sans installer les packages :**
315
+ ```bash
316
+ npx @configjs/cli react --no-install
317
+ ```
318
+
319
+ ---
320
+
321
+ ## 🏗️ Architecture
322
+
323
+ ConfigJS utilise une architecture modulaire de plugins où chaque bibliothèque est un plugin autonome :
324
+
325
+ ```typescript
326
+ interface Plugin {
327
+ name: string
328
+ category: Category
329
+ frameworks: Framework[]
330
+
331
+ // Compatibilité
332
+ compatibleWith?: string[]
333
+ incompatibleWith?: string[]
334
+ requires?: string[]
335
+
336
+ // Cycle de vie
337
+ detect?: (ctx: ProjectContext) => boolean | Promise<boolean>
338
+ install: (ctx: ProjectContext) => Promise<void>
339
+ configure: (ctx: ProjectContext) => Promise<void>
340
+ rollback?: (ctx: ProjectContext) => Promise<void>
341
+ }
342
+ ```
343
+
344
+ ### Extensibilité
345
+
346
+ Créez vos propres plugins :
347
+
348
+ ```bash
349
+ npm install @configjs/plugin-react-query
350
+ ```
351
+
352
+ ConfigJS détectera et chargera automatiquement les plugins préfixés par `@configjs/plugin-*`.
353
+
354
+ ---
355
+
356
+ ## 🤝 Contribuer
357
+
358
+ Les contributions sont les bienvenues ! Consultez [CONTRIBUTING.md](./docs/CONTRIBUTING.md) pour les directives.
359
+
360
+ ### Développer un Plugin
361
+
362
+ Voir [PLUGIN_DEVELOPMENT.md](./docs/PLUGIN_DEVELOPMENT.md) pour créer vos propres plugins.
363
+
364
+ ### Configuration de Développement
365
+
366
+ ```bash
367
+ # Cloner
368
+ git clone https://github.com/julien-lin/orchestrateur-framework.git
369
+ cd orchestrateur-framework
370
+
371
+ # Installer les dépendances
372
+ npm install
373
+
374
+ # Lancer les tests
375
+ npm run test
376
+ npm run test:watch
377
+
378
+ # Vérification des types
379
+ npm run typecheck
380
+
381
+ # Lint
382
+ npm run lint
383
+
384
+ # Build
385
+ npm run build
386
+ ```
387
+
388
+ ---
389
+
390
+ ## 📋 Prérequis
391
+
392
+ - **Node.js** ≥ 18.0.0
393
+ - **npm** / **yarn** / **pnpm** / **bun**
394
+ - Un projet React existant (Vite, CRA, ou configuration personnalisée)
395
+
396
+ ---
397
+
398
+ ## 🗺️ Roadmap
399
+
400
+ ### v1.1 ✅ (Actuelle)
401
+ - [x] Système de suivi des plugins (.configjsrc)
402
+ - [x] Détection des plugins (package.json + tracker)
403
+ - [x] UX console améliorée avec couleurs
404
+ - [x] Installation séquentielle (prévient la corruption)
405
+ - [x] 40+ plugins à travers 10 catégories
406
+
407
+ ### v1.2 (T2 2025)
408
+ - [ ] Presets de configuration (templates de démarrage)
409
+ - [ ] Marketplace de plugins
410
+ - [ ] Commande de mise à jour interactive
411
+ - [ ] Assistant de résolution de conflits
412
+
413
+ ### v2.0 (T3 2025)
414
+ - [ ] Support Next.js
415
+ - [ ] Support Remix
416
+ - [ ] Support Astro
417
+ - [ ] Interface web pour la configuration
418
+
419
+ ### v2.x (Futur)
420
+ - [ ] Support Vue 3
421
+ - [ ] Support Svelte
422
+ - [ ] Support React Native
423
+ - [ ] Templates de plugins personnalisés
424
+
425
+ ---
426
+
427
+ ## 💖 Soutenir ce Projet
428
+
429
+ Si ConfigJS vous fait gagner du temps et vous facilite la vie, envisagez de sponsoriser le projet :
430
+
431
+ **[❤️ Sponsoriser sur GitHub](https://github.com/sponsors/julien-lin)**
432
+
433
+ Votre soutien aide à maintenir et améliorer ConfigJS pour toute la communauté !
434
+
435
+ ---
436
+
437
+ ## 📄 Licence
438
+
439
+ [MIT](./LICENSE) © [Julien Lin](https://github.com/julien-lin)
440
+
441
+ ---
442
+
443
+ ## 🙏 Remerciements
444
+
445
+ Inspiré par les meilleures pratiques de :
446
+ - [Vite](https://vitejs.dev) - Outil de build ultra-rapide
447
+ - [Create T3 App](https://create.t3.gg) - Toolkit full-stack type-safe
448
+ - [Projen](https://projen.io) - Configuration de projet en tant que code
449
+
450
+ ---
451
+
452
+ **Fait avec ❤️ pour la communauté frontend**
453
+
454
+ [Changelog](./CHANGELOG.md) • [Issues](https://github.com/julien-lin/orchestrateur-framework/issues) • [Contributing](./docs/CONTRIBUTING.md)
package/README.md CHANGED
@@ -1,286 +1,326 @@
1
- # confjs
1
+ # ConfigJS
2
2
 
3
- <div align="center">
3
+ **The intelligent CLI that configures your entire frontend stack in under 2 minutes**
4
4
 
5
- **Configure your frontend stack, instantly**
5
+ [![npm version](https://img.shields.io/npm/v/@configjs/cli?style=flat-square&color=blue)](https://www.npmjs.com/package/@configjs/cli)
6
+ [![npm downloads](https://img.shields.io/npm/dm/@configjs/cli?style=flat-square&color=brightgreen)](https://www.npmjs.com/package/@configjs/cli)
7
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg?style=flat-square)](https://opensource.org/licenses/MIT)
8
+ [![Node version](https://img.shields.io/node/v/@configjs/cli?style=flat-square)](https://nodejs.org)
9
+ [![Bundle size](https://img.shields.io/bundlephobia/min/@configjs/cli?style=flat-square)](https://bundlephobia.com/package/@configjs/cli)
10
+ [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://makeapullrequest.com)
11
+ [![Sponsor](https://img.shields.io/badge/Sponsor-❤-red?style=for-the-badge&logo=github)](https://github.com/sponsors/julien-lin)
6
12
 
7
- [![npm version](https://img.shields.io/npm/v/@configjs/cli.svg)](https://www.npmjs.com/package/@configjs/cli)
8
- [![CI Tests](https://github.com/julien-lin/configjs/actions/workflows/test.yml/badge.svg)](https://github.com/julien-lin/configjs/actions/workflows/test.yml)
9
- [![Publish](https://github.com/julien-lin/configjs/actions/workflows/publish.yml/badge.svg)](https://github.com/julien-lin/configjs/actions/workflows/publish.yml)
10
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
11
- [![Node version](https://img.shields.io/node/v/@configjs/cli.svg)](https://nodejs.org)
13
+ **[Quick Start](#-quick-start) • [Features](#-key-features) • [Documentation](#-documentation) • [Plugins](#-supported-libraries) • [Contribute](#-contributing)**
12
14
 
13
- Un utilitaire CLI intelligent pour installer et configurer automatiquement vos bibliothèques frontend par catégories fonctionnelles.
14
-
15
- [Installation](#-installation) • [Usage](#-usage) • [Fonctionnalités](#-fonctionnalités) • [Documentation](#-documentation)
16
-
17
- </div>
15
+ > **[🇫🇷 Version française](./README.fr.md)**
18
16
 
19
17
  ---
20
18
 
21
- ## 🎯 Pourquoi confjs ?
22
-
23
- Le bootstrap d'un projet frontend moderne prend **2-4 heures** entre l'installation des bibliothèques, leur configuration, et la résolution des conflits potentiels.
19
+ ## 💡 Why ConfigJS?
24
20
 
25
- **confjs** réduit ce temps à **moins de 2 minutes** en :
21
+ Setting up a modern React project typically takes **2-4 hours**:
22
+ - Installing libraries one by one
23
+ - Reading documentation for each tool
24
+ - Writing boilerplate configuration
25
+ - Resolving version conflicts
26
+ - Creating initial code structure
26
27
 
27
- - **Détectant automatiquement** votre environnement (React, TypeScript, Vite, etc.)
28
- - ✅ **Installant ET configurant** les bibliothèques de votre choix
29
- - ✅ **Validant les compatibilités** pour éviter les conflits
30
- - ✅ **Générant le code initial** nécessaire (routes, stores, configs)
31
- - ✅ Garantissant un **projet immédiatement utilisable**
28
+ **ConfigJS reduces this to less than 2 minutes** with zero effort.
32
29
 
33
- ## 🚀 Installation
34
-
35
- Aucune installation nécessaire ! Utilisez directement via `npx` :
30
+ ### The Problem
31
+ ```bash
32
+ npm install react-router-dom axios zustand tailwindcss ...
33
+ # Then spend hours configuring each library manually
34
+ # Fight with TypeScript errors
35
+ # Debug version conflicts
36
+ # Write repetitive boilerplate
37
+ ```
36
38
 
39
+ ### The ConfigJS Solution
37
40
  ```bash
38
41
  npx @configjs/cli react
42
+ # Interactive wizard guides you
43
+ # Everything installed AND configured
44
+ # Zero conflicts guaranteed
45
+ # Production-ready code generated
39
46
  ```
40
47
 
41
- Ou installez globalement :
48
+ ## 🚀 Quick Start
49
+
50
+ **No installation required!** Use directly with `npx`:
42
51
 
43
52
  ```bash
44
- npm install -g @configjs/cli
45
- confjs react
53
+ cd your-react-project
54
+ npx @configjs/cli react
46
55
  ```
47
56
 
48
- ## 📦 Usage
57
+ That's it! ConfigJS will:
58
+ 1. 🔍 **Detect** your environment (React version, TypeScript, bundler)
59
+ 2. 🎯 **Guide** you through library selection by category
60
+ 3. 📦 **Install** all packages sequentially (no conflicts)
61
+ 4. ⚙️ **Configure** everything with working code
62
+ 5. ✅ **Validate** compatibility and dependencies
63
+ 6. 🎉 **Done!** Your project is production-ready
49
64
 
50
- ### Mode interactif (recommandé)
65
+ ### Example Session
51
66
 
52
67
  ```bash
53
- cd mon-projet-react
54
- npx confjs react
68
+ $ npx @configjs/cli react
69
+
70
+ ✔ Choose your language › English
71
+
72
+ 🔍 Detecting context...
73
+ ✓ Framework: React 19.2.0
74
+ ✓ TypeScript: Yes
75
+ ✓ Bundler: Vite 7.2.4
76
+ ✓ Package manager: npm
77
+
78
+ ✔ CSS / Styling › TailwindCSS
79
+ ✔ Routing › React Router
80
+ ✔ State Management › Zustand
81
+ ✔ HTTP Client › Axios
82
+ ✔ UI Components › Shadcn/ui
83
+ ✔ Forms › React Hook Form + Zod
84
+ ✔ Tooling › ESLint, Prettier, Husky
85
+
86
+ ✓ 7 libraries selected
87
+
88
+ ✨ Installation completed in 1.8s
89
+
90
+ 📦 Installed packages:
91
+ ✓ TailwindCSS (^4.1.18)
92
+ ✓ React Router (^7.11.0)
93
+ ✓ Zustand (^5.0.9)
94
+ ✓ Axios (^1.13.2)
95
+ ...
96
+
97
+ 📝 Created files:
98
+ • src/router.tsx
99
+ • src/store/index.ts
100
+ • src/lib/api.ts
101
+ • components.json
102
+ ...
103
+
104
+ 🚀 Next steps:
105
+ 1. npm run dev
106
+ 2. Visit http://localhost:5173
55
107
  ```
56
108
 
57
- L'assistant vous guidera à travers les différentes catégories :
109
+ ---
58
110
 
59
- ```
60
- 🔍 Détection du contexte...
61
- ✓ Framework: React 18.2.0
62
- ✓ TypeScript: Oui
63
- ✓ Bundler: Vite 5.0.0
111
+ ## ✨ Key Features
64
112
 
65
- 📦 Sélectionnez vos bibliothèques :
113
+ ### 🎯 Smart Detection
66
114
 
67
- ? Routing (recommandé)
68
- react-router-dom
69
- @tanstack/router
70
- Aucun
115
+ ConfigJS automatically detects your project setup:
116
+ - ✅ **Framework & Version** (React 18/19)
117
+ - ✅ **Language** (JavaScript/TypeScript)
118
+ - ✅ **Bundler** (Vite, Webpack, Create React App)
119
+ - ✅ **Package Manager** (npm, yarn, pnpm, bun)
120
+ - ✅ **Already Installed Libraries** (skips duplicates)
121
+ - ✅ **Project Structure** (adapts configuration)
71
122
 
72
- ? State Management
73
- ○ Redux Toolkit
74
- ● zustand
75
- ○ jotai
76
- ○ Aucun
123
+ ### ⚙️ Complete Configuration (Not Just Installation!)
77
124
 
78
- ...
79
- ```
125
+ Unlike simple installers, ConfigJS **actually configures** your libraries with working code:
80
126
 
81
- ### Mode configuration (CI/CD)
127
+ **React Router Example:**
128
+ ```typescript
129
+ ✓ Installed react-router-dom
130
+ ✓ Created src/router.tsx with routes
131
+ ✓ Created src/routes/Home.tsx
132
+ ✓ Created src/routes/About.tsx
133
+ ✓ Integrated RouterProvider in App.tsx
134
+ ✓ TypeScript types configured
135
+ → Ready to use immediately!
136
+ ```
82
137
 
83
- Créez un fichier `.confjs.json` :
138
+ **TailwindCSS Example:**
139
+ ```typescript
140
+ ✓ Installed tailwindcss + @tailwindcss/vite
141
+ ✓ Updated vite.config.ts with plugin
142
+ ✓ Injected directives in src/index.css
143
+ ✓ JIT mode enabled
144
+ → Start using Tailwind classes now!
145
+ ```
84
146
 
85
- ```json
86
- {
87
- "routing": "react-router-dom",
88
- "state": "zustand",
89
- "css": "tailwindcss",
90
- "http": "axios",
91
- "tooling": ["eslint", "prettier"]
92
- }
147
+ **Redux Toolkit Example:**
148
+ ```typescript
149
+ Installed @reduxjs/toolkit + react-redux
150
+ Created src/store/index.ts with configureStore
151
+ Created src/store/slices/counterSlice.ts
152
+ Created src/store/hooks.ts (typed hooks)
153
+ Wrapped App in <Provider>
154
+ → Full Redux setup in seconds!
93
155
  ```
94
156
 
95
- Puis exécutez :
157
+ ### 🛡️ Smart Compatibility Validation
158
+
159
+ ConfigJS prevents conflicts before they happen:
160
+
161
+ - ❌ **Exclusive Conflicts**: Can't install Redux + Zustand (only one state manager)
162
+ - ❌ **Exclusive Routing**: React Router OR TanStack Router (not both)
163
+ - ⚠️ **Warnings**: TailwindCSS + Bootstrap (different philosophies)
164
+ - ✅ **Auto-Dependencies**: TailwindCSS requires PostCSS → installed automatically
165
+ - ✅ **Plugin Tracking**: Remembers installed plugins (`.configjsrc`)
166
+
167
+ ### 📦 Supported Libraries (40+ Plugins)
168
+
169
+ #### 🎨 CSS / Styling
170
+ - TailwindCSS v4 (with @tailwindcss/vite)
171
+ - Styled Components
172
+ - React Bootstrap
173
+ - Emotion
174
+ - CSS Modules
175
+
176
+ #### 🧭 Routing
177
+ - React Router v7
178
+ - TanStack Router
179
+
180
+ #### 🗂️ State Management
181
+ - Redux Toolkit
182
+ - Zustand
183
+ - Jotai
184
+ - MobX
185
+
186
+ #### 🌐 HTTP Client
187
+ - Axios
188
+ - TanStack Query (React Query)
189
+ - Fetch Wrapper
190
+
191
+ #### 📝 Forms
192
+ - React Hook Form
193
+ - Formik
194
+ - Zod (validation)
195
+ - Yup (validation)
196
+
197
+ #### 🎨 UI Components
198
+ - Shadcn/ui
199
+ - Radix UI
200
+ - React Icons
201
+ - Lucide Icons
202
+ - React Hot Toast
203
+
204
+ #### 🧪 Testing
205
+ - React Testing Library
206
+ - Vitest
207
+ - Jest
208
+
209
+ #### 🛠️ Tooling
210
+ - ESLint
211
+ - Prettier
212
+ - Husky (Git hooks)
213
+ - lint-staged
214
+ - date-fns
215
+
216
+ #### ✨ Animation
217
+ - Framer Motion
218
+ - React Spring
219
+
220
+ #### 🔧 Utils
221
+ - Lodash
222
+ - clsx / classnames
223
+
224
+ ### 🔄 Automatic Rollback
225
+
226
+ If something goes wrong, ConfigJS automatically restores everything:
96
227
 
97
228
  ```bash
98
- npx confjs react --config .confjs.json
229
+ Error detected during configuration
230
+ ↺ Rolling back...
231
+ ✓ Restored package.json
232
+ ✓ Restored all modified files
233
+ ✓ Removed created files
234
+ ✅ Project restored to previous state
99
235
  ```
100
236
 
101
- ### Mode dry-run (simulation)
237
+ ### 🎯 Plugin Tracking System
102
238
 
103
- Visualisez ce qui sera installé sans rien modifier :
239
+ Never reinstall the same library twice:
104
240
 
105
241
  ```bash
106
- npx confjs react --dry-run
242
+ # First run
243
+ $ npx @configjs/cli react
244
+ ✔ TailwindCSS › Selected
245
+
246
+ # Second run (same project)
247
+ $ npx @configjs/cli react
248
+ ℹ TailwindCSS is already installed, skipping...
249
+
250
+ # Check installed plugins
251
+ $ npx @configjs/cli installed
252
+ 📦 Installed plugins:
253
+ ✓ TailwindCSS (^4.1.18) - installed 2 hours ago
254
+ ✓ React Router (^7.11.0) - installed 2 hours ago
107
255
  ```
108
256
 
109
- ## Fonctionnalités
110
-
111
- ### 🎯 Catégories supportées
112
-
113
- | Catégorie | Bibliothèques disponibles |
114
- |-----------|---------------------------|
115
- | **Routing** | react-router-dom, @tanstack/router |
116
- | **State Management** | Redux Toolkit, Zustand, Jotai |
117
- | **HTTP Client** | Axios, Fetch wrapper |
118
- | **CSS/UI** | TailwindCSS, Bootstrap |
119
- | **Tooling** | ESLint, Prettier, Husky, lint-staged, commitlint |
120
-
121
- ### 🧠 Détection intelligente
122
-
123
- confjs détecte automatiquement :
124
-
125
- - ✅ Framework et version (React)
126
- - ✅ TypeScript
127
- - ✅ Bundler (Vite, Create React App, Webpack)
128
- - ✅ Package manager (npm, yarn, pnpm, bun)
129
- - ✅ Structure du projet
130
- - ✅ Bibliothèques déjà installées
131
-
132
- ### ⚙️ Configuration automatique
257
+ ConfigJS creates a `.configjsrc` file to track installations and prevent conflicts.
133
258
 
134
- Contrairement aux simples installers, **confjs configure réellement** vos bibliothèques :
135
-
136
- **Exemple avec React Router :**
137
- ```
138
- ✓ Installation de react-router-dom
139
- ✓ Création de src/router.tsx
140
- ✓ Création de src/routes/Home.tsx
141
- ✓ Intégration dans src/App.tsx
142
- ✓ Configuration complète et fonctionnelle
143
- ```
259
+ ---
144
260
 
145
- **Exemple avec TailwindCSS :**
146
- ```
147
- ✓ Installation de tailwindcss, postcss, autoprefixer
148
- ✓ Création de tailwind.config.js
149
- ✓ Création de postcss.config.js
150
- ✓ Injection dans src/index.css
151
- ✓ Configuration JIT activée
152
- ```
261
+ ## 📖 Documentation
153
262
 
154
- ### 🛡️ Validation des compatibilités
263
+ ### Commands
155
264
 
156
- confjs vérifie automatiquement :
265
+ ```bash
266
+ # Interactive installation
267
+ npx @configjs/cli react
157
268
 
158
- - **Conflits exclusifs** : Redux + Zustand (un seul state manager)
159
- - ⚠️ **Avertissements** : TailwindCSS + Bootstrap (approches différentes)
160
- - **Dépendances croisées** : TailwindCSS → PostCSS (installé automatiquement)
269
+ # List available plugins
270
+ npx @configjs/cli list
271
+ npx @configjs/cli list --category routing
161
272
 
162
- ### 🔄 Rollback automatique
273
+ # Check installed plugins
274
+ npx @configjs/cli installed
163
275
 
164
- En cas d'erreur durant l'installation :
276
+ # Remove plugin from tracking
277
+ npx @configjs/cli remove <plugin-name>
165
278
 
166
- ```
167
- Erreur détectée
168
- ↺ Rollback en cours...
169
- ✓ Fichiers restaurés
170
- ✓ package.json restauré
279
+ # Validate project compatibility
280
+ npx @configjs/cli check
171
281
  ```
172
282
 
173
- ## 🎨 Options CLI
283
+ ### CLI Options
174
284
 
175
285
  ```bash
176
- npx confjs react [options]
286
+ npx @configjs/cli react [options]
177
287
  ```
178
288
 
179
289
  | Option | Description |
180
290
  |--------|-------------|
181
- | `--yes`, `-y` | Accepte tous les choix par défaut |
182
- | `--dry-run`, `-d` | Simule sans écrire sur le disque |
183
- | `--silent`, `-s` | Mode non-interactif (CI/CD) |
184
- | `--debug` | Active les logs détaillés |
185
- | `--config <file>`, `-c` | Utilise un fichier de configuration |
186
- | `--force`, `-f` | Force l'installation (écrase les configs) |
187
-
188
- ### Exemples
189
-
190
- ```bash
191
- # Mode rapide avec valeurs par défaut
192
- npx confjs react --yes
193
-
194
- # Simulation uniquement
195
- npx confjs react --dry-run
196
-
197
- # Pour CI/CD
198
- npx confjs react --silent --config .confjs.json
199
-
200
- # Avec logs détaillés
201
- npx confjs react --debug
202
- ```
203
-
204
- ## 📚 Commandes additionnelles
205
-
206
- ### Liste des bibliothèques disponibles
207
-
208
- ```bash
209
- npx confjs list
210
- ```
211
-
212
- Filtrer par catégorie :
291
+ | `--yes`, `-y` | Skip prompts, use defaults |
292
+ | `--dry-run`, `-d` | Simulate without writing files |
293
+ | `--silent`, `-s` | No output (CI/CD mode) |
294
+ | `--no-install` | Generate configs only, skip npm install |
295
+ | `--debug` | Verbose logging |
213
296
 
214
- ```bash
215
- npx confjs list --category routing
216
- npx confjs list --category state
217
- ```
218
-
219
- ### Vérifier la compatibilité
297
+ ### Usage Examples
220
298
 
299
+ **Quick setup with defaults:**
221
300
  ```bash
222
- npx confjs check --config .confjs.json
301
+ npx @configjs/cli react --yes
223
302
  ```
224
303
 
225
- ### Aide
226
-
304
+ **CI/CD mode:**
227
305
  ```bash
228
- npx confjs --help
229
- npx confjs react --help
306
+ npx @configjs/cli react --silent --yes
230
307
  ```
231
308
 
232
- ## 🎯 Exemples d'utilisation
233
-
234
- ### Setup complet d'un projet React
235
-
309
+ **Preview changes only:**
236
310
  ```bash
237
- # Créer un nouveau projet
238
- npm create vite@latest mon-app -- --template react-ts
239
- cd mon-app
240
-
241
- # Installer et configurer la stack
242
- npx confjs react
243
-
244
- # Sélectionner :
245
- # - Routing: react-router-dom
246
- # - State: zustand
247
- # - CSS: tailwindcss
248
- # - HTTP: axios
249
- # - Tooling: eslint, prettier
250
-
251
- # Démarrer
252
- npm run dev
311
+ npx @configjs/cli react --dry-run
253
312
  ```
254
313
 
255
- ### Configuration pré-définie pour l'équipe
256
-
314
+ **Generate configs without installing packages:**
257
315
  ```bash
258
- # .confjs.json versionner dans Git)
259
- {
260
- "routing": "react-router-dom",
261
- "state": "zustand",
262
- "css": "tailwindcss",
263
- "http": "axios",
264
- "tooling": ["eslint", "prettier", "husky"]
265
- }
266
-
267
- # Chaque membre de l'équipe exécute :
268
- npx confjs react --config .confjs.json
316
+ npx @configjs/cli react --no-install
269
317
  ```
270
318
 
271
- ### Pipeline CI/CD
272
-
273
- ```yaml
274
- # .github/workflows/setup.yml
275
- - name: Setup project
276
- run: npx confjs react --silent --config .confjs.json
277
- ```
319
+ ---
278
320
 
279
321
  ## 🏗️ Architecture
280
322
 
281
- ### Système de plugins
282
-
283
- confjs utilise une architecture modulaire où chaque bibliothèque est un plugin autonome :
323
+ ConfigJS uses a modular plugin architecture where each library is an autonomous plugin:
284
324
 
285
325
  ```typescript
286
326
  interface Plugin {
@@ -288,144 +328,128 @@ interface Plugin {
288
328
  category: Category
289
329
  frameworks: Framework[]
290
330
 
291
- // Compatibilité
331
+ // Compatibility
292
332
  compatibleWith?: string[]
293
333
  incompatibleWith?: string[]
334
+ requires?: string[]
294
335
 
295
336
  // Lifecycle
337
+ detect?: (ctx: ProjectContext) => boolean | Promise<boolean>
296
338
  install: (ctx: ProjectContext) => Promise<void>
297
339
  configure: (ctx: ProjectContext) => Promise<void>
298
340
  rollback?: (ctx: ProjectContext) => Promise<void>
299
341
  }
300
342
  ```
301
343
 
302
- ### Extensibilité
344
+ ### Extensibility
303
345
 
304
- Créez vos propres plugins :
346
+ Create your own plugins:
305
347
 
306
348
  ```bash
307
- npm install confjs-plugin-react-query
349
+ npm install @configjs/plugin-react-query
308
350
  ```
309
351
 
310
- confjs détectera et chargera automatiquement les plugins préfixés par `confjs-plugin-*`.
311
-
312
- ## 🔧 Configuration
313
-
314
- ### Fichier .confjs.json
352
+ ConfigJS will automatically detect and load plugins prefixed with `@configjs/plugin-*`.
315
353
 
316
- ```json
317
- {
318
- "routing": "react-router-dom",
319
- "state": "zustand",
320
- "css": "tailwindcss",
321
- "http": "axios",
322
- "forms": "react-hook-form",
323
- "tooling": ["eslint", "prettier", "husky"],
324
-
325
- "options": {
326
- "typescript": true,
327
- "strict": true,
328
- "examples": true
329
- }
330
- }
331
- ```
332
-
333
- ### Fichier .confjs.yaml (alternatif)
334
-
335
- ```yaml
336
- routing: react-router-dom
337
- state: zustand
338
- css: tailwindcss
339
- http: axios
340
-
341
- tooling:
342
- - eslint
343
- - prettier
344
- - husky
345
-
346
- options:
347
- typescript: true
348
- strict: true
349
- examples: true
350
- ```
354
+ ---
351
355
 
352
- ## 🤝 Contribuer
356
+ ## 🤝 Contributing
353
357
 
354
- Les contributions sont les bienvenues ! Consultez [CONTRIBUTING.md](./docs/CONTRIBUTING.md) pour les guidelines.
358
+ Contributions are welcome! Check out [CONTRIBUTING.md](./docs/CONTRIBUTING.md) for guidelines.
355
359
 
356
- ### Développer un plugin
360
+ ### Develop a Plugin
357
361
 
358
- Consultez [PLUGIN_DEVELOPMENT.md](./docs/PLUGIN_DEVELOPMENT.md) pour créer vos propres plugins.
362
+ See [PLUGIN_DEVELOPMENT.md](./docs/PLUGIN_DEVELOPMENT.md) to create your own plugins.
359
363
 
360
- ### Setup développement
364
+ ### Development Setup
361
365
 
362
366
  ```bash
363
367
  # Clone
364
- git clone https://github.com/julien/confjs.git
365
- cd confjs
368
+ git clone https://github.com/julien-lin/orchestrateur-framework.git
369
+ cd orchestrateur-framework
366
370
 
367
- # Install
371
+ # Install dependencies
368
372
  npm install
369
373
 
370
- # Dev mode
371
- npm run dev
372
-
373
- # Tests
374
+ # Run tests
374
375
  npm run test
375
376
  npm run test:watch
376
377
 
378
+ # Type check
379
+ npm run typecheck
380
+
381
+ # Lint
382
+ npm run lint
383
+
377
384
  # Build
378
385
  npm run build
379
386
  ```
380
387
 
388
+ ---
389
+
381
390
  ## 📋 Requirements
382
391
 
383
392
  - **Node.js** ≥ 18.0.0
384
393
  - **npm** / **yarn** / **pnpm** / **bun**
385
- - Un projet React existant
394
+ - An existing React project (Vite, CRA, or custom setup)
395
+
396
+ ---
386
397
 
387
398
  ## 🗺️ Roadmap
388
399
 
389
- ### v1.0 (MVP)
390
- - [x] Support React
391
- - [x] 12 plugins intégrés
392
- - [x] Validation compatibilités
393
- - [x] Configuration automatique
400
+ ### v1.1 (Current)
401
+ - [x] Plugin tracking system (.configjsrc)
402
+ - [x] Plugin detection (package.json + tracker)
403
+ - [x] Enhanced console UX with colors
404
+ - [x] Sequential installation (prevents corruption)
405
+ - [x] 40+ plugins across 10 categories
406
+
407
+ ### v1.2 (Q2 2025)
408
+ - [ ] Configuration presets (starter templates)
409
+ - [ ] Plugin marketplace
410
+ - [ ] Interactive upgrade command
411
+ - [ ] Conflict resolution wizard
394
412
 
395
- ### v1.1 (Q1 2026)
413
+ ### v2.0 (Q3 2025)
396
414
  - [ ] Support Next.js
397
415
  - [ ] Support Remix
398
- - [ ] Plugins UI (MUI, Chakra, Radix)
399
- - [ ] Plugins forms (React Hook Form, Formik)
416
+ - [ ] Support Astro
417
+ - [ ] Web UI for configuration
400
418
 
401
- ### v2.0 (Q2 2026)
419
+ ### v2.x (Future)
402
420
  - [ ] Support Vue 3
403
421
  - [ ] Support Svelte
404
- - [ ] Interface web de configuration
405
-
406
- ### v2.x (Future)
407
- - [ ] Templates personnalisables
408
- - [ ] Marketplace de plugins
409
422
  - [ ] React Native support
423
+ - [ ] Custom plugin templates
410
424
 
411
- ## 📄 License
425
+ ---
412
426
 
413
- [MIT](./LICENSE) © Julien
427
+ ## 💖 Support This Project
414
428
 
415
- ## 🙏 Remerciements
429
+ If ConfigJS saves you time and makes your life easier, consider sponsoring the project:
416
430
 
417
- Inspiré par les meilleures pratiques de :
418
- - [Vite](https://vitejs.dev)
419
- - [Create T3 App](https://create.t3.gg)
420
- - [Projen](https://projen.io)
431
+ **[❤️ Sponsor on GitHub](https://github.com/sponsors/julien-lin)**
432
+
433
+ Your support helps maintain and improve ConfigJS for the entire community!
421
434
 
422
435
  ---
423
436
 
424
- <div align="center">
437
+ ## 📄 License
438
+
439
+ [MIT](./LICENSE) © [Julien Lin](https://github.com/julien-lin)
425
440
 
426
- **Fait avec ❤️ pour la communauté frontend**
441
+ ---
442
+
443
+ ## 🙏 Acknowledgments
444
+
445
+ Inspired by the best practices from:
446
+ - [Vite](https://vitejs.dev) - Lightning-fast build tool
447
+ - [Create T3 App](https://create.t3.gg) - Type-safe full-stack toolkit
448
+ - [Projen](https://projen.io) - Project configuration as code
449
+
450
+ ---
427
451
 
428
- [Changelog](./CHANGELOG.md) [Issues](https://github.com/julien/confjs/issues) [Contributing](./docs/CONTRIBUTING.md)
452
+ **Made with ❤️ for the frontend community**
429
453
 
430
- </div>
454
+ [Changelog](./CHANGELOG.md) • [Issues](https://github.com/julien-lin/orchestrateur-framework/issues) • [Contributing](./docs/CONTRIBUTING.md)
431
455
 
package/dist/cli.js CHANGED
@@ -5,7 +5,7 @@ import "./chunk-QGM4M3NI.js";
5
5
  import { Command } from "commander";
6
6
 
7
7
  // package.json
8
- var version = "1.1.0";
8
+ var version = "1.1.2";
9
9
 
10
10
  // src/cli.ts
11
11
  var program = new Command();
@@ -13,7 +13,7 @@ program.name("confjs").description("Configure your frontend stack, instantly").v
13
13
  program.command("react").description("Configure a React project").option("-y, --yes", "Accept all defaults").option("-d, --dry-run", "Simulate without writing to disk").option("-s, --silent", "Non-interactive mode").option("--debug", "Enable debug logs").option("-c, --config <file>", "Use configuration file").option("-f, --force", "Force installation (overwrite configs)").option("--no-install", "Generate configs only, skip package installation").action(
14
14
  async (options) => {
15
15
  try {
16
- const { installReact } = await import("./install-KQGZKKMT.js");
16
+ const { installReact } = await import("./install-UTFQ545S.js");
17
17
  await installReact(options);
18
18
  } catch (error) {
19
19
  console.error("Error:", error);
@@ -382,13 +382,41 @@ var Installer = class {
382
382
  logger.info(`Starting installation of ${plugins.length} plugin(s)`);
383
383
  try {
384
384
  await this.tracker.load();
385
- const notInstalled = plugins.filter((p) => {
386
- const isInstalled = this.tracker.isInstalled(p.name);
385
+ const notInstalledPromises = plugins.map(async (p) => {
386
+ const isTracked = this.tracker.isInstalled(p.name);
387
+ const isDetected = p.detect ? await p.detect(this.ctx) : false;
388
+ const isInstalled = isTracked || isDetected;
387
389
  if (isInstalled) {
388
390
  logger.info(`${p.displayName} is already installed, skipping...`);
391
+ if (isDetected && !isTracked) {
392
+ logger.debug(
393
+ `${p.displayName} detected but not tracked, adding to tracker...`
394
+ );
395
+ try {
396
+ await this.tracker.addPlugin({
397
+ name: p.name,
398
+ displayName: p.displayName,
399
+ category: p.category,
400
+ version: p.version,
401
+ packages: {
402
+ dependencies: [],
403
+ devDependencies: []
404
+ }
405
+ });
406
+ } catch (error) {
407
+ logger.warn(
408
+ `Failed to add ${p.displayName} to tracker: ${error instanceof Error ? error.message : String(error)}`
409
+ );
410
+ }
411
+ }
412
+ return null;
389
413
  }
390
- return !isInstalled;
414
+ return p;
391
415
  });
416
+ const notInstalledResults = await Promise.all(notInstalledPromises);
417
+ const notInstalled = notInstalledResults.filter(
418
+ (p) => p !== null
419
+ );
392
420
  if (notInstalled.length === 0) {
393
421
  logger.info("All plugins are already installed");
394
422
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@configjs/cli",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "description": "Configure your frontend stack, instantly - Utilitaire CLI d'installation modulaire de bibliothèques frontend",
6
6
  "keywords": [