g360-cli 1.15.1 → 1.15.8
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.md +1477 -1424
- package/package.json +1 -1
- package/src/assets/templates/python-flet-polished/README.md +39 -0
- package/src/assets/templates/python-flet-polished/main.py +7 -0
- package/src/assets/templates/python-flet-polished/pyproject.toml +1 -0
- package/src/assets/templates/python-flet-polished/requirements.txt +1 -0
- package/src/assets/templates/python-flet-polished/skill.json +27 -1
- package/src/assets/templates/python-flet-polished/src/app.py +44 -1
- package/src/assets/templates/python-flet-polished/src/config/theme.py +153 -74
- package/src/assets/templates/python-flet-polished/src/core/g360_registry.py +562 -0
- package/src/assets/templates/python-flet-polished/src/ui/dashboard.py +2 -2
- package/src/assets/templates/python-flet-polished/src/ui/kpi_card.py +1 -1
- package/src/assets/templates/python-flet-polished/src/ui/search_overlay.py +4 -4
- package/src/commands/addon.test.js +2 -2
package/README.md
CHANGED
|
@@ -1,1424 +1,1477 @@
|
|
|
1
|
-
# g360-cli
|
|
2
|
-
|
|
3
|
-
<picture>
|
|
4
|
-
<source media="(prefers-color-scheme: dark)" srcset="src/assets/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
-
<img alt="G360" height="64" src="src/assets/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
-
</picture>
|
|
7
|
-
|
|
8
|
-
> CLI tool for bootstrapping G360 projects with standardized structure, assets, and identity
|
|
9
|
-
|
|
10
|
-
[](https://www.npmjs.com/package/g360-cli)
|
|
11
|
-
[](https://opensource.org/licenses/MIT)
|
|
12
|
-
[](https://www.npmjs.com/package/g360-cli)
|
|
13
|
-
|
|
14
|
-
## ¿Cómo está organizado el proyecto?
|
|
15
|
-
|
|
16
|
-
```mermaid
|
|
17
|
-
flowchart TD
|
|
18
|
-
CLI["g360 CLI<br/>cli.js"]
|
|
19
|
-
CMD["Comandos<br/>init · bring · audit · ingest · scan · validate"]
|
|
20
|
-
LIB["Librerías<br/>manifest · auditor · validator · logger"]
|
|
21
|
-
ASSETS["Assets<br/>templates · brand · signature · ingestion"]
|
|
22
|
-
PY["g360-core (PyPI)<br/>commercial_engine · pipeline · batch_processor"]
|
|
23
|
-
ERP["Datos ERP<br/>.xls · .xlsx · .csv"]
|
|
24
|
-
|
|
25
|
-
CLI --> CMD
|
|
26
|
-
CMD --> LIB
|
|
27
|
-
CMD --> ASSETS
|
|
28
|
-
CMD --> PY
|
|
29
|
-
PY --> ERP
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
## Tabla de Contenidos
|
|
33
|
-
|
|
34
|
-
- [Descripción](#descripción)
|
|
35
|
-
- [Características](#características)
|
|
36
|
-
- [Tecnologías](#tecnologías)
|
|
37
|
-
- [Instalación](#instalación)
|
|
38
|
-
- [Inicio Rápido](#inicio-rápido)
|
|
39
|
-
- [Comandos](#comandos)
|
|
40
|
-
- [Plantillas](#plantillas)
|
|
41
|
-
- [Componentes](#componentes)
|
|
42
|
-
- [Skills](#skills)
|
|
43
|
-
- [
|
|
44
|
-
- [
|
|
45
|
-
- [
|
|
46
|
-
- [
|
|
47
|
-
- [
|
|
48
|
-
- [
|
|
49
|
-
- [
|
|
50
|
-
- [
|
|
51
|
-
- [
|
|
52
|
-
- [
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
**
|
|
62
|
-
**
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
- **
|
|
70
|
-
- **
|
|
71
|
-
- **
|
|
72
|
-
- **
|
|
73
|
-
- **
|
|
74
|
-
- **
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
- **
|
|
82
|
-
- **
|
|
83
|
-
- **
|
|
84
|
-
- **
|
|
85
|
-
- **
|
|
86
|
-
- **
|
|
87
|
-
- **
|
|
88
|
-
- **
|
|
89
|
-
- **
|
|
90
|
-
- **
|
|
91
|
-
- **
|
|
92
|
-
- **Modo
|
|
93
|
-
- **
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
| `-
|
|
175
|
-
| `-
|
|
176
|
-
|
|
|
177
|
-
| `--
|
|
178
|
-
| `--
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
| `--
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
|
245
|
-
| `--
|
|
246
|
-
| `--
|
|
247
|
-
| `--
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
|
308
|
-
| `--
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
|
343
|
-
| `--
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
- `src/
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
# Si
|
|
353
|
-
from
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
| `
|
|
371
|
-
| `
|
|
372
|
-
| `
|
|
373
|
-
| `
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
NC*
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
Clave con SKU coincide CANTIDAD_FAE
|
|
387
|
-
Clave con SKU coincide CANTIDAD_FAE
|
|
388
|
-
Clave con SKU coincide CANTIDAD_FAE
|
|
389
|
-
Clave
|
|
390
|
-
Clave no coincide CANTIDAD_FAE
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
| `
|
|
417
|
-
| `
|
|
418
|
-
| `
|
|
419
|
-
| `
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
g360 present
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
| `--
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
g360 audit
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
| `--
|
|
500
|
-
| `--
|
|
501
|
-
| `--
|
|
502
|
-
| `--
|
|
503
|
-
| `--
|
|
504
|
-
| `--
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
g360 health
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
| `--
|
|
587
|
-
| `--
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
├──
|
|
701
|
-
|
|
702
|
-
│ ├──
|
|
703
|
-
│ ├──
|
|
704
|
-
│
|
|
705
|
-
|
|
706
|
-
├──
|
|
707
|
-
├──
|
|
708
|
-
├──
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
├──
|
|
720
|
-
|
|
721
|
-
│ ├──
|
|
722
|
-
│ ├──
|
|
723
|
-
│
|
|
724
|
-
│ │ ├──
|
|
725
|
-
│ │
|
|
726
|
-
│ └──
|
|
727
|
-
|
|
728
|
-
├──
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
├──
|
|
740
|
-
|
|
741
|
-
│ ├──
|
|
742
|
-
│
|
|
743
|
-
│ └──
|
|
744
|
-
│
|
|
745
|
-
|
|
746
|
-
├──
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
├──
|
|
758
|
-
|
|
759
|
-
│ ├──
|
|
760
|
-
│
|
|
761
|
-
│ └──
|
|
762
|
-
│
|
|
763
|
-
|
|
764
|
-
├──
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
│ ├── app.
|
|
777
|
-
│ ├──
|
|
778
|
-
│
|
|
779
|
-
│ └──
|
|
780
|
-
│
|
|
781
|
-
|
|
782
|
-
├──
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
├──
|
|
794
|
-
├──
|
|
795
|
-
├──
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
│
|
|
808
|
-
│
|
|
809
|
-
|
|
810
|
-
├──
|
|
811
|
-
├──
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
│ ├──
|
|
826
|
-
│
|
|
827
|
-
│ │ ├──
|
|
828
|
-
│ │
|
|
829
|
-
│
|
|
830
|
-
│
|
|
831
|
-
│ └──
|
|
832
|
-
│
|
|
833
|
-
|
|
834
|
-
├──
|
|
835
|
-
├──
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
-
|
|
842
|
-
-
|
|
843
|
-
-
|
|
844
|
-
-
|
|
845
|
-
-
|
|
846
|
-
- **
|
|
847
|
-
-
|
|
848
|
-
-
|
|
849
|
-
-
|
|
850
|
-
- **
|
|
851
|
-
- **
|
|
852
|
-
- **
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
│
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
│
|
|
876
|
-
│
|
|
877
|
-
|
|
878
|
-
├──
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
- `
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
-
|
|
908
|
-
-
|
|
909
|
-
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1080
|
-
|
|
1081
|
-
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
```
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
- `
|
|
1170
|
-
|
|
1171
|
-
**
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1186
|
-
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
**
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
**
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
**
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
#
|
|
1234
|
-
g360
|
|
1235
|
-
|
|
1236
|
-
#
|
|
1237
|
-
g360
|
|
1238
|
-
|
|
1239
|
-
#
|
|
1240
|
-
g360
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
|
1266
|
-
|
|
1267
|
-
|
|
|
1268
|
-
|
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1289
|
-
|
|
1290
|
-
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1295
|
-
|
|
1296
|
-
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
|
|
1317
|
-
|
|
1318
|
-
|
|
1319
|
-
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1337
|
-
|
|
1338
|
-
|
|
1339
|
-
|
|
1340
|
-
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1356
|
-
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
**
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1404
|
-
|
|
1405
|
-
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1409
|
-
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1414
|
-
-
|
|
1415
|
-
-
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1
|
+
# g360-cli
|
|
2
|
+
|
|
3
|
+
<picture>
|
|
4
|
+
<source media="(prefers-color-scheme: dark)" srcset="src/assets/brand/g360/logotypes/logo-g360-light.svg">
|
|
5
|
+
<img alt="G360" height="64" src="src/assets/brand/g360/logotypes/logo-g360-dark.svg">
|
|
6
|
+
</picture>
|
|
7
|
+
|
|
8
|
+
> CLI tool for bootstrapping G360 projects with standardized structure, assets, and identity
|
|
9
|
+
|
|
10
|
+
[](https://www.npmjs.com/package/g360-cli)
|
|
11
|
+
[](https://opensource.org/licenses/MIT)
|
|
12
|
+
[](https://www.npmjs.com/package/g360-cli)
|
|
13
|
+
|
|
14
|
+
## ¿Cómo está organizado el proyecto?
|
|
15
|
+
|
|
16
|
+
```mermaid
|
|
17
|
+
flowchart TD
|
|
18
|
+
CLI["g360 CLI<br/>cli.js"]
|
|
19
|
+
CMD["Comandos<br/>init · bring · audit · ingest · scan · validate"]
|
|
20
|
+
LIB["Librerías<br/>manifest · auditor · validator · logger"]
|
|
21
|
+
ASSETS["Assets<br/>templates · brand · signature · ingestion"]
|
|
22
|
+
PY["g360-core (PyPI)<br/>commercial_engine · pipeline · batch_processor"]
|
|
23
|
+
ERP["Datos ERP<br/>.xls · .xlsx · .csv"]
|
|
24
|
+
|
|
25
|
+
CLI --> CMD
|
|
26
|
+
CMD --> LIB
|
|
27
|
+
CMD --> ASSETS
|
|
28
|
+
CMD --> PY
|
|
29
|
+
PY --> ERP
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Tabla de Contenidos
|
|
33
|
+
|
|
34
|
+
- [Descripción](#descripción)
|
|
35
|
+
- [Características](#características)
|
|
36
|
+
- [Tecnologías](#tecnologías)
|
|
37
|
+
- [Instalación](#instalación)
|
|
38
|
+
- [Inicio Rápido](#inicio-rápido)
|
|
39
|
+
- [Comandos](#comandos)
|
|
40
|
+
- [Plantillas](#plantillas)
|
|
41
|
+
- [Componentes](#componentes)
|
|
42
|
+
- [Skills](#skills)
|
|
43
|
+
- [Convenciones de Nombres](#convenciones-de-nombres)
|
|
44
|
+
- [Configuración](#configuración)
|
|
45
|
+
- [API](#api)
|
|
46
|
+
- [Estructura](#estructura)
|
|
47
|
+
- [Reglas de negocio](#reglas-de-negocio)
|
|
48
|
+
- [Scripts](#scripts)
|
|
49
|
+
- [Testing](#testing)
|
|
50
|
+
- [Contribución](#contribución)
|
|
51
|
+
- [Licencia](#licencia)
|
|
52
|
+
- [Ecosistema G360](#ecosistema-g360)
|
|
53
|
+
- [Integración con OpenCode](#integración-con-opencode)
|
|
54
|
+
|
|
55
|
+
---
|
|
56
|
+
|
|
57
|
+
## Descripción
|
|
58
|
+
|
|
59
|
+
CLI tool para el ecosistema G360 que permite inicializar proyectos con estructura estándar, gestionar assets embebidos, y asegurar compliance mediante auditoría automática. Forma parte del núcleo del ecosistema y está disponible como paquete global de npm.
|
|
60
|
+
|
|
61
|
+
**Tipo**: CLI Tool / Scaffolding / Generator
|
|
62
|
+
**Plataforma**: Node.js >= 18.0.0
|
|
63
|
+
**Distribución**: npm global (`npm install -g g360-cli`)
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Tecnologías
|
|
68
|
+
|
|
69
|
+
- **Runtime**: Node.js >= 18.0.0
|
|
70
|
+
- **Lenguaje**: JavaScript (ESModules)
|
|
71
|
+
- **CLI Framework**: Commander 14.x
|
|
72
|
+
- **UI**: Chalk 5.x (colores), Ora 9.x (spinners), Inquirer 13.x (prompts)
|
|
73
|
+
- **Filesystem**: fs-extra 11.x
|
|
74
|
+
- **Build**: pkg 5.8.1 (portable .exe)
|
|
75
|
+
- **Distribución**: npm global
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Características
|
|
80
|
+
|
|
81
|
+
- **Inicialización rápida** - Crea proyectos G360 con estructura estándar
|
|
82
|
+
- **Gestión de assets** - Trae componentes, skills y plantillas embebidas
|
|
83
|
+
- **Ingesta ERP** - Normaliza `.xls/.xlsx` de SAP, StarSoft, Spring con `g360 bring ingestion`
|
|
84
|
+
- **Motor de clasificación comercial** - `commercial_engine` clasifica documentos en VENTA/DEVOLUCION/AJUSTE con subtipos (PRECIO_LINEA, CARGO_FIJO, SIN_BASE)
|
|
85
|
+
- **Precio efectivo** - PRECIO_BASE, RECARGO_UNITARIO y PRECIO_EFECTIVO separan precio físico de ajustes financieros FAE
|
|
86
|
+
- **Paquete Python** - `g360-core` en PyPI para pipelines de datos independientes
|
|
87
|
+
- **Auditoría** - Verifica compliance de proyectos G360
|
|
88
|
+
- **Limpieza** - Elimina assets embebidos antes de deployment
|
|
89
|
+
- **Multi-plantilla** - Web (Lit, Solid, Svelte, PWA, React), Python (CLI, Flet ⭐, Flet Polished ⭐, CustomTkinter, Migration)
|
|
90
|
+
- **Flet Polished** - Template estandar con dual theme, auto-refresh, hash cache, search debounce, KPI glow, G360 signature, portable launcher
|
|
91
|
+
- **Brand System v2.0.0** - Sistema de marca unificado con favicons, PWA icons, logotypes para G360 y CIPSA
|
|
92
|
+
- **Modo portable** - Proyectos Python con ejecución directa (sin PyInstaller)
|
|
93
|
+
- **Modo offline** - Funciona sin conexión usando assets cacheados
|
|
94
|
+
- **Preview** - Dry-run para previsualizar cambios
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## Versión
|
|
99
|
+
|
|
100
|
+
**Current: v1.15.8** — [Ver en npm](https://www.npmjs.com/package/g360-cli)
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Instalación
|
|
105
|
+
|
|
106
|
+
### Requisitos
|
|
107
|
+
|
|
108
|
+
- Node.js >= 18.0.0
|
|
109
|
+
- npm >= 8.0.0
|
|
110
|
+
|
|
111
|
+
### Instalación global
|
|
112
|
+
|
|
113
|
+
```bash
|
|
114
|
+
npm install -g g360-cli
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Verificar instalación
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
g360 --version
|
|
121
|
+
# → 1.15.0
|
|
122
|
+
|
|
123
|
+
g360 health
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
### Publicar nueva versión
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
npm version patch # o minor / major
|
|
130
|
+
git push --tags
|
|
131
|
+
npm publish
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Inicio Rápido
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
# 1. Inicializar nuevo proyecto
|
|
140
|
+
g360 init mi-proyecto
|
|
141
|
+
|
|
142
|
+
# 2. Entrar al proyecto
|
|
143
|
+
cd mi-proyecto
|
|
144
|
+
|
|
145
|
+
# 3. Traer assets G360
|
|
146
|
+
g360 bring
|
|
147
|
+
|
|
148
|
+
# 4. Ver estructura
|
|
149
|
+
g360 present
|
|
150
|
+
|
|
151
|
+
# 5. Auditar proyecto
|
|
152
|
+
g360 audit
|
|
153
|
+
|
|
154
|
+
# 6. Limpiar antes de deploy
|
|
155
|
+
g360 clean
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
---
|
|
159
|
+
|
|
160
|
+
## Comandos
|
|
161
|
+
|
|
162
|
+
### `g360 init`
|
|
163
|
+
|
|
164
|
+
Inicializa un nuevo proyecto G360.
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
g360 init <nombre> [opciones]
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
**Opciones:**
|
|
171
|
+
|
|
172
|
+
| Opción | Descripción | Valor por defecto |
|
|
173
|
+
|--------|-------------|-------------------|
|
|
174
|
+
| `-t, --template <tipo>` | Tipo de plantilla (default: auto segun skill) | `auto` |
|
|
175
|
+
| `-s, --skill <skill>` | Skill a usar | `corporativo-movil` |
|
|
176
|
+
| `-d, --dir <ruta>` | Directorio destino | `.` |
|
|
177
|
+
| `--dry-run` | Previsualizar sin crear | `false` |
|
|
178
|
+
| `--force` | Sobrescribir existente | `false` |
|
|
179
|
+
| `--brand` | Aplicar marca G360 (logo, colores, firma) después de init | `false` |
|
|
180
|
+
|
|
181
|
+
**Ejemplos:**
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
# Proyecto Lit para cliente móvil
|
|
185
|
+
g360 init mi-proyecto --template lit-web --skill corporativo-movil
|
|
186
|
+
|
|
187
|
+
# Proyecto Solid para herramienta propia
|
|
188
|
+
g360 init mi-herramienta --template solid-web --skill moderno-movil
|
|
189
|
+
|
|
190
|
+
# Proyecto SvelteKit minimalista
|
|
191
|
+
g360 init mi-script --template svelte-web --skill minimalista
|
|
192
|
+
|
|
193
|
+
# Preview sin crear
|
|
194
|
+
g360 init mi-proyecto --dry-run
|
|
195
|
+
|
|
196
|
+
# Crear proyecto con marca G360 aplicada automáticamente
|
|
197
|
+
g360 init mi-proyecto --brand
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
---
|
|
201
|
+
|
|
202
|
+
### `g360 set-skill`
|
|
203
|
+
|
|
204
|
+
Cambia el skill del proyecto actual.
|
|
205
|
+
|
|
206
|
+
```bash
|
|
207
|
+
g360 set-skill <skill> [opciones]
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
**Opciones:**
|
|
211
|
+
|
|
212
|
+
| Opción | Descripción |
|
|
213
|
+
|--------|-------------|
|
|
214
|
+
| `--verbose` | Mostrar detalles |
|
|
215
|
+
| `--force` | Sobrescribir skill existente |
|
|
216
|
+
|
|
217
|
+
**Ejemplos:**
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
# Cambiar a skill corporativo para PC
|
|
221
|
+
g360 set-skill corporativo
|
|
222
|
+
|
|
223
|
+
# Cambiar a skill moderno para móvil
|
|
224
|
+
g360 set-skill moderno-movil
|
|
225
|
+
|
|
226
|
+
# Ver detalles del skill
|
|
227
|
+
g360 set-skill corporativo-g360 --verbose
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
---
|
|
231
|
+
|
|
232
|
+
### `g360 convert`
|
|
233
|
+
|
|
234
|
+
Convierte un proyecto existente a identidad G360.
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
g360 convert [ruta] [opciones]
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Opciones:**
|
|
241
|
+
|
|
242
|
+
| Opción | Descripción | Valor por defecto |
|
|
243
|
+
|--------|-------------|-------------------|
|
|
244
|
+
| `-s, --skill <skill>` | Skill a aplicar | `corporativo-movil` |
|
|
245
|
+
| `--dry-run` | Previsualizar sin aplicar | `false` |
|
|
246
|
+
| `--restructure` | Reestructurar archivos | `false` |
|
|
247
|
+
| `--force` | Forzar cambios peligrosos | `false` |
|
|
248
|
+
| `--backup` | Crear backup antes | `false` |
|
|
249
|
+
|
|
250
|
+
**Ejemplos:**
|
|
251
|
+
|
|
252
|
+
```bash
|
|
253
|
+
# Preview de cambios
|
|
254
|
+
g360 convert . --dry-run
|
|
255
|
+
|
|
256
|
+
# Convertir proyecto existente
|
|
257
|
+
g360 convert ./mi-proyecto --skill corporativo
|
|
258
|
+
|
|
259
|
+
# Con backup automático
|
|
260
|
+
g360 convert . --skill moderno --backup
|
|
261
|
+
|
|
262
|
+
# Forzar cambios peligrosos
|
|
263
|
+
g360 convert . --skill corporativo-movil --force
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
---
|
|
267
|
+
|
|
268
|
+
### `g360 signature`
|
|
269
|
+
|
|
270
|
+
Instala el componente de firma oficial G360 en proyectos web.
|
|
271
|
+
|
|
272
|
+
```bash
|
|
273
|
+
g360 signature install [opciones]
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
**Opciones:**
|
|
277
|
+
|
|
278
|
+
| Opción | Descripción | Valor por defecto |
|
|
279
|
+
|--------|-------------|-------------------|
|
|
280
|
+
| `-p, --path <ruta>` | Ruta al index.html | `.` |
|
|
281
|
+
| `--force` | Reinstalar si ya existe | `false` |
|
|
282
|
+
|
|
283
|
+
**Ejemplos:**
|
|
284
|
+
|
|
285
|
+
```bash
|
|
286
|
+
# Instalar en el directorio actual
|
|
287
|
+
g360 signature install
|
|
288
|
+
|
|
289
|
+
# Forzar reinstalación
|
|
290
|
+
g360 signature install --force
|
|
291
|
+
```
|
|
292
|
+
|
|
293
|
+
---
|
|
294
|
+
|
|
295
|
+
### `g360 bring`
|
|
296
|
+
|
|
297
|
+
Trae assets G360 al proyecto actual.
|
|
298
|
+
|
|
299
|
+
```bash
|
|
300
|
+
g360 bring [asset] [opciones]
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
**Opciones:**
|
|
304
|
+
|
|
305
|
+
| Opción | Descripción |
|
|
306
|
+
|--------|-------------|
|
|
307
|
+
| `-p, --path <ruta>` | Ruta destino |
|
|
308
|
+
| `--dry-run` | Previsualizar |
|
|
309
|
+
| `--force` | Sobrescribir |
|
|
310
|
+
|
|
311
|
+
**Ejemplos:**
|
|
312
|
+
|
|
313
|
+
```bash
|
|
314
|
+
# Traer todos los assets
|
|
315
|
+
g360 bring
|
|
316
|
+
|
|
317
|
+
# Traer solo componentes
|
|
318
|
+
g360 bring components
|
|
319
|
+
|
|
320
|
+
# Traer solo skills
|
|
321
|
+
g360 bring skills
|
|
322
|
+
|
|
323
|
+
# Traer engine específico
|
|
324
|
+
g360 bring engine/g360-skill-audit
|
|
325
|
+
|
|
326
|
+
# Traer ingestion module ERP a proyecto Flet existente
|
|
327
|
+
g360 bring ingestion
|
|
328
|
+
```
|
|
329
|
+
|
|
330
|
+
### `g360 bring ingestion`
|
|
331
|
+
|
|
332
|
+
Instala el módulo de normalización de datos ERP en proyectos Flet.
|
|
333
|
+
|
|
334
|
+
```bash
|
|
335
|
+
g360 bring ingestion [opciones]
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Opciones:**
|
|
339
|
+
|
|
340
|
+
| Opción | Descripción |
|
|
341
|
+
|--------|-------------|
|
|
342
|
+
| `-p, --path <ruta>` | Ruta al proyecto |
|
|
343
|
+
| `--dry-run` | Previsualizar |
|
|
344
|
+
| `--force` | Sobrescribir archivos existentes |
|
|
345
|
+
|
|
346
|
+
**Archivos instalados:**
|
|
347
|
+
- `src/core/ingestion.py` — Normalización de datos (estabilizar_excel_crudo)
|
|
348
|
+
- `src/ui/ingestion_panel.py` — Panel Flet para carga de archivos
|
|
349
|
+
|
|
350
|
+
**Importación (auto-detects pip → local):**
|
|
351
|
+
```python
|
|
352
|
+
# Si g360-core está instalado via pip → from g360_core.ingestion import ...
|
|
353
|
+
# Si no → from core.ingestion import ...
|
|
354
|
+
from ui.ingestion_panel import IngestionPanel
|
|
355
|
+
```
|
|
356
|
+
|
|
357
|
+
El paquete pip acompañante `g360-core` se publica en PyPI:
|
|
358
|
+
```bash
|
|
359
|
+
pip install g360-core
|
|
360
|
+
```
|
|
361
|
+
|
|
362
|
+
### `g360-core` — Módulos principales
|
|
363
|
+
|
|
364
|
+
#### `commercial_engine.py`
|
|
365
|
+
|
|
366
|
+
Motor de lógica de negocio para clasificación documental. Única fuente de verdad para reglas comerciales.
|
|
367
|
+
|
|
368
|
+
| Función | Propósito |
|
|
369
|
+
|---------|-----------|
|
|
370
|
+
| `classify_base()` | Clasificación primaria: VENTA, DEVOLUCION, AJUSTE |
|
|
371
|
+
| `build_invoice_index()` | Índice de facturas para cruce de referencias |
|
|
372
|
+
| `resolve_document_relationships()` | Asigna SUBTIPO_AJUSTE (PRECIO_LINEA, CARGO_FIJO, SIN_BASE) |
|
|
373
|
+
| `calculate_prices()` | PRECIO_BASE, RECARGO_UNITARIO, PRECIO_EFECTIVO |
|
|
374
|
+
| `parse_referencia()` | Descompone REFERENCIA "F01/204-56287" en tipo/serie/número |
|
|
375
|
+
|
|
376
|
+
**Clasificación de documentos** (`classify_base` → primero, `resolve_document_relationships` → después para AJUSTE):
|
|
377
|
+
```
|
|
378
|
+
TPO_DOC CANTIDAD → CATEGORIA_OP SUBTIPO_AJUSTE (cruce vs índice)
|
|
379
|
+
F01/BDI/F03/... cualquiera → VENTA —
|
|
380
|
+
NC* ≠ 0 → DEVOLUCION —
|
|
381
|
+
NC* = 0 → AJUSTE (ver reglas de cruce abajo)
|
|
382
|
+
ND* cualquiera → AJUSTE (ver reglas de cruce abajo)
|
|
383
|
+
```
|
|
384
|
+
Subtipos de AJUSTE (`resolve_document_relationships` cruza `REFERENCIA` contra `build_invoice_index`):
|
|
385
|
+
```
|
|
386
|
+
Clave con SKU coincide CANTIDAD_FAE = 0 → CARGO_FIJO
|
|
387
|
+
Clave con SKU coincide CANTIDAD_FAE ≈ CANT_FACT → PRECIO_LINEA
|
|
388
|
+
Clave con SKU coincide CANTIDAD_FAE < CANT_FACT → PRECIO_PARCIAL
|
|
389
|
+
Clave con SKU coincide CANTIDAD_FAE > CANT_FACT → SIN_BASE
|
|
390
|
+
Clave no coincide CANTIDAD_FAE = 1 → CARGO_FIJO
|
|
391
|
+
Clave no coincide CANTIDAD_FAE ≠ 1 → SIN_BASE
|
|
392
|
+
Sin facturas en dataset — → SIN_BASE (todo AJUSTE)
|
|
393
|
+
```
|
|
394
|
+
> Ver detalle completo en [`BUSINESS_RULES.md`](./BUSINESS_RULES.md).
|
|
395
|
+
|
|
396
|
+
#### `batch_processor.py`
|
|
397
|
+
|
|
398
|
+
| Función | Propósito |
|
|
399
|
+
|---------|-----------|
|
|
400
|
+
| `read_erp_file()` | Punto único de lectura: .xls (xlrd), .xlsx (openpyxl), .csv. `dtype=str` preserva ceros a la izquierda |
|
|
401
|
+
|
|
402
|
+
---
|
|
403
|
+
|
|
404
|
+
### `g360 list`
|
|
405
|
+
|
|
406
|
+
Lista assets disponibles.
|
|
407
|
+
|
|
408
|
+
```bash
|
|
409
|
+
g360 list [tipo] [opciones]
|
|
410
|
+
```
|
|
411
|
+
|
|
412
|
+
**Tipos:**
|
|
413
|
+
|
|
414
|
+
| Tipo | Descripción |
|
|
415
|
+
|------|-------------|
|
|
416
|
+
| `templates` | Lista de plantillas |
|
|
417
|
+
| `components` | Lista de componentes |
|
|
418
|
+
| `skills` | Lista de skills |
|
|
419
|
+
| `ingestion` | Módulo de ingesta ERP |
|
|
420
|
+
| `all` | Todo (por defecto) |
|
|
421
|
+
|
|
422
|
+
**Ejemplos:**
|
|
423
|
+
|
|
424
|
+
```bash
|
|
425
|
+
# Listar todo
|
|
426
|
+
g360 list
|
|
427
|
+
|
|
428
|
+
# Solo plantillas
|
|
429
|
+
g360 list templates
|
|
430
|
+
|
|
431
|
+
# Solo componentes
|
|
432
|
+
g360 list components
|
|
433
|
+
|
|
434
|
+
# Salida JSON
|
|
435
|
+
g360 list --json
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
---
|
|
439
|
+
|
|
440
|
+
### `g360 present`
|
|
441
|
+
|
|
442
|
+
Presenta la estructura del proyecto.
|
|
443
|
+
|
|
444
|
+
```bash
|
|
445
|
+
g360 present [ruta] [opciones]
|
|
446
|
+
```
|
|
447
|
+
|
|
448
|
+
**Opciones:**
|
|
449
|
+
|
|
450
|
+
| Opción | Descripción | Valor por defecto |
|
|
451
|
+
|--------|-------------|-------------------|
|
|
452
|
+
| `--depth <n>` | Profundidad máxima | `3` |
|
|
453
|
+
|
|
454
|
+
**Ejemplo:**
|
|
455
|
+
|
|
456
|
+
```bash
|
|
457
|
+
g360 present
|
|
458
|
+
g360 present ./mi-proyecto --depth 2
|
|
459
|
+
```
|
|
460
|
+
|
|
461
|
+
---
|
|
462
|
+
|
|
463
|
+
### `g360 audit`
|
|
464
|
+
|
|
465
|
+
Audita el proyecto para compliance G360.
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
g360 audit [ruta] [opciones]
|
|
469
|
+
```
|
|
470
|
+
|
|
471
|
+
**Opciones:**
|
|
472
|
+
|
|
473
|
+
| Opción | Descripción |
|
|
474
|
+
|--------|-------------|
|
|
475
|
+
| `--fix` | Auto-corregir problemas |
|
|
476
|
+
| `--verbose` | Salida detallada |
|
|
477
|
+
|
|
478
|
+
**Ejemplo:**
|
|
479
|
+
|
|
480
|
+
```bash
|
|
481
|
+
g360 audit
|
|
482
|
+
g360 audit ./mi-proyecto --verbose
|
|
483
|
+
```
|
|
484
|
+
|
|
485
|
+
---
|
|
486
|
+
|
|
487
|
+
### `g360 clean`
|
|
488
|
+
|
|
489
|
+
Limpia código muerto, duplicados y archivos huérfanos del proyecto.
|
|
490
|
+
|
|
491
|
+
```bash
|
|
492
|
+
g360 clean [ruta] [opciones]
|
|
493
|
+
```
|
|
494
|
+
|
|
495
|
+
**Opciones:**
|
|
496
|
+
|
|
497
|
+
| Opción | Descripción |
|
|
498
|
+
|--------|-------------|
|
|
499
|
+
| `--dry-run` | Previsualizar archivos |
|
|
500
|
+
| `--force` | Omitir confirmación |
|
|
501
|
+
| `--dead` | Eliminar archivos muertos/descontinuados |
|
|
502
|
+
| `--duplicates` | Eliminar archivos duplicados |
|
|
503
|
+
| `--orphans` | Eliminar archivos huérfanos (sin referencias) |
|
|
504
|
+
| `--organize` | Mostrar archivos descolocados |
|
|
505
|
+
| `--all` | Ejecutar todas las verificaciones |
|
|
506
|
+
|
|
507
|
+
**Ejemplos:**
|
|
508
|
+
|
|
509
|
+
```bash
|
|
510
|
+
# Preview de limpieza completa
|
|
511
|
+
g360 clean --dry-run --all
|
|
512
|
+
|
|
513
|
+
# Solo archivos muertos
|
|
514
|
+
g360 clean --dead --force
|
|
515
|
+
|
|
516
|
+
# Solo duplicados
|
|
517
|
+
g360 clean --duplicates --force
|
|
518
|
+
|
|
519
|
+
# Verificar huérfanos (sin eliminar)
|
|
520
|
+
g360 clean --orphans --dry-run
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
---
|
|
524
|
+
|
|
525
|
+
### `g360 health`
|
|
526
|
+
|
|
527
|
+
Verifica el estado del sistema.
|
|
528
|
+
|
|
529
|
+
```bash
|
|
530
|
+
g360 health [opciones]
|
|
531
|
+
```
|
|
532
|
+
|
|
533
|
+
**Opciones:**
|
|
534
|
+
|
|
535
|
+
| Opción | Descripción |
|
|
536
|
+
|--------|-------------|
|
|
537
|
+
| `--verbose` | Info detallada |
|
|
538
|
+
|
|
539
|
+
**Ejemplo:**
|
|
540
|
+
|
|
541
|
+
```bash
|
|
542
|
+
g360 health
|
|
543
|
+
g360 health --verbose
|
|
544
|
+
```
|
|
545
|
+
|
|
546
|
+
---
|
|
547
|
+
|
|
548
|
+
### `g360 update`
|
|
549
|
+
|
|
550
|
+
Actualiza g360-cli a la última versión.
|
|
551
|
+
|
|
552
|
+
```bash
|
|
553
|
+
g360 update [opciones]
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
**Opciones:**
|
|
557
|
+
|
|
558
|
+
| Opción | Descripción |
|
|
559
|
+
|--------|-------------|
|
|
560
|
+
| `--check` | Solo verificar sin actualizar |
|
|
561
|
+
|
|
562
|
+
**Ejemplo:**
|
|
563
|
+
|
|
564
|
+
```bash
|
|
565
|
+
# Verificar nueva versión
|
|
566
|
+
g360 update --check
|
|
567
|
+
|
|
568
|
+
# Actualizar
|
|
569
|
+
g360 update
|
|
570
|
+
```
|
|
571
|
+
|
|
572
|
+
---
|
|
573
|
+
|
|
574
|
+
### `g360 config`
|
|
575
|
+
|
|
576
|
+
Visualiza o modifica la configuración de g360-cli.
|
|
577
|
+
|
|
578
|
+
```bash
|
|
579
|
+
g360 config [opciones]
|
|
580
|
+
```
|
|
581
|
+
|
|
582
|
+
**Opciones:**
|
|
583
|
+
|
|
584
|
+
| Opción | Descripción |
|
|
585
|
+
|--------|-------------|
|
|
586
|
+
| `--list` | Listar todas las opciones de configuración |
|
|
587
|
+
| `--get <key>` | Obtener valor de una configuración |
|
|
588
|
+
| `--set <key=value>` | Establecer un valor de configuración |
|
|
589
|
+
|
|
590
|
+
**Ejemplos:**
|
|
591
|
+
|
|
592
|
+
```bash
|
|
593
|
+
# Listar configuración disponible
|
|
594
|
+
g360 config --list
|
|
595
|
+
|
|
596
|
+
# Verificar skill actual
|
|
597
|
+
g360 config --get skill
|
|
598
|
+
```
|
|
599
|
+
|
|
600
|
+
---
|
|
601
|
+
|
|
602
|
+
### `g360 scan`
|
|
603
|
+
|
|
604
|
+
Escanea un directorio para detectar archivos ERP válidos (.xls, .xlsx, .csv).
|
|
605
|
+
|
|
606
|
+
```bash
|
|
607
|
+
g360 scan <directorio> [opciones]
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
**Opciones:**
|
|
611
|
+
|
|
612
|
+
| Opción | Descripción | Valor por defecto |
|
|
613
|
+
|--------|-------------|-------------------|
|
|
614
|
+
| `-r, --recursive` | Buscar recursivamente | `true` |
|
|
615
|
+
| `--min-score <n>` | Puntuación mínima de coincidencia | `10` |
|
|
616
|
+
|
|
617
|
+
**Ejemplos:**
|
|
618
|
+
|
|
619
|
+
```bash
|
|
620
|
+
# Escanear directorio actual
|
|
621
|
+
g360 scan .
|
|
622
|
+
|
|
623
|
+
# Escanear recursivamente con puntuación mínima
|
|
624
|
+
g360 scan ./data --min-score 20
|
|
625
|
+
|
|
626
|
+
# Solo directorio actual (sin recursión)
|
|
627
|
+
g360 scan ./exports --no-recursive
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
---
|
|
631
|
+
|
|
632
|
+
### `g360 validate`
|
|
633
|
+
|
|
634
|
+
Valida archivos ERP (.xls, .xlsx, .csv) sin procesar completamente.
|
|
635
|
+
|
|
636
|
+
```bash
|
|
637
|
+
g360 validate <archivos...> [opciones]
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
**Opciones:**
|
|
641
|
+
|
|
642
|
+
| Opción | Descripción |
|
|
643
|
+
|--------|-------------|
|
|
644
|
+
| `-r, --recursive` | Buscar recursivamente en directorios |
|
|
645
|
+
|
|
646
|
+
**Ejemplos:**
|
|
647
|
+
|
|
648
|
+
```bash
|
|
649
|
+
# Validar un archivo
|
|
650
|
+
g360 validate factura.xlsx
|
|
651
|
+
|
|
652
|
+
# Validar múltiples archivos
|
|
653
|
+
g360 validate *.xlsx *.xls
|
|
654
|
+
|
|
655
|
+
# Validar todos los archivos ERP en un directorio
|
|
656
|
+
g360 validate ./exports --recursive
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
---
|
|
660
|
+
|
|
661
|
+
### `g360 ingest`
|
|
662
|
+
|
|
663
|
+
Procesa archivos ERP y genera un CSV maestro normalizado.
|
|
664
|
+
|
|
665
|
+
```bash
|
|
666
|
+
g360 ingest <input> [opciones]
|
|
667
|
+
```
|
|
668
|
+
|
|
669
|
+
**Opciones:**
|
|
670
|
+
|
|
671
|
+
| Opción | Descripción | Valor por defecto |
|
|
672
|
+
|--------|-------------|-------------------|
|
|
673
|
+
| `-o, --output <archivo>` | Ruta de salida CSV | `maestro_ventas_crm.csv` |
|
|
674
|
+
|
|
675
|
+
**Archivos de entrada soportados:** `.xls`, `.xlsx`, `.csv`
|
|
676
|
+
|
|
677
|
+
**Ejemplos:**
|
|
678
|
+
|
|
679
|
+
```bash
|
|
680
|
+
# Procesar un archivo Excel
|
|
681
|
+
g360 ingest ventas_sap.xlsx
|
|
682
|
+
|
|
683
|
+
# Procesar directorio completo
|
|
684
|
+
g360 ingest ./exports/ -o consolidado.csv
|
|
685
|
+
|
|
686
|
+
# Procesar con nombre de salida personalizado
|
|
687
|
+
g360 ingest reporte.xlsx -o mi_reporte.csv
|
|
688
|
+
```
|
|
689
|
+
|
|
690
|
+
---
|
|
691
|
+
|
|
692
|
+
## Plantillas
|
|
693
|
+
|
|
694
|
+
### python-flet-polished ⭐ (Estandar actual)
|
|
695
|
+
|
|
696
|
+
Plantilla desktop Python con Flet — patrones de UI avanzados heredados de produccion.
|
|
697
|
+
|
|
698
|
+
```
|
|
699
|
+
mi-proyecto/
|
|
700
|
+
├── main.py
|
|
701
|
+
├── src/
|
|
702
|
+
│ ├── app.py
|
|
703
|
+
│ ├── config/theme.py
|
|
704
|
+
│ ├── core/constants.py, processor.py
|
|
705
|
+
│ └── ui/dashboard.py, kpi_card.py, search_overlay.py
|
|
706
|
+
├── g360_flet/g360_signature.py
|
|
707
|
+
├── assets/fonts/, images/, data/
|
|
708
|
+
├── run.bat, launch.vbs, build-portable.bat
|
|
709
|
+
├── skill.json, pyproject.toml
|
|
710
|
+
└── sync_portable.py
|
|
711
|
+
```
|
|
712
|
+
|
|
713
|
+
### web-pwa
|
|
714
|
+
|
|
715
|
+
Plantilla Progressive Web App con React.
|
|
716
|
+
|
|
717
|
+
```
|
|
718
|
+
mi-proyecto/
|
|
719
|
+
├── index.html
|
|
720
|
+
├── src/
|
|
721
|
+
│ ├── main.jsx
|
|
722
|
+
│ ├── App.jsx
|
|
723
|
+
│ ├── components/
|
|
724
|
+
│ │ ├── Header.jsx
|
|
725
|
+
│ │ ├── FooterSignature.jsx
|
|
726
|
+
│ │ └── LoadingOverlay.jsx
|
|
727
|
+
│ └── styles/main.css
|
|
728
|
+
├── vite.config.js
|
|
729
|
+
├── package.json
|
|
730
|
+
└── skill.json
|
|
731
|
+
```
|
|
732
|
+
|
|
733
|
+
### lit-web
|
|
734
|
+
|
|
735
|
+
Plantilla Web Components con Lit.
|
|
736
|
+
|
|
737
|
+
```
|
|
738
|
+
mi-proyecto/
|
|
739
|
+
├── index.html
|
|
740
|
+
├── src/
|
|
741
|
+
│ ├── index.js
|
|
742
|
+
│ ├── components/
|
|
743
|
+
│ │ └── app-root.js
|
|
744
|
+
│ └── styles/
|
|
745
|
+
│ └── main.css
|
|
746
|
+
├── vite.config.js
|
|
747
|
+
├── package.json
|
|
748
|
+
└── skill.json
|
|
749
|
+
```
|
|
750
|
+
|
|
751
|
+
### solid-web
|
|
752
|
+
|
|
753
|
+
Plantilla con SolidJS.
|
|
754
|
+
|
|
755
|
+
```
|
|
756
|
+
mi-proyecto/
|
|
757
|
+
├── index.html
|
|
758
|
+
├── src/
|
|
759
|
+
│ ├── index.jsx
|
|
760
|
+
│ ├── components/
|
|
761
|
+
│ │ └── App.jsx
|
|
762
|
+
│ └── styles/
|
|
763
|
+
│ └── main.css
|
|
764
|
+
├── vite.config.js
|
|
765
|
+
├── package.json
|
|
766
|
+
└── skill.json
|
|
767
|
+
```
|
|
768
|
+
|
|
769
|
+
### svelte-web
|
|
770
|
+
|
|
771
|
+
Plantilla con SvelteKit.
|
|
772
|
+
|
|
773
|
+
```
|
|
774
|
+
mi-proyecto/
|
|
775
|
+
├── src/
|
|
776
|
+
│ ├── app.html
|
|
777
|
+
│ ├── app.css
|
|
778
|
+
│ ├── routes/
|
|
779
|
+
│ │ └── +page.svelte
|
|
780
|
+
│ └── core/
|
|
781
|
+
│ └── skill.json
|
|
782
|
+
├── svelte.config.js
|
|
783
|
+
├── package.json
|
|
784
|
+
└── skill.json
|
|
785
|
+
```
|
|
786
|
+
|
|
787
|
+
### web-pwa (React)
|
|
788
|
+
|
|
789
|
+
Plantilla React + Vite con PWA.
|
|
790
|
+
|
|
791
|
+
```
|
|
792
|
+
mi-proyecto/
|
|
793
|
+
├── index.html
|
|
794
|
+
├── app.js
|
|
795
|
+
├── styles.css
|
|
796
|
+
├── manifest.json
|
|
797
|
+
└── package.json
|
|
798
|
+
```
|
|
799
|
+
|
|
800
|
+
### python-cli
|
|
801
|
+
|
|
802
|
+
Plantilla CLI de Python con estructura argparse completa.
|
|
803
|
+
|
|
804
|
+
```
|
|
805
|
+
mi-cli/
|
|
806
|
+
├── src/
|
|
807
|
+
│ ├── main.py
|
|
808
|
+
│ └── core/
|
|
809
|
+
│ └── skill.json
|
|
810
|
+
├── requirements.txt
|
|
811
|
+
├── run.bat
|
|
812
|
+
├── build-portable.bat
|
|
813
|
+
└── skill.json
|
|
814
|
+
```
|
|
815
|
+
|
|
816
|
+
### python-flet (LEGACY)
|
|
817
|
+
|
|
818
|
+
> ⚠️ **Deprecado** — Usar `python-flet-polished` para nuevos proyectos.
|
|
819
|
+
|
|
820
|
+
Plantilla GUI de escritorio con **Flet** para apps de contexto ERP.
|
|
821
|
+
|
|
822
|
+
```
|
|
823
|
+
mi-app/
|
|
824
|
+
├── src/
|
|
825
|
+
│ ├── main.py ← Punto de entrada con IngestionPanel integrado
|
|
826
|
+
│ ├── core/
|
|
827
|
+
│ │ ├── ingestion.py ← Normalizador de datos ERP
|
|
828
|
+
│ │ ├── g360_theme.py ← Tema visual G360
|
|
829
|
+
│ │ └── skill.json
|
|
830
|
+
│ ├── ui/
|
|
831
|
+
│ │ └── ingestion_panel.py ← Panel Flet para carga .xls/.xlsx
|
|
832
|
+
│ └── export/
|
|
833
|
+
│ └── __init__.py
|
|
834
|
+
├── pyproject.toml ← Dependencias: flet, pandas, g360-core
|
|
835
|
+
├── run.bat
|
|
836
|
+
├── build.bat
|
|
837
|
+
└── skill.json
|
|
838
|
+
```
|
|
839
|
+
|
|
840
|
+
**Normalización de datos:** La ingesta aplica transformaciones automáticas:
|
|
841
|
+
- Parseo de referencias (`F01/201-243065` → tipo, serie, periodo, número)
|
|
842
|
+
- Separación de sucursales (nombre + dirección)
|
|
843
|
+
- Clasificación de documentos (RUC 11 dígitos / DNI 8 dígitos)
|
|
844
|
+
- Normalización monetaria con auto-detección de formato SAP/Spring
|
|
845
|
+
- Cantidad + Cantidad FAE → cantidad_total + tipo_transaccion
|
|
846
|
+
- **Clasificación comercial**: VENTA / DEVOLUCION / AJUSTE con subtipos PRECIO_LINEA, CARGO_FIJO, SIN_BASE
|
|
847
|
+
- **Precio efectivo**: PRECIO_BASE (físico) y RECARGO_UNITARIO (financiero) separados
|
|
848
|
+
- Cruce de NC/NDB contra facturas referenciadas para determinar ajustes de precio por línea
|
|
849
|
+
- Purga de filas total/general/acumulado
|
|
850
|
+
- **Columnas derivadas para UI**: `cliente_label`, `vendedor_label`, `articulo_label`, `linea_label`, etc. (ID - NOMBRE)
|
|
851
|
+
- **Cliente completo**: `cliente_full_label` = ID_CLIENTE - DOC_CLIENTE_CLEAN - NOM_CLIENTE
|
|
852
|
+
- **Código de factura**: `doc_completo` = TPO_DOC + SERIE_DOC + NRO_DOC (ej: "F204-56287")
|
|
853
|
+
- **Precio unitario**: `precio_base` = SOLES / CANTIDAD
|
|
854
|
+
|
|
855
|
+
### python-flet-migrate
|
|
856
|
+
|
|
857
|
+
Plantilla para migrar aplicaciones Tkinter/CTkinter a Flet.
|
|
858
|
+
|
|
859
|
+
```
|
|
860
|
+
mi-app/
|
|
861
|
+
├── src/
|
|
862
|
+
│ ├── main.py
|
|
863
|
+
│ └── migrate_tkinter.py
|
|
864
|
+
├── requirements.txt
|
|
865
|
+
└── skill.json
|
|
866
|
+
```
|
|
867
|
+
|
|
868
|
+
### python-customtkinter
|
|
869
|
+
|
|
870
|
+
Plantilla GUI de escritorio con **CustomTkinter** (tema oscuro moderno).
|
|
871
|
+
|
|
872
|
+
```
|
|
873
|
+
mi-app/
|
|
874
|
+
├── src/
|
|
875
|
+
│ ├── main.py
|
|
876
|
+
│ └── core/
|
|
877
|
+
│ └── skill.json
|
|
878
|
+
├── requirements.txt
|
|
879
|
+
├── run.bat
|
|
880
|
+
└── build-portable.bat
|
|
881
|
+
```
|
|
882
|
+
|
|
883
|
+
---
|
|
884
|
+
|
|
885
|
+
## Componentes
|
|
886
|
+
|
|
887
|
+
### g360-signature
|
|
888
|
+
|
|
889
|
+
Firma G360 para proyectos web (Web Component).
|
|
890
|
+
|
|
891
|
+
```html
|
|
892
|
+
<!-- Modo para clientes -->
|
|
893
|
+
<g360-signature mode="powered"></g360-signature>
|
|
894
|
+
|
|
895
|
+
<!-- Modo propio -->
|
|
896
|
+
<g360-signature mode="own"></g360-signature>
|
|
897
|
+
|
|
898
|
+
<!-- Con versión -->
|
|
899
|
+
<g360-signature mode="powered" version="1.0.0"></g360-signature>
|
|
900
|
+
```
|
|
901
|
+
|
|
902
|
+
**Atributos:**
|
|
903
|
+
- `mode`: "own" (G360 by ccusi) o "powered" (powered by G360)
|
|
904
|
+
- `version`: Número de versión opcional
|
|
905
|
+
|
|
906
|
+
**Características:**
|
|
907
|
+
- Isotipo: 3 puntos verticales + chevron >
|
|
908
|
+
- Colores: #00d084 (verde), #94a3b8 (gris)
|
|
909
|
+
- Opacidad: 0.4 por defecto, 1.0 en hover
|
|
910
|
+
- Tema: auto-detecta prefers-color-scheme
|
|
911
|
+
|
|
912
|
+
### G360DragModal
|
|
913
|
+
|
|
914
|
+
Modal draggable para interfaces.
|
|
915
|
+
|
|
916
|
+
```jsx
|
|
917
|
+
import G360DragModal from './g360/components/G360DragModal.jsx';
|
|
918
|
+
|
|
919
|
+
G360DragModal({
|
|
920
|
+
isOpen: true,
|
|
921
|
+
title: 'Configuración',
|
|
922
|
+
onClose: () => setOpen(false),
|
|
923
|
+
children: '<p>Contenido del modal</p>'
|
|
924
|
+
});
|
|
925
|
+
```
|
|
926
|
+
|
|
927
|
+
---
|
|
928
|
+
|
|
929
|
+
## Skills
|
|
930
|
+
|
|
931
|
+
Los skills definen el estilo visual, dispositivo y signature del proyecto.
|
|
932
|
+
|
|
933
|
+
### corporativo
|
|
934
|
+
|
|
935
|
+
Proyectos para clientes - estilo corporativo conservador (PC).
|
|
936
|
+
|
|
937
|
+
### corporativo-movil
|
|
938
|
+
|
|
939
|
+
Proyectos para clientes - estilo corporativo - enfoque móvil.
|
|
940
|
+
|
|
941
|
+
### corporativo-g360
|
|
942
|
+
|
|
943
|
+
Proyectos para clientes con colores G360 vibrantes (PC).
|
|
944
|
+
|
|
945
|
+
### corporativo-g360-movil
|
|
946
|
+
|
|
947
|
+
Proyectos para clientes con colores G360 - enfoque móvil.
|
|
948
|
+
|
|
949
|
+
### moderno
|
|
950
|
+
|
|
951
|
+
Herramientas propias G360 - estilo innovador (PC).
|
|
952
|
+
|
|
953
|
+
### moderno-movil
|
|
954
|
+
|
|
955
|
+
Herramientas propias G360 - estilo innovador (móvil).
|
|
956
|
+
|
|
957
|
+
### minimalista
|
|
958
|
+
|
|
959
|
+
Proyectos minimalistas - scripts, CLI, Python.
|
|
960
|
+
|
|
961
|
+
### custom
|
|
962
|
+
|
|
963
|
+
Configuración personalizada - colores ajustables.
|
|
964
|
+
|
|
965
|
+
### flet-desktop
|
|
966
|
+
|
|
967
|
+
Aplicaciones de escritorio Flet - estilo moderno G360 (PC).
|
|
968
|
+
|
|
969
|
+
### flet-desktop-corporativo
|
|
970
|
+
|
|
971
|
+
Aplicaciones Flet para clientes - estilo corporativo conservador.
|
|
972
|
+
|
|
973
|
+
### cipsa
|
|
974
|
+
|
|
975
|
+
Proyectos con marca CIPSA - favicon CIPSA rojo, logo corporativo, signature "powered by G360".
|
|
976
|
+
|
|
977
|
+
### cipsa-movil
|
|
978
|
+
|
|
979
|
+
Apps móviles con marca CIPSA - favicon CIPSA rojo, logo corporativo, enfoque móvil.
|
|
980
|
+
|
|
981
|
+
### flet-desktop-polished
|
|
982
|
+
|
|
983
|
+
App Flet desktop con patrones UI avanzados: dual theme, auto-refresh, hash cache, search debounce, KPI glow, G360 signature widget. **Estandar actual para Flet.**
|
|
984
|
+
|
|
985
|
+
### react-web
|
|
986
|
+
|
|
987
|
+
Aplicaciones web con React/JSX - estilo G360 moderno.
|
|
988
|
+
|
|
989
|
+
### solid-web
|
|
990
|
+
|
|
991
|
+
Aplicaciones web con SolidJS - estilo G360 moderno.
|
|
992
|
+
|
|
993
|
+
### svelte-web
|
|
994
|
+
|
|
995
|
+
Aplicaciones web con Svelte/SvelteKit - estilo G360 moderno.
|
|
996
|
+
|
|
997
|
+
### lit-web
|
|
998
|
+
|
|
999
|
+
Aplicaciones web con Lit Web Components - estilo G360 moderno.
|
|
1000
|
+
|
|
1001
|
+
### customtkinter
|
|
1002
|
+
|
|
1003
|
+
Aplicaciones desktop con CustomTkinter - estilo G360 moderno.
|
|
1004
|
+
|
|
1005
|
+
### Ejemplos de uso
|
|
1006
|
+
|
|
1007
|
+
```bash
|
|
1008
|
+
# Al crear proyecto
|
|
1009
|
+
g360 init mi-proyecto --skill corporativo-movil
|
|
1010
|
+
|
|
1011
|
+
# Cambiar skill después
|
|
1012
|
+
g360 set-skill moderno
|
|
1013
|
+
|
|
1014
|
+
# Ver skills disponibles
|
|
1015
|
+
g360 list skills
|
|
1016
|
+
|
|
1017
|
+
# Aplicar marca a proyecto existente
|
|
1018
|
+
g360 bring brand/cipsa
|
|
1019
|
+
|
|
1020
|
+
# Convertir proyecto con nuevo skill
|
|
1021
|
+
g360 convert . --skill flet-desktop-polished --force
|
|
1022
|
+
```
|
|
1023
|
+
|
|
1024
|
+
---
|
|
1025
|
+
|
|
1026
|
+
## Convenciones de Nombres
|
|
1027
|
+
|
|
1028
|
+
Las aplicaciones G360 siguen un sistema de nomenclatura estandarizado para ser identificables y consistentes en el ecosistema.
|
|
1029
|
+
|
|
1030
|
+
### Clases UI
|
|
1031
|
+
|
|
1032
|
+
| Sufijo | Uso | Ejemplo |
|
|
1033
|
+
|--------|-----|---------|
|
|
1034
|
+
| `App` | Orquestador principal | `StockMonitorApp`, `G360App` |
|
|
1035
|
+
| `Dashboard` | Vista principal con KPIs | `SalesDashboard` |
|
|
1036
|
+
| `Card` | Tarjeta reutilizable | `KpiCard`, `WarehouseCard` |
|
|
1037
|
+
| `Modal` | Ventana modal | `ExportModal`, `SearchModal` |
|
|
1038
|
+
| `Overlay` | Capa flotante | `SearchOverlay`, `LoadingOverlay` |
|
|
1039
|
+
| `Badge` | Indicador pequeno | `HealthBadge` |
|
|
1040
|
+
| `Chip` | Tag seleccionable | `WarehouseChip` |
|
|
1041
|
+
| `Table` | Tabla de datos | `ProductTable` |
|
|
1042
|
+
|
|
1043
|
+
### Funciones/Metodos
|
|
1044
|
+
|
|
1045
|
+
| Prefijo | Uso | Ejemplo |
|
|
1046
|
+
|---------|-----|---------|
|
|
1047
|
+
| `_setup_` | Inicializacion | `_setup_page()`, `_setup_theme()` |
|
|
1048
|
+
| `_build_` | Construccion UI | `_build_header()`, `_build_content()` |
|
|
1049
|
+
| `_on_` | Event handlers | `_on_click()`, `_on_refresh()` |
|
|
1050
|
+
| `_fetch_` / `_download_` | Obtencion datos | `_fetch_data()`, `_download_api()` |
|
|
1051
|
+
| `_load_` / `_save_` | Persistencia | `_load_cache()`, `_save_data()` |
|
|
1052
|
+
| `_update_` / `_refresh_` | Actualizacion | `_update_ui()`, `_refresh_kpis()` |
|
|
1053
|
+
| `_show_` / `_hide_` | Visibilidad | `_show_loading()`, `_hide_overlay()` |
|
|
1054
|
+
| `_toggle_` | Cambio estado | `_toggle_theme()` |
|
|
1055
|
+
| `_validate_` | Validaciones | `_validate_input()` |
|
|
1056
|
+
|
|
1057
|
+
### Archivos
|
|
1058
|
+
|
|
1059
|
+
| Capa | Convention | Ejemplo |
|
|
1060
|
+
|------|------------|---------|
|
|
1061
|
+
| Entry | `main.py` | `main.py` |
|
|
1062
|
+
| App | `app.py` | `app.py` |
|
|
1063
|
+
| Config | `config/*.py` | `theme.py`, `constants.py` |
|
|
1064
|
+
| Core | `core/*.py` | `processor.py`, `downloader.py` |
|
|
1065
|
+
| UI | `ui/*.py` | `dashboard.py`, `kpi_card.py` |
|
|
1066
|
+
| Modals | `ui/modals/*.py` | `export_modal.py` |
|
|
1067
|
+
|
|
1068
|
+
> Para mas detalles, ver [`FLET-NAMING-CONVENTIONS.md`](./FLET-NAMING-CONVENTIONS.md)
|
|
1069
|
+
|
|
1070
|
+
---
|
|
1071
|
+
|
|
1072
|
+
## Configuración
|
|
1073
|
+
|
|
1074
|
+
### g360-manifest.json
|
|
1075
|
+
|
|
1076
|
+
Archivo de manifiesto del proyecto.
|
|
1077
|
+
|
|
1078
|
+
```json
|
|
1079
|
+
{
|
|
1080
|
+
"name": "mi-proyecto",
|
|
1081
|
+
"template": "web-pwa",
|
|
1082
|
+
"version": "1.0.0",
|
|
1083
|
+
"createdAt": "2024-01-01T00:00:00.000Z",
|
|
1084
|
+
"assets": [
|
|
1085
|
+
{
|
|
1086
|
+
"name": "components",
|
|
1087
|
+
"addedAt": "2024-01-01T00:00:00.000Z"
|
|
1088
|
+
}
|
|
1089
|
+
]
|
|
1090
|
+
}
|
|
1091
|
+
```
|
|
1092
|
+
|
|
1093
|
+
### Configuración Global
|
|
1094
|
+
|
|
1095
|
+
```bash
|
|
1096
|
+
# Directorio de configuración
|
|
1097
|
+
~/.g360/
|
|
1098
|
+
|
|
1099
|
+
# Assets cacheados
|
|
1100
|
+
~/.g360/cache/
|
|
1101
|
+
```
|
|
1102
|
+
|
|
1103
|
+
---
|
|
1104
|
+
|
|
1105
|
+
## API
|
|
1106
|
+
|
|
1107
|
+
### Módulo Principal
|
|
1108
|
+
|
|
1109
|
+
```javascript
|
|
1110
|
+
import { g360 } from 'g360-cli';
|
|
1111
|
+
|
|
1112
|
+
await g360.init({ name: 'proyecto', template: 'web-pwa' });
|
|
1113
|
+
await g360.bring('components');
|
|
1114
|
+
await g360.audit({ path: '.', verbose: true });
|
|
1115
|
+
await g360.clean({ path: '.', force: true });
|
|
1116
|
+
```
|
|
1117
|
+
|
|
1118
|
+
---
|
|
1119
|
+
|
|
1120
|
+
## Estructura
|
|
1121
|
+
|
|
1122
|
+
```
|
|
1123
|
+
g360-cli/
|
|
1124
|
+
├── src/
|
|
1125
|
+
│ ├── cli.js # Entrada principal CLI
|
|
1126
|
+
│ ├── commands/ # Comandos (init, bring, audit, scan, validate, ingest, etc.)
|
|
1127
|
+
│ ├── lib/ # Utilidades (assets, auditor, config, logger, validator, etc.)
|
|
1128
|
+
│ ├── schemas/ # Schemas de validación
|
|
1129
|
+
│ └── assets/ # Assets embebidos
|
|
1130
|
+
│ ├── templates/ # Plantillas de proyecto
|
|
1131
|
+
│ ├── components/ # Componentes G360
|
|
1132
|
+
│ ├── brand/ # Sistema de marca v2.0.0 (G360 + CIPSA)
|
|
1133
|
+
│ ├── ingestion/ # Módulo de ingesta ERP (bring)
|
|
1134
|
+
│ ├── engine/ # G360 Engine
|
|
1135
|
+
│ ├── snippets/ # Snippets de código reutilizables
|
|
1136
|
+
│ └── config/ # Configuraciones (g360-skills.json, agent-skills.json, project-types.json)
|
|
1137
|
+
├── py/ # Paquete Python publicable en PyPI
|
|
1138
|
+
│ ├── pyproject.toml # g360-core
|
|
1139
|
+
│ └── src/g360_core/ # commercial_engine.py, pipeline.py, processor.py, batch_processor.py, utils.py
|
|
1140
|
+
├── package.json
|
|
1141
|
+
├── CHANGELOG.md
|
|
1142
|
+
├── README.md
|
|
1143
|
+
└── LICENSE
|
|
1144
|
+
```
|
|
1145
|
+
|
|
1146
|
+
---
|
|
1147
|
+
|
|
1148
|
+
## Scripts
|
|
1149
|
+
|
|
1150
|
+
| Comando | Descripción |
|
|
1151
|
+
|---------|-------------|
|
|
1152
|
+
| `npm run build` | Build portable con pkg (g360.exe) |
|
|
1153
|
+
| `npm run build:portable` | Especificar target node18-win-x64 |
|
|
1154
|
+
| `npm test` | Ejecutar tests con Vitest (53 tests, 9 suites) |
|
|
1155
|
+
| `npm run prepublishOnly` | Validación antes de publicar en npm |
|
|
1156
|
+
|
|
1157
|
+
---
|
|
1158
|
+
|
|
1159
|
+
## Testing
|
|
1160
|
+
|
|
1161
|
+
```bash
|
|
1162
|
+
npm test # Vitest — 53 tests, 9 suites
|
|
1163
|
+
npm run test:watch # Modo watch
|
|
1164
|
+
npm run test:ui # UI interactiva
|
|
1165
|
+
npm run test:coverage
|
|
1166
|
+
```
|
|
1167
|
+
|
|
1168
|
+
**Cobertura actual (v1.12.0):**
|
|
1169
|
+
- `commands/`: init, bring, list, audit, set-skill, addon
|
|
1170
|
+
- `lib/`: manifest, validator, asset-validator, python_runner
|
|
1171
|
+
- **53 passing / 1 timeout** (init.test.js requiere import pesado de inquirer)
|
|
1172
|
+
|
|
1173
|
+
---
|
|
1174
|
+
|
|
1175
|
+
## Contribución
|
|
1176
|
+
|
|
1177
|
+
1. Fork el repositorio
|
|
1178
|
+
2. Crea una rama (`git checkout -b feature/nueva-funcion`)
|
|
1179
|
+
3. Commit tus cambios (`git commit -m 'Agregar nueva función'`)
|
|
1180
|
+
4. Push a la rama (`git push origin feature/nueva-funcion`)
|
|
1181
|
+
5. Abre un Pull Request
|
|
1182
|
+
|
|
1183
|
+
---
|
|
1184
|
+
|
|
1185
|
+
## Licencia
|
|
1186
|
+
|
|
1187
|
+
MIT License - ver [LICENSE](LICENSE) para más detalles.
|
|
1188
|
+
|
|
1189
|
+
---
|
|
1190
|
+
|
|
1191
|
+
## Ecosistema G360
|
|
1192
|
+
|
|
1193
|
+
Este proyecto forma parte de la familia de microherramientas **G360** para apoyo CRM y gestión de datos en escritorio, enfocadas en áreas como ventas, finanzas y logística.
|
|
1194
|
+
|
|
1195
|
+
### Identidad Visual G360
|
|
1196
|
+
|
|
1197
|
+
- **Isotipo**: 3 puntos verticales paralelos (gris-verde-gris) + chevron `>`
|
|
1198
|
+
- **Colores**: #00d084 (verde), #94a3b8 (gris)
|
|
1199
|
+
- **Marca**: G360 - Microherramientas para apoyo CRM y datos en escritorio
|
|
1200
|
+
- **Implementación**: Usar `g360-signature` para branding consistente
|
|
1201
|
+
|
|
1202
|
+
### Herramientas Relacionadas
|
|
1203
|
+
|
|
1204
|
+
- **[g360-signature](https://github.com/carloscus/g360-signature)**: Web component de branding G360
|
|
1205
|
+
- **[g360-order-xlsx](https://github.com/carloscus/g360-order-xlsx)**: Procesador de cotizaciones Excel
|
|
1206
|
+
- **[g360-day-calculator](https://github.com/carloscus/g360-day-calculator)**: Calculadora de días laborables
|
|
1207
|
+
- **[g360-master-data](https://github.com/carloscus/g360-master-data)**: Gestión de datos maestros
|
|
1208
|
+
|
|
1209
|
+
---
|
|
1210
|
+
|
|
1211
|
+
### `g360 addon`
|
|
1212
|
+
|
|
1213
|
+
Gestión de addons y paquetes de desarrollo.
|
|
1214
|
+
|
|
1215
|
+
```bash
|
|
1216
|
+
g360 addon <comando> [paquete] [opciones]
|
|
1217
|
+
```
|
|
1218
|
+
|
|
1219
|
+
**Comandos:**
|
|
1220
|
+
- `install <package>` - Instala un addon (core o dev-tool)
|
|
1221
|
+
- `list` - Lista addons instalados
|
|
1222
|
+
- `remove <package>` - Desinstala un addon
|
|
1223
|
+
|
|
1224
|
+
**Opciones:**
|
|
1225
|
+
| Opción | Descripción |
|
|
1226
|
+
|--------|-------------|
|
|
1227
|
+
| `-p, --path <ruta>` | Ruta destino (default: `.`) |
|
|
1228
|
+
| `--dry-run` | Previsualizar cambios |
|
|
1229
|
+
| `--force` | Forzar reinstalación/remoción |
|
|
1230
|
+
|
|
1231
|
+
**Ejemplos:**
|
|
1232
|
+
```bash
|
|
1233
|
+
# Instalar paquete de diseño (core)
|
|
1234
|
+
g360 addon install @google/design.md
|
|
1235
|
+
|
|
1236
|
+
# Instalar kit de testing (dev)
|
|
1237
|
+
g360 addon install @g360/testing
|
|
1238
|
+
|
|
1239
|
+
# Listar addons
|
|
1240
|
+
g360 addon list
|
|
1241
|
+
|
|
1242
|
+
# Remover addon
|
|
1243
|
+
g360 addon remove @google/design.md
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
**Registro de addons:**
|
|
1247
|
+
- 🏛️ Core Dev: Van a `dependencies` (producción)
|
|
1248
|
+
- 🛠️ Dev Tools: Van a `devDependencies` (desarrollo)
|
|
1249
|
+
|
|
1250
|
+
---
|
|
1251
|
+
|
|
1252
|
+
### `g360 docs`
|
|
1253
|
+
|
|
1254
|
+
Genera o actualiza la documentación del proyecto.
|
|
1255
|
+
|
|
1256
|
+
```bash
|
|
1257
|
+
g360 docs [level] [opciones]
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
**Niveles:**
|
|
1261
|
+
|
|
1262
|
+
| Nivel | Archivo generado | Descripción |
|
|
1263
|
+
|---|---|---|
|
|
1264
|
+
| `readme` (default) | `README.md` | Logo, diagrama Mermaid, quick start, identidad, firma |
|
|
1265
|
+
| `architecture` | `ARCHITECTURE.md` | Diagrama de arquitectura general + flujo de datos |
|
|
1266
|
+
| `business-rules` | `BUSINESS_RULES.md` | Reglas de negocio (solo Python con commercial_engine) |
|
|
1267
|
+
| `dependencies` | `docs/generated/dependencies.mmd` | Dependencias entre módulos |
|
|
1268
|
+
| `classes` | `docs/generated/classes.mmd` | Relaciones entre clases e interfaces |
|
|
1269
|
+
| `code-graph` | `docs/generated/code_graph.mmd` | Grafo de código (proyectos grandes) |
|
|
1270
|
+
| `all` | Todos los anteriores | Todos los niveles aplicables |
|
|
1271
|
+
|
|
1272
|
+
**Opciones:**
|
|
1273
|
+
|
|
1274
|
+
| Opción | Descripción | Valor por defecto |
|
|
1275
|
+
|--------|-------------|-------------------|
|
|
1276
|
+
| `--level <nivel>` | Nivel de documentación | `readme` |
|
|
1277
|
+
| `--project <ruta>` | Ruta del proyecto | `.` |
|
|
1278
|
+
| `--dry-run` | Previsualizar sin escribir | `false` |
|
|
1279
|
+
|
|
1280
|
+
**Ejemplos:**
|
|
1281
|
+
|
|
1282
|
+
```bash
|
|
1283
|
+
# Generar README con diagrama
|
|
1284
|
+
g360 docs
|
|
1285
|
+
|
|
1286
|
+
# Generar toda la documentación
|
|
1287
|
+
g360 docs --level all
|
|
1288
|
+
|
|
1289
|
+
# Generar BUSINESS_RULES para un proyecto Python
|
|
1290
|
+
g360 docs --level business-rules --project ./mi-proyecto
|
|
1291
|
+
|
|
1292
|
+
# Previsualizar sin escribir
|
|
1293
|
+
g360 docs --level all --dry-run
|
|
1294
|
+
```
|
|
1295
|
+
|
|
1296
|
+
---
|
|
1297
|
+
|
|
1298
|
+
### `g360 lint`
|
|
1299
|
+
|
|
1300
|
+
Revisa la consistencia de nomenclatura, detecta funciones duplicadas y verifica la sintaxis del proyecto.
|
|
1301
|
+
|
|
1302
|
+
```bash
|
|
1303
|
+
g360 lint [level] [opciones]
|
|
1304
|
+
```
|
|
1305
|
+
|
|
1306
|
+
**Niveles:**
|
|
1307
|
+
|
|
1308
|
+
| Nivel | Qué revisa |
|
|
1309
|
+
|---|---|
|
|
1310
|
+
| `naming` | Nomenclatura de funciones, clases, variables y archivos |
|
|
1311
|
+
| `duplicates` | Funciones duplicadas con nombres iguales o diferentes |
|
|
1312
|
+
| `syntax` | Errores de sintaxis en archivos JS y Python |
|
|
1313
|
+
| `structure` | Archivos faltantes (README.md, skill.json, manifest) |
|
|
1314
|
+
| `all` (default) | Todas las anteriores |
|
|
1315
|
+
|
|
1316
|
+
**Opciones:**
|
|
1317
|
+
|
|
1318
|
+
| Opción | Descripción | Valor por defecto |
|
|
1319
|
+
|--------|-------------|-------------------|
|
|
1320
|
+
| `--level <nivel>` | Nivel de lint | `all` |
|
|
1321
|
+
| `--project <ruta>` | Ruta del proyecto | `.` |
|
|
1322
|
+
|
|
1323
|
+
**Ejemplos:**
|
|
1324
|
+
|
|
1325
|
+
```bash
|
|
1326
|
+
# Revisar todo el proyecto
|
|
1327
|
+
g360 lint
|
|
1328
|
+
|
|
1329
|
+
# Solo revisar nomenclatura
|
|
1330
|
+
g360 lint --level naming
|
|
1331
|
+
|
|
1332
|
+
# Revisar un proyecto específico
|
|
1333
|
+
g360 lint --project ./mi-proyecto
|
|
1334
|
+
```
|
|
1335
|
+
|
|
1336
|
+
**Puntaje:** `g360 lint` asigna un puntaje de 0 a 100 basado en la cantidad de hallazgos.
|
|
1337
|
+
|
|
1338
|
+
---
|
|
1339
|
+
|
|
1340
|
+
## Integración con OpenCode
|
|
1341
|
+
|
|
1342
|
+
g360-cli incluye integración con **OpenCode** para desarrollo asistido por IA. Esta integración permite que los agentes de IA tengan acceso a los recursos de g360-cli durante el desarrollo.
|
|
1343
|
+
|
|
1344
|
+
### Archivo de Skill
|
|
1345
|
+
|
|
1346
|
+
El archivo `G360-CLI-SKILL.md` contiene toda la información necesaria para que OpenCode:
|
|
1347
|
+
|
|
1348
|
+
- **Recomiende skills apropiados** basándose en el tipo de proyecto
|
|
1349
|
+
- **Sugiera snippets** relevantes para el contexto de desarrollo
|
|
1350
|
+
- **Aplique convenciones** del ecosistema G360 automáticamente
|
|
1351
|
+
- **Genere código** siguiendo los patrones G360
|
|
1352
|
+
- **Valide compliance** con los estándares G360
|
|
1353
|
+
|
|
1354
|
+
### Configuración de OpenCode
|
|
1355
|
+
|
|
1356
|
+
El archivo `opencode-config.json` contiene la configuración de integración con OpenCode, incluyendo:
|
|
1357
|
+
|
|
1358
|
+
- Rutas a los recursos de g360-cli
|
|
1359
|
+
- Comandos disponibles para ejecución
|
|
1360
|
+
- Convenciones de desarrollo del ecosistema
|
|
1361
|
+
- Configuración de colores y formato
|
|
1362
|
+
|
|
1363
|
+
### Uso con OpenCode
|
|
1364
|
+
|
|
1365
|
+
Para usar g360-cli con OpenCode:
|
|
1366
|
+
|
|
1367
|
+
1. **Asegúrate de tener el repo local**:
|
|
1368
|
+
```bash
|
|
1369
|
+
cd "C:\Users\ccusi\Documents\Proyect_Coder\G360-ecosystem\projects\g360-cli"
|
|
1370
|
+
```
|
|
1371
|
+
|
|
1372
|
+
2. **Ejecuta comandos g360**:
|
|
1373
|
+
```bash
|
|
1374
|
+
node src/cli.js list
|
|
1375
|
+
node src/cli.js init <nombre> -t <template> -s <skill>
|
|
1376
|
+
```
|
|
1377
|
+
|
|
1378
|
+
3. **OpenCode puede acceder a los recursos**:
|
|
1379
|
+
- Skills de identidad visual
|
|
1380
|
+
- Snippets de código reutilizables
|
|
1381
|
+
- Plantillas de proyecto estandarizadas
|
|
1382
|
+
- Componentes G360 predefinidos
|
|
1383
|
+
- Convenciones de desarrollo
|
|
1384
|
+
|
|
1385
|
+
### Ejemplos de Interacción
|
|
1386
|
+
|
|
1387
|
+
#### Crear Nuevo Proyecto
|
|
1388
|
+
|
|
1389
|
+
```
|
|
1390
|
+
Usuario: "Quiero crear una app web para un cliente corporativo"
|
|
1391
|
+
OpenCode: "Te recomiendo usar el skill 'corporativo-movil' con la plantilla 'web-pwa'.
|
|
1392
|
+
¿Quieres que inicialice el proyecto con g360 init mi-proyecto --skill corporativo-movil --template web-pwa?"
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1395
|
+
#### Agregar Componente
|
|
1396
|
+
|
|
1397
|
+
```
|
|
1398
|
+
Usuario: "Necesito un botón con estilo G360"
|
|
1399
|
+
OpenCode: "Puedo usar el snippet 'g360-button' que incluye los estilos G360 estándar.
|
|
1400
|
+
Aquí está el código: <button class='g360-btn'>Click</button>"
|
|
1401
|
+
```
|
|
1402
|
+
|
|
1403
|
+
#### Validar Compliance
|
|
1404
|
+
|
|
1405
|
+
```
|
|
1406
|
+
Usuario: "Verifica si este proyecto cumple con los estándares G360"
|
|
1407
|
+
OpenCode: "Ejecutaré g360 audit para verificar compliance y te reportaré cualquier problema encontrado."
|
|
1408
|
+
```
|
|
1409
|
+
|
|
1410
|
+
### Recursos Disponibles
|
|
1411
|
+
|
|
1412
|
+
#### Skills de Identidad Visual
|
|
1413
|
+
|
|
1414
|
+
- `corporativo` - Proyectos para clientes - estilo corporativo conservador (PC)
|
|
1415
|
+
- `corporativo-movil` - Proyectos para clientes - estilo corporativo - enfoque móvil
|
|
1416
|
+
- `corporativo-g360` - Proyectos para clientes con colores G360 vibrantes (PC)
|
|
1417
|
+
- `corporativo-g360-movil` - Proyectos para clientes con colores G360 - enfoque móvil
|
|
1418
|
+
- `moderno` - Herramientas propias G360 - estilo innovador (PC)
|
|
1419
|
+
- `moderno-movil` - Herramientas propias G360 - estilo innovador (móvil)
|
|
1420
|
+
- `minimalista` - Proyectos minimalistas - scripts, CLI, Python
|
|
1421
|
+
- `custom` - Configuración personalizada - colores ajustables
|
|
1422
|
+
- `flet-desktop` - Aplicaciones de escritorio Flet - estilo moderno G360 (PC)
|
|
1423
|
+
- `flet-desktop-corporativo` - Aplicaciones Flet para clientes - estilo corporativo conservador
|
|
1424
|
+
- `cipsa` - Proyectos con marca CIPSA - favicon CIPSA rojo, logo corporativo
|
|
1425
|
+
- `cipsa-movil` - Apps móviles con marca CIPSA - enfoque móvil
|
|
1426
|
+
|
|
1427
|
+
#### Snippets de Código
|
|
1428
|
+
|
|
1429
|
+
**Python CLI**: `cli-argparse-basic`, `cli-subcommands`, `cli-logging`, `cli-config-json`, `cli-progress-bar`, `cli-env-config`, `cli-exit-codes`
|
|
1430
|
+
|
|
1431
|
+
**Web Components**: `g360-header`, `g360-button`, `g360-card`, `g360-badge`
|
|
1432
|
+
|
|
1433
|
+
**Flet Components**: `flet-page`, `flet-card`, `flet-button`, `flet-nav-rail`, `flet-datatable`, `flet-dialog`, `flet-chart-bar`
|
|
1434
|
+
|
|
1435
|
+
#### Plantillas de Proyecto
|
|
1436
|
+
|
|
1437
|
+
- `web-pwa` - Progressive Web App with offline support
|
|
1438
|
+
- `svelte-web` - Svelte web application
|
|
1439
|
+
- `solid-web` - SolidJS web application
|
|
1440
|
+
- `lit-web` - Lit web application
|
|
1441
|
+
- `python-cli` - Python command-line tool
|
|
1442
|
+
- `python-flet` - Python desktop app with Flet framework
|
|
1443
|
+
- `python-flet-migrate` - Migrate tkinter/ctkinter app to Flet
|
|
1444
|
+
- `python-customtkinter` - Python desktop app with CustomTkinter
|
|
1445
|
+
|
|
1446
|
+
### Actualización del Skill
|
|
1447
|
+
|
|
1448
|
+
Para mantener la integración con OpenCode actualizada:
|
|
1449
|
+
|
|
1450
|
+
1. **Sincronizar con g360-cli**: Actualizar `G360-CLI-SKILL.md` cuando se agreguen nuevos skills o snippets
|
|
1451
|
+
2. **Validar comandos**: Verificar que los comandos de g360-cli funcionen correctamente
|
|
1452
|
+
3. **Documentar cambios**: Agregar nuevas funcionalidades a la documentación
|
|
1453
|
+
4. **Testing**: Probar las integraciones con OpenCode regularmente
|
|
1454
|
+
|
|
1455
|
+
### Referencias
|
|
1456
|
+
|
|
1457
|
+
- **G360-CLI-SKILL.md**: Documentación completa del skill para OpenCode
|
|
1458
|
+
- **opencode-config.json**: Configuración de integración con OpenCode
|
|
1459
|
+
- **AGENTS.md**: Guías de desarrollo para agentes en el ecosistema G360
|
|
1460
|
+
|
|
1461
|
+
---
|
|
1462
|
+
|
|
1463
|
+
## Enlaces
|
|
1464
|
+
|
|
1465
|
+
- [npm](https://www.npmjs.com/package/g360-cli)
|
|
1466
|
+
- [GitHub](https://github.com/carloscus/g360-cli)
|
|
1467
|
+
- [Documentación](#)
|
|
1468
|
+
- [Reportar Issue](https://github.com/carloscus/g360-cli/issues)
|
|
1469
|
+
---
|
|
1470
|
+
|
|
1471
|
+
**Marca**: G360 · Microherramientas para apoyo CRM y datos en escritorio
|
|
1472
|
+
**Isotipo**: 3 puntos verticales paralelos (gris-verde-gris) + chevron `>`
|
|
1473
|
+
**Signature**: G360 by ccusi (`mode: own`, definido en `brand/g360/signature`)
|
|
1474
|
+
**Powered by**: [g360-signature](https://github.com/carloscus/g360-signature)
|
|
1475
|
+
|
|
1476
|
+
> Identidad generada desde `src/assets/brand/brand.json` (Brand System v2.0.0).
|
|
1477
|
+
> El logo arriba usa `<picture>` con `prefers-color-scheme` para light/dark.
|