cdd-cli 3.2.2 β 4.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.~lock.ROADMAP.md# +1 -0
- package/CHANGELOG.md +51 -0
- package/README.es.md +198 -0
- package/README.md +81 -23
- package/ROADMAP.md +647 -0
- package/coverage/clover.xml +400 -519
- package/coverage/coverage-final.json +16 -20
- package/coverage/lcov-report/ContainerCreationPrompt.jsx.html +400 -0
- package/coverage/lcov-report/ControlsHUD.jsx.html +256 -0
- package/coverage/lcov-report/components/ContainerCreationPrompt.jsx.html +31 -13
- package/coverage/lcov-report/components/PromptField.jsx.html +4 -4
- package/coverage/lcov-report/components/SuggestionPanel.jsx.html +37 -13
- package/coverage/lcov-report/components/index.html +14 -14
- package/coverage/lcov-report/helpers/constants.js.html +87 -33
- package/coverage/lcov-report/helpers/containerOptionsBuilder.js.html +40 -40
- package/coverage/lcov-report/helpers/dockerHubService.js.html +310 -0
- package/coverage/lcov-report/helpers/dockerService/serviceComponents/containerActions.js.html +1 -1
- package/coverage/lcov-report/helpers/dockerService/serviceComponents/containerList.js.html +1 -1
- package/coverage/lcov-report/helpers/dockerService/serviceComponents/index.html +1 -1
- package/coverage/lcov-report/helpers/imageNameUtils.js.html +18 -18
- package/coverage/lcov-report/helpers/index.html +77 -62
- package/coverage/lcov-report/helpers/logger.js.html +60 -60
- package/coverage/lcov-report/helpers/safeCall.js.html +14 -14
- package/coverage/lcov-report/helpers/validationHelpers.js.html +52 -52
- package/coverage/lcov-report/hooks/creation/index.html +19 -19
- package/coverage/lcov-report/hooks/creation/useContainerActions.js.html +4 -4
- package/coverage/lcov-report/hooks/creation/useContainerCreation.js.html +225 -48
- package/coverage/lcov-report/hooks/creation/useLogsViewer.js.html +5 -5
- package/coverage/lcov-report/hooks/debug/index.html +1 -1
- package/coverage/lcov-report/hooks/debug/useDebugLogs.js.html +7 -7
- package/coverage/lcov-report/hooks/index.html +15 -15
- package/coverage/lcov-report/hooks/navigation/index.html +1 -1
- package/coverage/lcov-report/hooks/navigation/useContainerSelection.js.html +6 -6
- package/coverage/lcov-report/hooks/useContainerCommandRouter.js.html +13 -13
- package/coverage/lcov-report/hooks/useControls.js.html +82 -40
- package/coverage/lcov-report/hooks/useEraseConfirmation.js.html +5 -5
- package/coverage/lcov-report/hooks/useExitHandler.js.html +6 -6
- package/coverage/lcov-report/index.html +38 -68
- package/coverage/lcov.info +742 -981
- package/dist/App.js +7 -1
- package/dist/components/ContainerCreationPrompt.js +26 -10
- package/dist/components/ControlsHUD.js +106 -0
- package/dist/components/SuggestionPanel.js +16 -7
- package/dist/helpers/constants.js +60 -21
- package/dist/helpers/dockerHubService.js +111 -0
- package/dist/helpers/logger.js +1 -1
- package/dist/hooks/creation/useContainerActions.js +22 -5
- package/dist/hooks/creation/useContainerCreation.js +395 -107
- package/dist/hooks/useContainerCommandRouter.js +1 -1
- package/dist/hooks/useControls.js +23 -7
- package/dist/index.js +7 -0
- package/package.json +1 -1
- package/src/App.jsx +6 -0
- package/src/components/ContainerCreationPrompt.jsx +15 -5
- package/src/components/ControlsHUD.jsx +66 -0
- package/src/components/SuggestionPanel.jsx +10 -2
- package/src/helpers/constants.js +38 -20
- package/src/helpers/dockerHubService.js +75 -0
- package/src/helpers/logger.js +1 -2
- package/src/hooks/creation/useContainerActions.js +19 -6
- package/src/hooks/creation/useContainerCreation.js +224 -87
- package/src/hooks/useContainerCommandRouter.js +1 -1
- package/src/hooks/useControls.js +24 -8
- package/src/index.js +4 -0
- package/test/ContainerCreationPrompt.dom.test.js +245 -0
- package/test/ControlsHUD.dom.test.js +125 -0
- package/test/SuggestionPanel.dom.test.js +30 -0
- package/test/constants.test.js +7 -0
- package/test/dockerHubService.test.js +213 -0
- package/test/logger.test.js +58 -0
- package/test/resolveImageTag.test.js +26 -0
- package/test/useContainerCreation.dom.test.js +306 -3
- package/test/useContainerCreationHub.dom.test.js +184 -0
- package/test/useControls.dom.test.js +212 -6
|
@@ -0,0 +1 @@
|
|
|
1
|
+
,caertos,Cocheroc,28.04.2026 21:42,/home/caertos/.local/share/onlyoffice;
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,57 @@ Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
- Nothing yet.
|
|
9
9
|
|
|
10
|
+
## [4.0.0] - 2026-04-28
|
|
11
|
+
|
|
12
|
+
### π Major release β Guided creation wizard
|
|
13
|
+
|
|
14
|
+
This release transforms CDD from a monitoring dashboard into a fully guided container creation experience. The wizard now knows what images need, searches Docker Hub live, and automates the tedious parts.
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- **Interactive creation wizard** (`C` to open):
|
|
18
|
+
- 20 curated image profiles with offline autocomplete (ββ to navigate, Enter to select)
|
|
19
|
+
- `[Tab]` on image field searches Docker Hub live β race-condition safe (AbortController + requestId)
|
|
20
|
+
- `[searching Docker Hub...]` loading indicator in suggestion panel
|
|
21
|
+
- Hub results replace static suggestions; typing reverts to local list instantly
|
|
22
|
+
- `[Tab]` on env vars field inserts next suggested `KEY=VALUE` from the image profile
|
|
23
|
+
- Context-sensitive controls HUD β shows available keys at every step
|
|
24
|
+
- **Smart default tags** β no more `:latest` failures:
|
|
25
|
+
- `postgres:17-alpine`, `redis:7-alpine`, `nginx:1.27-alpine`, `mysql:8.0`, and 16 more
|
|
26
|
+
- `resolveImageTag()` pure helper β preserves explicit user tags, applies profile default otherwise
|
|
27
|
+
- **Required env vars included in suggestions** β `MYSQL_ROOT_PASSWORD`, `POSTGRES_PASSWORD`, `SA_PASSWORD`, etc. are now the first entries Tab inserts, so required fields are never missed
|
|
28
|
+
- **Bilingual README** β English (`README.md`) and Spanish (`README.es.md`)
|
|
29
|
+
|
|
30
|
+
### Fixed
|
|
31
|
+
- Images like `postgres`, `mysql`, `mariadb` no longer fail with 404 due to missing `:latest` tag
|
|
32
|
+
- Required env vars were never suggested by Tab autocomplete β now always appear first
|
|
33
|
+
|
|
34
|
+
## [3.2.5] - 2026-04-27
|
|
35
|
+
|
|
36
|
+
### Added
|
|
37
|
+
- Context-sensitive controls HUD in the creation wizard: shows available keys per step
|
|
38
|
+
- Step 0: `[Tab] Search Hub Β· [ββ] Browse Β· [Enter] Confirm Β· [Esc] Cancel`
|
|
39
|
+
- Step 0 with suggestions: `[ββ] Navigate Β· [Enter] Select Β· [Esc] Cancel`
|
|
40
|
+
- Steps 1β3: `[Enter] Continue Β· [Esc] Cancel`
|
|
41
|
+
- `ControlsHUD` component with pure `getHints(step, hasSuggestions, isSearchingHub)` function
|
|
42
|
+
|
|
43
|
+
## [3.2.4] - 2026-04-27
|
|
44
|
+
|
|
45
|
+
### Fixed
|
|
46
|
+
- Images no longer default to `:latest` β each profile now ships a correct stable tag (e.g. `postgres:17-alpine`, `redis:7-alpine`, `nginx:1.27-alpine`)
|
|
47
|
+
- Selecting an image suggestion or confirming step 0 auto-appends the correct tag when none is typed
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
- `resolveImageTag(imageName)` pure helper β preserves explicit user tags, appends profile default otherwise
|
|
51
|
+
|
|
52
|
+
## [3.2.3] - 2026-04-27
|
|
53
|
+
|
|
54
|
+
### Added
|
|
55
|
+
- Docker Hub live search: pressing Tab on image name field searches Docker Hub in real time
|
|
56
|
+
- `searchDockerHub()` helper with AbortSignal.timeout(5000), race-condition guard (AbortController + requestId)
|
|
57
|
+
- `formatHubResult()` formatter: `nginx [β
official] [1B+ pulls]`
|
|
58
|
+
- `isSearchingHub` loading state with `[searching Docker Hub...]` indicator in SuggestionPanel
|
|
59
|
+
- Hub results replace static suggestions; typing reverts immediately to static list
|
|
60
|
+
|
|
10
61
|
## [3.2.2] - 2026-04-27
|
|
11
62
|
|
|
12
63
|
### Added
|
package/README.es.md
ADDED
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
# CDD β CLI Docker Dashboard
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<img src="https://img.shields.io/npm/v/cdd-cli?color=blue&label=npm%20package" alt="npm version"/>
|
|
5
|
+
<img src="https://img.shields.io/npm/dt/cdd-cli?color=green&label=downloads" alt="npm downloads"/>
|
|
6
|
+
<a href="https://github.com/caertos/cdd/actions/workflows/ci.yml">
|
|
7
|
+
<img src="https://github.com/caertos/cdd/actions/workflows/ci.yml/badge.svg?branch=main" alt="CI status" />
|
|
8
|
+
</a>
|
|
9
|
+
<a href="https://caertos.github.io/cdd/">
|
|
10
|
+
<img src="https://img.shields.io/badge/docs-GitHub%20Pages-blue" alt="Docs" />
|
|
11
|
+
</a>
|
|
12
|
+
<a href="https://deepwiki.com/Caertos/cdd"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
|
|
13
|
+
</p>
|
|
14
|
+
|
|
15
|
+
> **Un dashboard de Docker para la terminal β monitorea, gestiona y crea contenedores sin salir del teclado.**
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## π Novedades en v3.2
|
|
20
|
+
|
|
21
|
+
**v3.2 trae el asistente de creaciΓ³n interactivo β y cambia las reglas del juego.**
|
|
22
|
+
|
|
23
|
+
OlvΓdate de los flags de `docker run`, las variables de entorno olvidadas y los tags `:latest` que fallan en silencio. Presiona `C` y CDD te guΓa para crear un contenedor en segundos:
|
|
24
|
+
|
|
25
|
+
- **20 perfiles de imagen curados** disponibles sin conexiΓ³n β postgres, redis, nginx, node, mysql, mongo y mΓ‘s
|
|
26
|
+
- **Tags por defecto que realmente funcionan**: `postgres:17-alpine`, `redis:7-alpine`, `nginx:1.27-alpine` β sin mΓ‘s fallos silenciosos por `:latest`
|
|
27
|
+
- **BΓΊsqueda en vivo en Docker Hub** con un solo `Tab` β con indicador `[searching Docker Hub...]` para que siempre sepas quΓ© estΓ‘ pasando
|
|
28
|
+
- **Sugerencias contextuales de variables de entorno** β ΒΏcreando un contenedor de Postgres? CDD sugiere `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` automΓ‘ticamente
|
|
29
|
+
- **HUD sensible al contexto** β solo se muestran las teclas que tienen sentido en ese momento, nada mΓ‘s
|
|
30
|
+
|
|
31
|
+
AsΓ deberΓa sentirse la experiencia de desarrollo.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## CaracterΓsticas
|
|
36
|
+
|
|
37
|
+
- π³ Vista en vivo de todos los contenedores Docker con estadΓsticas de CPU/memoria
|
|
38
|
+
- π Auto-refresco cada pocos segundos β siempre actualizado
|
|
39
|
+
- β¨οΈ Acciones controladas por teclado: iniciar, detener, reiniciar, ver logs, eliminar
|
|
40
|
+
- π¨ Estados de contenedor codificados por color y retroalimentaciΓ³n visual
|
|
41
|
+
- β¨ **Asistente de creaciΓ³n interactivo** β configuraciΓ³n paso a paso con perfiles curados y bΓΊsqueda en Hub
|
|
42
|
+
- πͺ΅ Streaming de logs en tiempo real para el contenedor seleccionado
|
|
43
|
+
- π Panel de debug en vivo activable con la tecla `D`
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## InstalaciΓ³n global
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
npm install -g cdd-cli
|
|
51
|
+
cdd
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
---
|
|
55
|
+
|
|
56
|
+
## Inicio rΓ‘pido (local)
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
git clone https://github.com/caertos/cdd.git
|
|
60
|
+
cd cdd
|
|
61
|
+
npm install
|
|
62
|
+
npm run build
|
|
63
|
+
node dist/index.js
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Para usar como comando global durante el desarrollo:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
npm link
|
|
70
|
+
cdd
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
---
|
|
74
|
+
|
|
75
|
+
## Uso
|
|
76
|
+
|
|
77
|
+
Usa `β` / `β` para navegar por los contenedores. Atajos de teclado disponibles:
|
|
78
|
+
|
|
79
|
+
| Tecla | AcciΓ³n |
|
|
80
|
+
|-------|--------|
|
|
81
|
+
| `β` / `β` | Navegar la lista de contenedores |
|
|
82
|
+
| `I` | Iniciar el contenedor seleccionado |
|
|
83
|
+
| `P` | Detener el contenedor seleccionado |
|
|
84
|
+
| `R` | Reiniciar el contenedor seleccionado |
|
|
85
|
+
| `C` | Abrir el asistente de creaciΓ³n |
|
|
86
|
+
| `L` | Ver logs del contenedor seleccionado en tiempo real |
|
|
87
|
+
| `E` | Eliminar el contenedor seleccionado β requiere confirmaciΓ³n |
|
|
88
|
+
| `D` | Activar/desactivar panel de debug en vivo |
|
|
89
|
+
| `Q` | Salir |
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## El Asistente de CreaciΓ³n
|
|
94
|
+
|
|
95
|
+
Presiona `C` desde el dashboard para abrir el asistente. Un **HUD sensible al contexto** en la parte inferior siempre muestra quΓ© teclas estΓ‘n activas en cada paso β sin adivinar.
|
|
96
|
+
|
|
97
|
+
### Paso 0 β Imagen
|
|
98
|
+
|
|
99
|
+
Escribe para filtrar entre **20 perfiles offline curados** (postgres, redis, nginx, node, mysql, mongo, python, golang y mΓ‘s). Los resultados aparecen al instante.
|
|
100
|
+
|
|
101
|
+
Presiona **`Tab`** en cualquier momento para buscar en Docker Hub en vivo. Un indicador `[searching Docker Hub...]` confirma que la bΓΊsqueda estΓ‘ en curso. Usa `β` / `β` para navegar las sugerencias y `Enter` para seleccionar.
|
|
102
|
+
|
|
103
|
+
**Tags inteligentes por defecto:** al seleccionar un perfil de imagen se aplica automΓ‘ticamente un tag conocido y funcional β `postgres:17-alpine`, `redis:7-alpine`, `nginx:1.27-alpine`, etc. Sin mΓ‘s contenedores que fallan en silencio por un `:latest` desactualizado.
|
|
104
|
+
|
|
105
|
+
### Paso 1 β Nombre del contenedor
|
|
106
|
+
|
|
107
|
+
Texto libre. Dale a tu contenedor un nombre memorable.
|
|
108
|
+
|
|
109
|
+
### Paso 2 β Mapeo de puertos
|
|
110
|
+
|
|
111
|
+
Ingresa un mapeo de puertos en formato `HOST:CONTENEDOR`, por ejemplo `8080:80`, `5432:5432`. Deja en blanco para omitir.
|
|
112
|
+
|
|
113
|
+
### Paso 3 β Variables de entorno
|
|
114
|
+
|
|
115
|
+
Ingresa pares `CLAVE=VALOR` de a uno. Las **sugerencias contextuales** muestran variables recomendadas para la imagen seleccionada:
|
|
116
|
+
|
|
117
|
+
| Imagen | Variables sugeridas |
|
|
118
|
+
|--------|---------------------|
|
|
119
|
+
| postgres | `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` |
|
|
120
|
+
| mysql | `MYSQL_ROOT_PASSWORD`, `MYSQL_DATABASE` |
|
|
121
|
+
| redis | *(sin variables requeridas)* |
|
|
122
|
+
| mongo | `MONGO_INITDB_ROOT_USERNAME`, `MONGO_INITDB_ROOT_PASSWORD` |
|
|
123
|
+
| node / nginx / otros | Variables de runtime comunes segΓΊn corresponda |
|
|
124
|
+
|
|
125
|
+
Presiona `Enter` en una lΓnea vacΓa para terminar y crear el contenedor.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
129
|
+
## Requisitos
|
|
130
|
+
|
|
131
|
+
- Node.js >= 18
|
|
132
|
+
- Docker instalado y ejecutΓ‘ndose (CDD se conecta al socket local de Docker)
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Desarrollo
|
|
137
|
+
|
|
138
|
+
```bash
|
|
139
|
+
npm install
|
|
140
|
+
npm run build # compila src/ β dist/
|
|
141
|
+
node dist/index.js # ejecuta desde la salida compilada
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
Vuelve a ejecutar `npm run build` despuΓ©s de cualquier cambio en el cΓ³digo fuente. Usa `npm link` para probar el comando global `cdd` localmente.
|
|
145
|
+
|
|
146
|
+
---
|
|
147
|
+
|
|
148
|
+
## Tests
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
npm test
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Los tests estΓ‘n en `test/` y cubren helpers, servicios y hooks.
|
|
155
|
+
|
|
156
|
+
---
|
|
157
|
+
|
|
158
|
+
## Logging
|
|
159
|
+
|
|
160
|
+
Por defecto CDD muestra mensajes `info`, `warn` y `error`. Para diagnΓ³sticos mΓ‘s detallados:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
CDD_LOG_LEVEL=debug cdd
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Presiona `D` dentro del dashboard para activar el panel de debug en vivo. Presiona `D` nuevamente para ocultarlo.
|
|
167
|
+
|
|
168
|
+
Para capturar los logs en un archivo:
|
|
169
|
+
|
|
170
|
+
```bash
|
|
171
|
+
CDD_LOG_LEVEL=debug cdd > cdd-debug.log 2>&1
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
---
|
|
175
|
+
|
|
176
|
+
## SoluciΓ³n de problemas
|
|
177
|
+
|
|
178
|
+
- **ΒΏNo ves contenedores?** AsegΓΊrate de que Docker estΓ© ejecutΓ‘ndose y de que tu usuario tenga acceso al socket de Docker.
|
|
179
|
+
- **ΒΏErrores de permisos en Linux/macOS?** Prueba con `sudo cdd` o agrega tu usuario al grupo `docker`.
|
|
180
|
+
- **ΒΏWindows?** Ejecuta la terminal como Administrador.
|
|
181
|
+
- **ΒΏFalta el directorio `dist/`?** Ejecuta `npm run build` β estΓ‘ en `.gitignore` y no se incluye en el repositorio.
|
|
182
|
+
- **ΒΏLa bΓΊsqueda del asistente no funciona?** Verifica tu conexiΓ³n a internet. Los perfiles offline siempre funcionan sin acceso a la red.
|
|
183
|
+
|
|
184
|
+
---
|
|
185
|
+
|
|
186
|
+
## Contribuciones
|
|
187
|
+
|
|
188
|
+
Consulta [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
189
|
+
|
|
190
|
+
---
|
|
191
|
+
|
|
192
|
+
## Licencia
|
|
193
|
+
|
|
194
|
+
MIT/ISC β ver [`LICENSE`](LICENSE).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
π¬π§ [Read in English](README.md)
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
# CDD β CLI Docker Dashboard
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
4
|
<img src="https://img.shields.io/npm/v/cdd-cli?color=blue&label=npm%20package" alt="npm version"/>
|
|
@@ -12,18 +12,35 @@
|
|
|
12
12
|
<a href="https://deepwiki.com/Caertos/cdd"><img src="https://deepwiki.com/badge.svg" alt="Ask DeepWiki"></a>
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
|
-
A terminal dashboard for
|
|
15
|
+
> **A terminal dashboard for Docker containers β monitor, manage, and create, all without leaving your keyboard.**
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## π What's new in v3.2
|
|
20
|
+
|
|
21
|
+
**v3.2 ships the interactive creation wizard β and it's a game changer.**
|
|
22
|
+
|
|
23
|
+
Forget `docker run` flags, forgotten env vars, and broken `:latest` tags. Press `C` and CDD guides you through creating a container in seconds:
|
|
24
|
+
|
|
25
|
+
- **20 curated image profiles** available offline β postgres, redis, nginx, node, mysql, mongo, and more
|
|
26
|
+
- **Smart default tags** that actually work: `postgres:17-alpine`, `redis:7-alpine`, `nginx:1.27-alpine` β no more silent `:latest` failures
|
|
27
|
+
- **Live Docker Hub search** with a single `Tab` keystroke β with a `[searching Docker Hub...]` indicator so you always know what's happening
|
|
28
|
+
- **Contextual env var hints** β creating a Postgres container? CDD suggests `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` automatically
|
|
29
|
+
- **Context-sensitive HUD** β only the keys that make sense right now are shown, nothing more
|
|
30
|
+
|
|
31
|
+
This is what developer experience should feel like.
|
|
16
32
|
|
|
17
33
|
---
|
|
18
34
|
|
|
19
35
|
## Features
|
|
20
36
|
|
|
21
|
-
- π³
|
|
22
|
-
- π Auto-refresh every few seconds
|
|
23
|
-
- β¨οΈ Keyboard
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
37
|
+
- π³ Live view of all Docker containers with CPU/memory stats
|
|
38
|
+
- π Auto-refresh every few seconds β always up to date
|
|
39
|
+
- β¨οΈ Keyboard-driven actions: start, stop, restart, log streaming, removal
|
|
40
|
+
- π¨ Color-coded container states and visual feedback
|
|
41
|
+
- β¨ **Interactive creation wizard** β step-by-step container setup with curated profiles and live Hub search
|
|
42
|
+
- πͺ΅ Real-time log streaming for any selected container
|
|
43
|
+
- π Toggleable live debug panel (`D` key)
|
|
27
44
|
|
|
28
45
|
---
|
|
29
46
|
|
|
@@ -46,7 +63,7 @@ npm run build
|
|
|
46
63
|
node dist/index.js
|
|
47
64
|
```
|
|
48
65
|
|
|
49
|
-
To use
|
|
66
|
+
To use as a global command during development:
|
|
50
67
|
|
|
51
68
|
```bash
|
|
52
69
|
npm link
|
|
@@ -57,25 +74,62 @@ cdd
|
|
|
57
74
|
|
|
58
75
|
## Usage
|
|
59
76
|
|
|
60
|
-
Use
|
|
77
|
+
Use `β` / `β` to navigate containers. Available keyboard shortcuts:
|
|
61
78
|
|
|
62
79
|
| Key | Action |
|
|
63
80
|
|-----|--------|
|
|
81
|
+
| `β` / `β` | Navigate container list |
|
|
64
82
|
| `I` | Start selected container |
|
|
65
83
|
| `P` | Stop selected container |
|
|
66
84
|
| `R` | Restart selected container |
|
|
67
|
-
| `C` |
|
|
68
|
-
| `L` |
|
|
85
|
+
| `C` | Open creation wizard |
|
|
86
|
+
| `L` | Stream logs for selected container |
|
|
69
87
|
| `E` | Erase (remove) selected container β confirmation required |
|
|
70
|
-
| `D` | Toggle live debug
|
|
88
|
+
| `D` | Toggle live debug panel |
|
|
71
89
|
| `Q` | Quit |
|
|
72
90
|
|
|
73
91
|
---
|
|
74
92
|
|
|
93
|
+
## The Creation Wizard
|
|
94
|
+
|
|
95
|
+
Press `C` from the dashboard to launch the wizard. A **context-sensitive HUD** at the bottom always shows which keys are active at each step β no guessing required.
|
|
96
|
+
|
|
97
|
+
### Step 0 β Image
|
|
98
|
+
|
|
99
|
+
Type to filter through **20 curated offline profiles** (postgres, redis, nginx, node, mysql, mongo, python, golang, and more). Results appear instantly.
|
|
100
|
+
|
|
101
|
+
Press **`Tab`** at any time to search Docker Hub live. A `[searching Docker Hub...]` indicator confirms the search is running. Use `β` / `β` to navigate suggestions, `Enter` to select.
|
|
102
|
+
|
|
103
|
+
**Smart default tags:** selecting an image profile automatically applies a known-good tag β `postgres:17-alpine`, `redis:7-alpine`, `nginx:1.27-alpine`, etc. No more containers that fail silently because of a stale `:latest`.
|
|
104
|
+
|
|
105
|
+
### Step 1 β Container name
|
|
106
|
+
|
|
107
|
+
Free-text input. Give your container a memorable name.
|
|
108
|
+
|
|
109
|
+
### Step 2 β Port mapping
|
|
110
|
+
|
|
111
|
+
Enter a port mapping in `HOST:CONTAINER` format, e.g. `8080:80`, `5432:5432`. Leave blank to skip.
|
|
112
|
+
|
|
113
|
+
### Step 3 β Environment variables
|
|
114
|
+
|
|
115
|
+
Enter `KEY=VALUE` pairs one at a time. **Contextual hints** show recommended variables for the selected image:
|
|
116
|
+
|
|
117
|
+
| Image | Suggested vars |
|
|
118
|
+
|-------|---------------|
|
|
119
|
+
| postgres | `POSTGRES_USER`, `POSTGRES_PASSWORD`, `POSTGRES_DB` |
|
|
120
|
+
| mysql | `MYSQL_ROOT_PASSWORD`, `MYSQL_DATABASE` |
|
|
121
|
+
| redis | *(no required vars)* |
|
|
122
|
+
| mongo | `MONGO_INITDB_ROOT_USERNAME`, `MONGO_INITDB_ROOT_PASSWORD` |
|
|
123
|
+
| node / nginx / others | Common runtime vars as applicable |
|
|
124
|
+
|
|
125
|
+
Press `Enter` on an empty line to finish and create the container.
|
|
126
|
+
|
|
127
|
+
---
|
|
128
|
+
|
|
75
129
|
## Requirements
|
|
76
130
|
|
|
77
131
|
- Node.js >= 18
|
|
78
|
-
- Docker installed and running (
|
|
132
|
+
- Docker installed and running (CDD connects to the local Docker socket)
|
|
79
133
|
|
|
80
134
|
---
|
|
81
135
|
|
|
@@ -87,7 +141,7 @@ npm run build # compile src/ β dist/
|
|
|
87
141
|
node dist/index.js # run from compiled output
|
|
88
142
|
```
|
|
89
143
|
|
|
90
|
-
Re-run `npm run build` after any source changes.
|
|
144
|
+
Re-run `npm run build` after any source changes. Use `npm link` to test the global `cdd` command locally.
|
|
91
145
|
|
|
92
146
|
---
|
|
93
147
|
|
|
@@ -97,21 +151,19 @@ Re-run `npm run build` after any source changes.
|
|
|
97
151
|
npm test
|
|
98
152
|
```
|
|
99
153
|
|
|
100
|
-
Tests
|
|
154
|
+
Tests live in `test/` and cover helpers, services, and hooks.
|
|
101
155
|
|
|
102
156
|
---
|
|
103
157
|
|
|
104
158
|
## Logging
|
|
105
159
|
|
|
106
|
-
By default
|
|
160
|
+
By default CDD shows `info`, `warn`, and `error` messages. For deeper diagnostics:
|
|
107
161
|
|
|
108
162
|
```bash
|
|
109
163
|
CDD_LOG_LEVEL=debug cdd
|
|
110
|
-
# or
|
|
111
|
-
CDD_LOG_LEVEL=debug node dist/index.js
|
|
112
164
|
```
|
|
113
165
|
|
|
114
|
-
Press `D` inside the
|
|
166
|
+
Press `D` inside the dashboard to toggle the live debug panel in real time. Press `D` again to hide it.
|
|
115
167
|
|
|
116
168
|
To capture logs to a file:
|
|
117
169
|
|
|
@@ -123,9 +175,11 @@ CDD_LOG_LEVEL=debug cdd > cdd-debug.log 2>&1
|
|
|
123
175
|
|
|
124
176
|
## Troubleshooting
|
|
125
177
|
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
178
|
+
- **No containers visible?** Make sure Docker is running and your user has access to the Docker socket.
|
|
179
|
+
- **Permission errors on Linux/macOS?** Try `sudo cdd` or add your user to the `docker` group.
|
|
180
|
+
- **Windows?** Run your terminal as Administrator.
|
|
181
|
+
- **`dist/` missing?** Run `npm run build` β it's in `.gitignore` and not committed.
|
|
182
|
+
- **Wizard search not working?** Check your internet connection. Offline profiles always work without network access.
|
|
129
183
|
|
|
130
184
|
---
|
|
131
185
|
|
|
@@ -138,3 +192,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
|
138
192
|
## License
|
|
139
193
|
|
|
140
194
|
MIT/ISC β see [`LICENSE`](LICENSE).
|
|
195
|
+
|
|
196
|
+
---
|
|
197
|
+
|
|
198
|
+
πͺπΈ [Ver en EspaΓ±ol](README.es.md)
|