g360-cli 1.3.0 → 1.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -5
- package/dist/g360.exe +0 -0
- package/package.json +6 -6
- package/src/assets/config/g360-skills.json +52 -0
- package/src/assets/config/project-types.json +16 -0
- package/src/assets/config/skills.json +12 -0
- package/src/assets/snippets/snippets.json +77 -0
- package/src/assets/templates/python-cli/build-portable.bat +33 -0
- package/src/assets/templates/python-cli/src/main.py +107 -3
- package/src/assets/templates/python-customtkinter/README.md +47 -0
- package/src/assets/templates/python-customtkinter/build-portable.bat +28 -0
- package/src/assets/templates/python-customtkinter/requirements.txt +1 -0
- package/src/assets/templates/python-customtkinter/run.bat +29 -0
- package/src/assets/templates/python-customtkinter/src/core/skill.json +22 -0
- package/src/assets/templates/python-customtkinter/src/main.py +123 -0
- package/src/assets/templates/python-flet/README.md +130 -0
- package/src/assets/templates/python-flet/build-portable.bat +42 -0
- package/src/assets/templates/python-flet/create_shortcut.vbs +35 -0
- package/src/assets/templates/python-flet/requirements.txt +3 -0
- package/src/assets/templates/python-flet/run.bat +81 -0
- package/src/assets/templates/python-flet/src/core/skill.json +21 -0
- package/src/assets/templates/python-flet/src/main.py +101 -0
- package/src/assets/templates/python-flet/src/test_app.py +103 -0
- package/src/assets/templates/python-flet-migrate/src/main.py +68 -0
- package/src/assets/templates/python-flet-migrate/src/migrate_tkinter.py +56 -0
- package/src/cli.js +5 -1
- package/src/commands/clean.js +51 -4
- package/src/commands/init.js +60 -8
- package/src/commands/signature.js +12 -8
package/README.md
CHANGED
|
@@ -41,9 +41,9 @@ CLI tool para el ecosistema G360 que permite inicializar proyectos con estructur
|
|
|
41
41
|
|
|
42
42
|
- **Runtime**: Node.js >= 18.0.0
|
|
43
43
|
- **Lenguaje**: JavaScript (ESModules)
|
|
44
|
-
- **CLI Framework**: Commander
|
|
45
|
-
- **UI**: Chalk 5.
|
|
46
|
-
- **Filesystem**: fs-extra 11.
|
|
44
|
+
- **CLI Framework**: Commander 14.x
|
|
45
|
+
- **UI**: Chalk 5.x (colores), Ora 9.x (spinners), Inquirer 13.x (prompts)
|
|
46
|
+
- **Filesystem**: fs-extra 11.x
|
|
47
47
|
- **Build**: pkg 5.8.1 (portable .exe)
|
|
48
48
|
- **Distribución**: npm global
|
|
49
49
|
|
|
@@ -55,7 +55,8 @@ CLI tool para el ecosistema G360 que permite inicializar proyectos con estructur
|
|
|
55
55
|
- **Gestión de assets** - Trae componentes, skills y plantillas embebidas
|
|
56
56
|
- **Auditoría** - Verifica compliance de proyectos G360
|
|
57
57
|
- **Limpieza** - Elimina assets embebidos antes de deployment
|
|
58
|
-
- **Multi-plantilla** - Web
|
|
58
|
+
- **Multi-plantilla** - Web (Lit, Solid, Svelte, React), Python (CLI, Flet, CustomTkinter), VBA Excel
|
|
59
|
+
- **Modo portable** - Proyectos Python con ejecución directa (sin PyInstaller)
|
|
59
60
|
- **Modo offline** - Funciona sin conexión usando assets cacheados
|
|
60
61
|
- **Preview** - Dry-run para previsualizar cambios
|
|
61
62
|
|
|
@@ -211,6 +212,33 @@ g360 convert . --skill corporativo-movil --force
|
|
|
211
212
|
|
|
212
213
|
---
|
|
213
214
|
|
|
215
|
+
### `g360 signature`
|
|
216
|
+
|
|
217
|
+
Instala el componente de firma oficial G360 en proyectos web.
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
g360 signature install [opciones]
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Opciones:**
|
|
224
|
+
|
|
225
|
+
| Opción | Descripción | Valor por defecto |
|
|
226
|
+
|--------|-------------|-------------------|
|
|
227
|
+
| `-p, --path <ruta>` | Ruta al index.html | `.` |
|
|
228
|
+
| `--force` | Reinstalar si ya existe | `false` |
|
|
229
|
+
|
|
230
|
+
**Ejemplos:**
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
# Instalar en el directorio actual
|
|
234
|
+
g360 signature install
|
|
235
|
+
|
|
236
|
+
# Forzar reinstalación
|
|
237
|
+
g360 signature install --force
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
---
|
|
241
|
+
|
|
214
242
|
### `g360 bring`
|
|
215
243
|
|
|
216
244
|
Trae assets G360 al proyecto actual.
|
|
@@ -485,7 +513,7 @@ mi-proyecto/
|
|
|
485
513
|
|
|
486
514
|
### python-cli
|
|
487
515
|
|
|
488
|
-
Plantilla CLI de Python.
|
|
516
|
+
Plantilla CLI de Python con estructura argparse completa.
|
|
489
517
|
|
|
490
518
|
```
|
|
491
519
|
mi-cli/
|
|
@@ -494,9 +522,55 @@ mi-cli/
|
|
|
494
522
|
│ └── core/
|
|
495
523
|
│ └── skill.json
|
|
496
524
|
├── requirements.txt
|
|
525
|
+
├── run.bat
|
|
526
|
+
├── build-portable.bat
|
|
527
|
+
└── skill.json
|
|
528
|
+
```
|
|
529
|
+
|
|
530
|
+
### python-flet
|
|
531
|
+
|
|
532
|
+
Plantilla GUI de escritorio con **Flet** (flask-like para Flutter).
|
|
533
|
+
|
|
534
|
+
```
|
|
535
|
+
mi-app/
|
|
536
|
+
├── src/
|
|
537
|
+
│ ├── main.py
|
|
538
|
+
│ └── core/
|
|
539
|
+
│ └── skill.json
|
|
540
|
+
├── requirements.txt
|
|
541
|
+
├── run.bat
|
|
542
|
+
├── build-portable.bat
|
|
497
543
|
└── skill.json
|
|
498
544
|
```
|
|
499
545
|
|
|
546
|
+
### python-flet-migrate
|
|
547
|
+
|
|
548
|
+
Plantilla para migrar aplicaciones Tkinter/CTkinter a Flet.
|
|
549
|
+
|
|
550
|
+
```
|
|
551
|
+
mi-app/
|
|
552
|
+
├── src/
|
|
553
|
+
│ ├── main.py
|
|
554
|
+
│ └── migrate_tkinter.py
|
|
555
|
+
├── requirements.txt
|
|
556
|
+
└── skill.json
|
|
557
|
+
```
|
|
558
|
+
|
|
559
|
+
### python-customtkinter
|
|
560
|
+
|
|
561
|
+
Plantilla GUI de escritorio con **CustomTkinter** (tema oscuro moderno).
|
|
562
|
+
|
|
563
|
+
```
|
|
564
|
+
mi-app/
|
|
565
|
+
├── src/
|
|
566
|
+
│ ├── main.py
|
|
567
|
+
│ └── core/
|
|
568
|
+
│ └── skill.json
|
|
569
|
+
├── requirements.txt
|
|
570
|
+
├── run.bat
|
|
571
|
+
└── build-portable.bat
|
|
572
|
+
```
|
|
573
|
+
|
|
500
574
|
### vba-excel
|
|
501
575
|
|
|
502
576
|
Plantilla VBA para Excel.
|
|
@@ -592,6 +666,14 @@ Proyectos minimalistas - scripts, CLI, Python.
|
|
|
592
666
|
|
|
593
667
|
Configuración personalizada - colores ajustables.
|
|
594
668
|
|
|
669
|
+
### flet-desktop
|
|
670
|
+
|
|
671
|
+
Aplicaciones de escritorio Flet - estilo moderno G360 (PC).
|
|
672
|
+
|
|
673
|
+
### flet-desktop-corporativo
|
|
674
|
+
|
|
675
|
+
Aplicaciones Flet para clientes - estilo corporativo conservador.
|
|
676
|
+
|
|
595
677
|
### Ejemplos de uso
|
|
596
678
|
|
|
597
679
|
```bash
|
package/dist/g360.exe
ADDED
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "g360-cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "CLI tool for bootstrapping G360 projects with standardized structure, assets, and identity",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/cli.js",
|
|
@@ -28,11 +28,11 @@
|
|
|
28
28
|
"author": "Carlos Cusi",
|
|
29
29
|
"license": "MIT",
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"chalk": "^5.
|
|
32
|
-
"commander": "^
|
|
33
|
-
"fs-extra": "^11.
|
|
34
|
-
"inquirer": "^
|
|
35
|
-
"ora": "^
|
|
31
|
+
"chalk": "^5.6.2",
|
|
32
|
+
"commander": "^14.0.3",
|
|
33
|
+
"fs-extra": "^11.3.4",
|
|
34
|
+
"inquirer": "^13.4.2",
|
|
35
|
+
"ora": "^9.4.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"pkg": "^5.8.1"
|
|
@@ -167,6 +167,58 @@
|
|
|
167
167
|
"mode": "custom",
|
|
168
168
|
"text": "custom"
|
|
169
169
|
}
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
"name": "flet-desktop",
|
|
173
|
+
"description": "Aplicaciones de escritorio Flet - estilo G360",
|
|
174
|
+
"device": "pc",
|
|
175
|
+
"colors": {
|
|
176
|
+
"bg": "#0b1220",
|
|
177
|
+
"surface": "#1a2332",
|
|
178
|
+
"accent": "#00d084",
|
|
179
|
+
"text": "#f0f4f8",
|
|
180
|
+
"muted": "#94a3b8",
|
|
181
|
+
"success": "#22c55e",
|
|
182
|
+
"warning": "#f59e0b",
|
|
183
|
+
"error": "#ef4444"
|
|
184
|
+
},
|
|
185
|
+
"effects": {
|
|
186
|
+
"glassmorphism": true,
|
|
187
|
+
"blur": "12px",
|
|
188
|
+
"rounded": "12px"
|
|
189
|
+
},
|
|
190
|
+
"signature": {
|
|
191
|
+
"mode": "own",
|
|
192
|
+
"text": "G360 Desktop"
|
|
193
|
+
},
|
|
194
|
+
"framework": "flet",
|
|
195
|
+
"portable": true
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
"name": "flet-desktop-corporativo",
|
|
199
|
+
"description": "Aplicaciones Flet para clientes - estilo corporativo",
|
|
200
|
+
"device": "pc",
|
|
201
|
+
"colors": {
|
|
202
|
+
"bg": "#ffffff",
|
|
203
|
+
"surface": "#f8fafc",
|
|
204
|
+
"accent": "#00796B",
|
|
205
|
+
"text": "#1e293b",
|
|
206
|
+
"muted": "#64748b",
|
|
207
|
+
"success": "#10b981",
|
|
208
|
+
"warning": "#f59e0b",
|
|
209
|
+
"error": "#dc2626"
|
|
210
|
+
},
|
|
211
|
+
"effects": {
|
|
212
|
+
"glassmorphism": false,
|
|
213
|
+
"blur": "0px",
|
|
214
|
+
"rounded": "8px"
|
|
215
|
+
},
|
|
216
|
+
"signature": {
|
|
217
|
+
"mode": "powered",
|
|
218
|
+
"text": "powered by G360"
|
|
219
|
+
},
|
|
220
|
+
"framework": "flet",
|
|
221
|
+
"portable": true
|
|
170
222
|
}
|
|
171
223
|
]
|
|
172
224
|
}
|
|
@@ -21,6 +21,22 @@
|
|
|
21
21
|
"framework": "python",
|
|
22
22
|
"features": ["cli", "argparse", "rich"]
|
|
23
23
|
},
|
|
24
|
+
{
|
|
25
|
+
"id": "python-flet",
|
|
26
|
+
"name": "Python Flet Desktop",
|
|
27
|
+
"description": "Python desktop app with Flet framework",
|
|
28
|
+
"framework": "flet",
|
|
29
|
+
"features": ["desktop", "gui", "cross-platform", "portable"],
|
|
30
|
+
"portable": true
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"id": "python-flet-migrate",
|
|
34
|
+
"name": "Python Flet Migration",
|
|
35
|
+
"description": "Migrate tkinter/ctkinter app to Flet",
|
|
36
|
+
"framework": "flet",
|
|
37
|
+
"features": ["migration", "desktop", "gui", "portable"],
|
|
38
|
+
"portable": true
|
|
39
|
+
},
|
|
24
40
|
{
|
|
25
41
|
"id": "vba-excel",
|
|
26
42
|
"name": "VBA Excel",
|
|
@@ -25,6 +25,18 @@
|
|
|
25
25
|
"description": "Backend development agent",
|
|
26
26
|
"files": []
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
"name": "python-desktop",
|
|
30
|
+
"description": "Python Flet desktop development agent",
|
|
31
|
+
"files": [],
|
|
32
|
+
"capabilities": ["flet", "gui", "desktop", "portable", "migrate-tkinter", "migrate-ctkinter"]
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"name": "python-calculations",
|
|
36
|
+
"description": "Python calculations and data processing agent",
|
|
37
|
+
"files": [],
|
|
38
|
+
"capabilities": ["python", "math", "data-processing", "statistics", "flet-ui"]
|
|
39
|
+
},
|
|
28
40
|
{
|
|
29
41
|
"name": "calculations",
|
|
30
42
|
"description": "Calculations and data processing",
|
|
@@ -1,5 +1,47 @@
|
|
|
1
1
|
{
|
|
2
2
|
"snippets": [
|
|
3
|
+
{
|
|
4
|
+
"name": "cli-argparse-basic",
|
|
5
|
+
"description": "Basic argparse CLI structure",
|
|
6
|
+
"language": "python",
|
|
7
|
+
"code": "import argparse\n\nparser = argparse.ArgumentParser(description='My CLI App')\nparser.add_argument('input', help='Input file')\nparser.add_argument('-v', '--verbose', action='store_true')\nparser.add_argument('-o', '--output', default='output.txt')\nargs = parser.parse_args()"
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
"name": "cli-subcommands",
|
|
11
|
+
"description": "CLI with subcommands (git-style)",
|
|
12
|
+
"language": "python",
|
|
13
|
+
"code": "import argparse\n\nparser = argparse.ArgumentParser()\nsubparsers = parser.add_subparsers()\n\ninit_parser = subparsers.add_parser('init')\ninit_parser.add_argument('name')\n\nrun_parser = subparsers.add_parser('run')\nrun_parser.add_argument('--watch', action='store_true')"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"name": "cli-logging",
|
|
17
|
+
"description": "Logging setup for CLI",
|
|
18
|
+
"language": "python",
|
|
19
|
+
"code": "import logging\nimport sys\n\ndef setup_logging(verbose=False):\n level = logging.DEBUG if verbose else logging.INFO\n logging.basicConfig(\n level=level,\n format='%(asctime)s - %(levelname)s - %(message)s',\n handlers=[logging.StreamHandler(sys.stdout)]\n )\n return logging.getLogger(__name__)"
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
"name": "cli-config-json",
|
|
23
|
+
"description": "Load JSON config file",
|
|
24
|
+
"language": "python",
|
|
25
|
+
"code": "import json\nfrom pathlib import Path\n\ndef load_config(config_path='config.json'):\n path = Path(config_path)\n if not path.exists():\n raise FileNotFoundError(f'Config not found: {config_path}')\n with open(path) as f:\n return json.load(f)"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"name": "cli-progress-bar",
|
|
29
|
+
"description": "Progress bar with tqdm",
|
|
30
|
+
"language": "python",
|
|
31
|
+
"code": "from tqdm import tqdm\n\nfor item in tqdm(items, desc='Processing', unit='item'):\n # process item\n pass"
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
"name": "cli-env-config",
|
|
35
|
+
"description": "Environment-based configuration",
|
|
36
|
+
"language": "python",
|
|
37
|
+
"code": "import os\nfrom pathlib import Path\n\ndef get_config():\n env = os.getenv('APP_ENV', 'development')\n config_dir = Path(__file__).parent / 'config'\n config_file = config_dir / f'{env}.json'\n return json.loads(config_file.read_text())"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
"name": "cli-exit-codes",
|
|
41
|
+
"description": "Exit codes constants",
|
|
42
|
+
"language": "python",
|
|
43
|
+
"code": "EXIT_OK = 0\nEXIT_ERROR = 1\nEXIT_USAGE = 2\nEXIT_DATA = 3\n\n# Usage: sys.exit(EXIT_ERROR)"
|
|
44
|
+
},
|
|
3
45
|
{
|
|
4
46
|
"name": "g360-header",
|
|
5
47
|
"description": "Standard G360 header",
|
|
@@ -19,6 +61,41 @@
|
|
|
19
61
|
"name": "g360-badge",
|
|
20
62
|
"description": "G360 status badge",
|
|
21
63
|
"code": "<span class='g360-badge g360-badge-success'>Active</span>"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"name": "flet-page",
|
|
67
|
+
"description": "Flet page setup with G360 theme",
|
|
68
|
+
"code": "import flet as ft\n\ndef main(page: ft.Page):\n page.title = 'G360 App'\n page.theme_mode = ft.ThemeMode.DARK\n page.bgcolor = '#0b1220'\n page.padding = 20\n page.add(ft.Text('G360 Desktop App', size=24, color='#00d084'))"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"name": "flet-card",
|
|
72
|
+
"description": "G360 styled Flet Card",
|
|
73
|
+
"code": "ft.Container(\n content=ft.Column([...]),\n bgcolor='#1a2332',\n border_radius=12,\n padding=15,\n shadow=ft.BoxShadow(\n spread_radius=1,\n blur_radius=20,\n color='#00d08420'\n )\n)"
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
"name": "flet-button",
|
|
77
|
+
"description": "G360 styled Flet Button",
|
|
78
|
+
"code": "ft.ElevatedButton(\n content=ft.Text('G360 Button', color='#0b1220'),\n style=ft.ButtonStyle(\n bgcolor='#00d084',\n color='#0b1220',\n shape=ft.RoundedRectangleBorder(radius=8),\n padding=15\n )\n)"
|
|
79
|
+
},
|
|
80
|
+
{
|
|
81
|
+
"name": "flet-nav-rail",
|
|
82
|
+
"description": "Flet navigation rail for desktop",
|
|
83
|
+
"code": "ft.NavigationRail(\n selected_index=0,\n label_type=ft.NavigationRailLabelType.ALL,\n min_width=100,\n min_extended_width=200,\n destinations=[\n ft.NavigationRailDestination(icon=ft.icons.HOME_OUTLINED, selected_icon=ft.icons.HOME, label='Home'),\n ft.NavigationRailDestination(icon=ft.icons.SETTINGS_OUTLINED, selected_icon=ft.icons.SETTINGS, label='Settings'),\n ]\n)"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"name": "flet-datatable",
|
|
87
|
+
"description": "Flet DataTable with G360 styling",
|
|
88
|
+
"code": "ft.DataTable(\n heading_row_color='#00d084',\n data_row_color='#1a2332',\n columns=[\n ft.DataColumn(ft.Text('SKU', color='#f0f4f8')),\n ft.DataColumn(ft.Text('Descripción', color='#f0f4f8')),\n ft.DataColumn(ft.Text('Cantidad', color='#f0f4f8')),\n ],\n rows=[]\n)"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
"name": "flet-dialog",
|
|
92
|
+
"description": "Flet modal dialog",
|
|
93
|
+
"code": "def show_dialog(page, title, content):\n dialog = ft.AlertDialog(\n title=ft.Text(title, color='#00d084'),\n content=ft.Container(content=content, padding=20),\n actions=[\n ft.TextButton('Cancelar', on_click=lambda _: page.close_dialog()),\n ft.ElevatedButton('Aceptar', bgcolor='#00d084', color='#0b1220'),\n ]\n )\n page.dialog = dialog\n dialog.open = True\n page.update()"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"name": "flet-chart-bar",
|
|
97
|
+
"description": "Flet bar chart for data visualization",
|
|
98
|
+
"code": "ft.BarChart(\n bar_groups=[\n ft.BarChartGroup(\n x=0,\n bar_rods=[\n ft.BarChartRod(\n from_y=0,\n to_y=50,\n width=40,\n color='#00d084',\n ),\n ],\n ),\n ],\n left_axis=ft.ChartAxis(labels_size=40),\n bottom_axis=ft.ChartAxis(labels=[...]),\n)"
|
|
22
99
|
}
|
|
23
100
|
]
|
|
24
101
|
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
chcp 65001 >nul
|
|
3
|
+
title G360 - Portable CLI Launcher
|
|
4
|
+
|
|
5
|
+
echo.
|
|
6
|
+
echo ==============================================
|
|
7
|
+
echo G360 CLI - Portable Version
|
|
8
|
+
echo (Requires Python installed)
|
|
9
|
+
echo ==============================================
|
|
10
|
+
echo.
|
|
11
|
+
|
|
12
|
+
python --version >nul 2>&1
|
|
13
|
+
if errorlevel 1 (
|
|
14
|
+
echo ERROR: Python no encontrado
|
|
15
|
+
echo Instala Python desde: https://python.org
|
|
16
|
+
echo O usa setup.bat para configurar ambiente
|
|
17
|
+
pause
|
|
18
|
+
exit /b 1
|
|
19
|
+
)
|
|
20
|
+
|
|
21
|
+
echo Buscando archivo principal...
|
|
22
|
+
if not exist "src\main.py" (
|
|
23
|
+
echo ERROR: src\main.py no encontrado
|
|
24
|
+
pause
|
|
25
|
+
exit /b 1
|
|
26
|
+
)
|
|
27
|
+
|
|
28
|
+
echo Ejecutando G360 CLI...
|
|
29
|
+
echo.
|
|
30
|
+
python src\main.py %*
|
|
31
|
+
|
|
32
|
+
echo.
|
|
33
|
+
pause
|
|
@@ -1,13 +1,117 @@
|
|
|
1
1
|
#!/usr/bin/env python3
|
|
2
2
|
"""
|
|
3
3
|
G360 Python CLI Application
|
|
4
|
+
Main entry point with argparse-based CLI structure
|
|
4
5
|
"""
|
|
5
6
|
|
|
7
|
+
import argparse
|
|
8
|
+
import sys
|
|
9
|
+
import os
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
12
|
+
VERSION = "1.0.0"
|
|
13
|
+
APP_NAME = "G360 CLI"
|
|
14
|
+
AUTHOR = "Carlos Cusi"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def setup_logging(verbose=False):
|
|
18
|
+
"""Configure logging based on verbose flag"""
|
|
19
|
+
import logging
|
|
20
|
+
level = logging.DEBUG if verbose else logging.INFO
|
|
21
|
+
format_str = "%(asctime)s - %(levelname)s - %(message)s"
|
|
22
|
+
logging.basicConfig(level=level, format=format_str, datefmt="%H:%M:%S")
|
|
23
|
+
return logging.getLogger(__name__)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
def cmd_hello(args):
|
|
27
|
+
"""Hello world command example"""
|
|
28
|
+
print(f"\n{APP_NAME} v{VERSION}")
|
|
29
|
+
print(f"Author: {AUTHOR}")
|
|
30
|
+
print(f"Working directory: {os.getcwd()}")
|
|
31
|
+
if args.name:
|
|
32
|
+
print(f"\nHello, {args.name}!")
|
|
33
|
+
print()
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
def cmd_process(args):
|
|
37
|
+
"""Process data command"""
|
|
38
|
+
logger = setup_logging(args.verbose)
|
|
39
|
+
logger.info(f"Processing: {args.input}")
|
|
40
|
+
|
|
41
|
+
if not os.path.exists(args.input):
|
|
42
|
+
logger.error(f"Input file not found: {args.input}")
|
|
43
|
+
return 1
|
|
44
|
+
|
|
45
|
+
output_dir = args.output or os.path.dirname(args.input) or "."
|
|
46
|
+
logger.info(f"Output directory: {output_dir}")
|
|
47
|
+
|
|
48
|
+
print(f"✓ Processed {args.input}")
|
|
49
|
+
return 0
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
def cmd_config(args):
|
|
53
|
+
"""Show or edit configuration"""
|
|
54
|
+
config_path = Path("g360") / "config.json"
|
|
55
|
+
|
|
56
|
+
if args.show:
|
|
57
|
+
if config_path.exists():
|
|
58
|
+
import json
|
|
59
|
+
with open(config_path) as f:
|
|
60
|
+
print(json.dumps(json.load(f), indent=2))
|
|
61
|
+
else:
|
|
62
|
+
print("No config file found. Run: g360 init")
|
|
63
|
+
return
|
|
64
|
+
|
|
65
|
+
if args.set:
|
|
66
|
+
key, value = args.set.split("=")
|
|
67
|
+
print(f"Setting {key} = {value}")
|
|
68
|
+
|
|
6
69
|
|
|
7
70
|
def main():
|
|
8
|
-
|
|
9
|
-
|
|
71
|
+
parser = argparse.ArgumentParser(
|
|
72
|
+
prog="g360",
|
|
73
|
+
description=f"{APP_NAME} - CLI tool for G360 ecosystem",
|
|
74
|
+
formatter_class=argparse.RawDescriptionHelpFormatter,
|
|
75
|
+
epilog="""
|
|
76
|
+
Examples:
|
|
77
|
+
g360 hello
|
|
78
|
+
g360 hello --name "World"
|
|
79
|
+
g360 process data.csv -o output/
|
|
80
|
+
g360 config --show
|
|
81
|
+
"""
|
|
82
|
+
)
|
|
83
|
+
|
|
84
|
+
parser.add_argument("-v", "--version", action="version", version=f"%(prog)s {VERSION}")
|
|
85
|
+
parser.add_argument("--verbose", "-V", action="store_true", help="Enable verbose output")
|
|
86
|
+
|
|
87
|
+
subparsers = parser.add_subparsers(dest="command", help="Available commands")
|
|
88
|
+
|
|
89
|
+
hello_parser = subparsers.add_parser("hello", help="Say hello")
|
|
90
|
+
hello_parser.add_argument("--name", "-n", help="Name to greet")
|
|
91
|
+
|
|
92
|
+
process_parser = subparsers.add_parser("process", help="Process input data")
|
|
93
|
+
process_parser.add_argument("input", help="Input file or directory")
|
|
94
|
+
process_parser.add_argument("-o", "--output", help="Output directory")
|
|
95
|
+
|
|
96
|
+
config_parser = subparsers.add_parser("config", help="Manage configuration")
|
|
97
|
+
config_parser.add_argument("--show", action="store_true", help="Show current config")
|
|
98
|
+
config_parser.add_argument("--set", metavar="KEY=VALUE", help="Set config value")
|
|
99
|
+
|
|
100
|
+
args = parser.parse_args()
|
|
101
|
+
|
|
102
|
+
if not args.command:
|
|
103
|
+
parser.print_help()
|
|
104
|
+
return 0
|
|
105
|
+
|
|
106
|
+
if args.command == "hello":
|
|
107
|
+
return cmd_hello(args)
|
|
108
|
+
elif args.command == "process":
|
|
109
|
+
return cmd_process(args)
|
|
110
|
+
elif args.command == "config":
|
|
111
|
+
return cmd_config(args)
|
|
112
|
+
|
|
113
|
+
return 0
|
|
10
114
|
|
|
11
115
|
|
|
12
116
|
if __name__ == "__main__":
|
|
13
|
-
main()
|
|
117
|
+
sys.exit(main())
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# G360 CustomTkinter Template
|
|
2
|
+
|
|
3
|
+
Modern GUI desktop application with CustomTkinter and G360 theming.
|
|
4
|
+
|
|
5
|
+
## Requisitos
|
|
6
|
+
|
|
7
|
+
- Python 3.8+
|
|
8
|
+
- customtkinter
|
|
9
|
+
|
|
10
|
+
## Instalacion
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install -r requirements.txt
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Ejecutar
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
run.bat
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Portable
|
|
23
|
+
|
|
24
|
+
Ejecuta `build-portable.bat` - requiere Python instalado en el sistema.
|
|
25
|
+
|
|
26
|
+
## Estructura
|
|
27
|
+
|
|
28
|
+
```
|
|
29
|
+
python-customtkinter/
|
|
30
|
+
├── src/
|
|
31
|
+
│ ├── main.py # App principal
|
|
32
|
+
│ └── core/
|
|
33
|
+
│ └── skill.json # Configuracion G360
|
|
34
|
+
├── requirements.txt
|
|
35
|
+
├── run.bat # Ejecutar desarrollo
|
|
36
|
+
└── build-portable.bat # Version portable
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## Caracteristicas
|
|
40
|
+
|
|
41
|
+
- Tema oscuro G360 (#0b1220, #1a2332, #00d084)
|
|
42
|
+
- UI moderna con CustomTkinter
|
|
43
|
+
- Listo para expansion
|
|
44
|
+
|
|
45
|
+
## License
|
|
46
|
+
|
|
47
|
+
MIT - G360 Ecosystem
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
chcp 65001 >nul
|
|
3
|
+
title G360 - Portable CustomTkinter
|
|
4
|
+
|
|
5
|
+
echo.
|
|
6
|
+
echo ==============================================
|
|
7
|
+
echo G360 CustomTkinter - Portable
|
|
8
|
+
echo (Requires Python installed)
|
|
9
|
+
echo ==============================================
|
|
10
|
+
echo.
|
|
11
|
+
|
|
12
|
+
python --version >nul 2>&1
|
|
13
|
+
if errorlevel 1 (
|
|
14
|
+
echo ERROR: Python no encontrado
|
|
15
|
+
pause
|
|
16
|
+
exit /b 1
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
pip show customtkinter >nul 2>&1
|
|
20
|
+
if errorlevel 1 (
|
|
21
|
+
pip install customtkinter
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
echo.
|
|
25
|
+
echo Ejecutando G360 App...
|
|
26
|
+
python src\main.py
|
|
27
|
+
|
|
28
|
+
pause
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
customtkinter>=5.2.0
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
@echo off
|
|
2
|
+
chcp 65001 >nul
|
|
3
|
+
title G360 - CustomTkinter App
|
|
4
|
+
|
|
5
|
+
echo.
|
|
6
|
+
echo ==============================================
|
|
7
|
+
echo G360 CustomTkinter Application
|
|
8
|
+
echo ==============================================
|
|
9
|
+
echo.
|
|
10
|
+
|
|
11
|
+
python --version >nul 2>&1
|
|
12
|
+
if errorlevel 1 (
|
|
13
|
+
echo ERROR: Python no encontrado
|
|
14
|
+
pause
|
|
15
|
+
exit /b 1
|
|
16
|
+
)
|
|
17
|
+
|
|
18
|
+
echo Verificando customtkinter...
|
|
19
|
+
pip show customtkinter >nul 2>&1
|
|
20
|
+
if errorlevel 1 (
|
|
21
|
+
echo Instalando customtkinter...
|
|
22
|
+
pip install customtkinter
|
|
23
|
+
)
|
|
24
|
+
|
|
25
|
+
echo.
|
|
26
|
+
echo Ejecutando aplicacion...
|
|
27
|
+
python src\main.py
|
|
28
|
+
|
|
29
|
+
pause
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
{
|
|
2
|
+
"skill": "moderno",
|
|
3
|
+
"device": "pc",
|
|
4
|
+
"version": "1.0.0",
|
|
5
|
+
"colors": {
|
|
6
|
+
"bg": "#0b1220",
|
|
7
|
+
"surface": "#1a2332",
|
|
8
|
+
"accent": "#00d084",
|
|
9
|
+
"text": "#f0f4f8",
|
|
10
|
+
"muted": "#94a3b8"
|
|
11
|
+
},
|
|
12
|
+
"effects": {
|
|
13
|
+
"glassmorphism": false,
|
|
14
|
+
"rounded": "12px"
|
|
15
|
+
},
|
|
16
|
+
"signature": {
|
|
17
|
+
"mode": "own",
|
|
18
|
+
"text": "G360 Desktop"
|
|
19
|
+
},
|
|
20
|
+
"framework": "customtkinter",
|
|
21
|
+
"portable": true
|
|
22
|
+
}
|