cdd-cli 2.0.0 → 2.0.1
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 +197 -31
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,52 +1,218 @@
|
|
|
1
|
-
|
|
1
|
+
## Instrucciones avanzadas
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
### Desarrollo local
|
|
4
|
+
1. Clona el repositorio:
|
|
5
|
+
```bash
|
|
6
|
+
git clone https://github.com/caertos/cdd.git
|
|
7
|
+
cd cdd
|
|
8
|
+
```
|
|
9
|
+
2. Instala dependencias:
|
|
10
|
+
```bash
|
|
11
|
+
npm install
|
|
12
|
+
```
|
|
13
|
+
3. Transpila el código fuente:
|
|
14
|
+
```bash
|
|
15
|
+
npm run build
|
|
16
|
+
```
|
|
17
|
+
4. Ejecuta el CLI localmente:
|
|
18
|
+
```bash
|
|
19
|
+
node dist/index.js
|
|
20
|
+
```
|
|
21
|
+
5. Prueba el comando global localmente:
|
|
22
|
+
```bash
|
|
23
|
+
npm link
|
|
24
|
+
cdd
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
### Testing y troubleshooting
|
|
28
|
+
- Si modificas componentes, recuerda siempre ejecutar `npm run build` antes de probar.
|
|
29
|
+
- Si tienes problemas con permisos de Docker, ejecuta la terminal como administrador o usa `sudo`.
|
|
30
|
+
- Para limpiar la instalación global:
|
|
31
|
+
```bash
|
|
32
|
+
npm uninstall -g cdd-cli
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
### Contribución
|
|
36
|
+
1. Haz un fork del repositorio y crea una rama para tu feature o fix.
|
|
37
|
+
2. Asegúrate de que tu código pase el build y funcione correctamente.
|
|
38
|
+
3. Haz un Pull Request con una descripción clara de tus cambios.
|
|
4
39
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
- Actualización automática del estado de los contenedores cada 2 segundos.
|
|
8
|
-
- Interfaz amigable y colorida usando Ink y React.
|
|
9
|
-
- Información mostrada: nombre, imagen, estado, puertos y estado textual de cada contenedor.
|
|
10
|
-
- Mensaje de ayuda para salir fácilmente (`Press Ctrl+C to exit`).
|
|
40
|
+
---
|
|
41
|
+
## Advanced instructions
|
|
11
42
|
|
|
12
|
-
|
|
13
|
-
1.
|
|
14
|
-
|
|
43
|
+
### Local development
|
|
44
|
+
1. Clone the repository:
|
|
45
|
+
```bash
|
|
46
|
+
git clone https://github.com/caertos/cdd.git
|
|
47
|
+
cd cdd
|
|
48
|
+
```
|
|
49
|
+
2. Install dependencies:
|
|
15
50
|
```bash
|
|
16
51
|
npm install
|
|
17
52
|
```
|
|
18
|
-
3.
|
|
53
|
+
3. Transpile the source code:
|
|
19
54
|
```bash
|
|
20
55
|
npm run build
|
|
21
56
|
```
|
|
22
|
-
4.
|
|
57
|
+
4. Run the CLI locally:
|
|
23
58
|
```bash
|
|
24
59
|
node dist/index.js
|
|
25
60
|
```
|
|
61
|
+
5. Test the global command locally:
|
|
62
|
+
```bash
|
|
63
|
+
npm link
|
|
64
|
+
cdd
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Testing and troubleshooting
|
|
68
|
+
- If you modify components, always run `npm run build` before testing.
|
|
69
|
+
- If you have Docker permission issues, run your terminal as administrator or use `sudo`.
|
|
70
|
+
- To clean up the global install:
|
|
71
|
+
```bash
|
|
72
|
+
npm uninstall -g cdd-cli
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Contributing
|
|
76
|
+
1. Fork the repository and create a branch for your feature or fix.
|
|
77
|
+
2. Make sure your code builds and works correctly.
|
|
78
|
+
3. Open a Pull Request with a clear description of your changes.
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
<p align="center">
|
|
84
|
+
<img src="https://img.shields.io/npm/v/cdd-cli?color=blue&label=npm%20package" alt="npm version"/>
|
|
85
|
+
<img src="https://img.shields.io/npm/dt/cdd-cli?color=green&label=descargas" alt="npm downloads"/>
|
|
86
|
+
</p>
|
|
87
|
+
|
|
88
|
+
# 🐳 CDD-CLI — Docker Dashboard en la Terminal
|
|
89
|
+
[English version below]
|
|
90
|
+
|
|
91
|
+
---
|
|
92
|
+
|
|
93
|
+
## Ejemplo visual
|
|
26
94
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
95
|
+
```text
|
|
96
|
+
╭────────────────────────────────────────────────────────────────────────────╮
|
|
97
|
+
│ 🐳 CDD — CLI Docker Dashboard 2 containers found │
|
|
98
|
+
│ │
|
|
99
|
+
│ mysql-dev mysql:latest 🟢 RUNNING │
|
|
100
|
+
│ CPU: ░░░░░░░░░░ 0.1% MEM: ░░░░░░░░░░ 4.9% │
|
|
101
|
+
│ │
|
|
102
|
+
│ redis-test redis:alpine 🔴 EXITED │
|
|
103
|
+
│ │
|
|
104
|
+
│ Press Ctrl+C to exit │
|
|
105
|
+
│ Crafted by Carlos Cochero • 2025 │
|
|
106
|
+
╰────────────────────────────────────────────────────────────────────────────╯
|
|
107
|
+
```
|
|
108
|
+
# 🐳 CDD-CLI — Docker Dashboard in your Terminal
|
|
37
109
|
|
|
38
|
-
##
|
|
39
|
-
|
|
110
|
+
## Visual example
|
|
111
|
+
|
|
112
|
+
```text
|
|
113
|
+
╭────────────────────────────────────────────────────────────────────────────╮
|
|
114
|
+
│ 🐳 CDD — CLI Docker Dashboard 2 containers found │
|
|
115
|
+
│ │
|
|
116
|
+
│ mysql-dev mysql:latest 🟢 RUNNING │
|
|
117
|
+
│ CPU: ░░░░░░░░░░ 0.1% MEM: ░░░░░░░░░░ 4.9% │
|
|
118
|
+
│ │
|
|
119
|
+
│ redis-test redis:alpine 🔴 EXITED │
|
|
120
|
+
│ │
|
|
121
|
+
│ Press Ctrl+C to exit │
|
|
122
|
+
│ Crafted by Carlos Cochero • 2025 │
|
|
123
|
+
╰────────────────────────────────────────────────────────────────────────────╯
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
[English version below]
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Descripción
|
|
131
|
+
CDD-CLI es una herramienta de línea de comandos (CLI) multiplataforma que te permite monitorear y visualizar en tiempo real el estado de tus contenedores Docker directamente desde la terminal, usando una interfaz moderna y colorida basada en React e Ink.
|
|
132
|
+
|
|
133
|
+
- Visualiza todos los contenedores activos y detenidos.
|
|
134
|
+
- Muestra nombre, imagen, estado, puertos y estadísticas de CPU/MEM.
|
|
135
|
+
- Actualización automática cada 2 segundos.
|
|
136
|
+
- Interfaz amigable, con colores y emojis.
|
|
137
|
+
- Compatible con Linux, macOS y Windows (bash, cmd, PowerShell).
|
|
138
|
+
|
|
139
|
+
## Instalación global
|
|
140
|
+
|
|
141
|
+
1. Asegúrate de tener Node.js (v18+) y Docker instalados y en ejecución.
|
|
142
|
+
2. Instala el CLI globalmente desde npm:
|
|
143
|
+
```bash
|
|
144
|
+
npm install -g cdd-cli
|
|
145
|
+
```
|
|
146
|
+
3. Ejecuta el dashboard desde cualquier terminal:
|
|
147
|
+
```bash
|
|
148
|
+
cdd
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
## Uso
|
|
152
|
+
- Al ejecutar `cdd`, verás una tabla con todos tus contenedores Docker.
|
|
153
|
+
- Los contenedores en ejecución muestran estadísticas de CPU y memoria en tiempo real.
|
|
154
|
+
- Usa `Ctrl+C` para salir.
|
|
155
|
+
|
|
156
|
+
## Funcionalidades principales
|
|
157
|
+
- 🐳 Visualización clara y compacta de todos los contenedores.
|
|
158
|
+
- 🔄 Refresco automático de datos.
|
|
159
|
+
- 📊 Estadísticas de uso de recursos para contenedores activos.
|
|
160
|
+
- 🎨 Interfaz visual con colores y emojis para estados.
|
|
161
|
+
- 👤 Autor: Carlos Cochero (2025)
|
|
40
162
|
|
|
41
163
|
## Requisitos
|
|
42
|
-
- Node.js 18
|
|
164
|
+
- Node.js >= 18
|
|
43
165
|
- Docker instalado y corriendo (el CLI se conecta al socket local de Docker)
|
|
44
166
|
|
|
45
|
-
##
|
|
46
|
-
-
|
|
47
|
-
-
|
|
48
|
-
|
|
167
|
+
## Troubleshooting
|
|
168
|
+
- Si no ves contenedores, asegúrate de que Docker esté corriendo y tu usuario tenga permisos para acceder al socket Docker.
|
|
169
|
+
- Si tienes problemas con la instalación global, prueba con `sudo` (Linux/macOS) o ejecuta la terminal como administrador (Windows).
|
|
170
|
+
|
|
171
|
+
---
|
|
172
|
+
|
|
173
|
+
# 🐳 CDD-CLI — Docker Dashboard in your Terminal
|
|
174
|
+
|
|
175
|
+
## Description
|
|
176
|
+
CDD-CLI is a cross-platform command-line tool (CLI) to monitor and visualize your Docker containers in real time, right from your terminal, using a modern React+Ink interface.
|
|
177
|
+
|
|
178
|
+
- See all running and stopped containers.
|
|
179
|
+
- Shows name, image, state, ports, and CPU/MEM stats.
|
|
180
|
+
- Auto-refresh every 2 seconds.
|
|
181
|
+
- Friendly, colorful, emoji-rich UI.
|
|
182
|
+
- Works on Linux, macOS, and Windows (bash, cmd, PowerShell).
|
|
183
|
+
|
|
184
|
+
## Global installation
|
|
185
|
+
|
|
186
|
+
1. Make sure you have Node.js (v18+) and Docker installed and running.
|
|
187
|
+
2. Install the CLI globally from npm:
|
|
188
|
+
```bash
|
|
189
|
+
npm install -g cdd-cli
|
|
190
|
+
```
|
|
191
|
+
3. Run the dashboard from any terminal:
|
|
192
|
+
```bash
|
|
193
|
+
cdd
|
|
194
|
+
```
|
|
195
|
+
|
|
196
|
+
## Usage
|
|
197
|
+
- When you run `cdd`, you'll see a table with all your Docker containers.
|
|
198
|
+
- Running containers show live CPU and memory stats.
|
|
199
|
+
- Use `Ctrl+C` to exit.
|
|
200
|
+
|
|
201
|
+
## Main features
|
|
202
|
+
- 🐳 Clear, compact visualization of all containers.
|
|
203
|
+
- 🔄 Automatic data refresh.
|
|
204
|
+
- 📊 Live resource usage stats for running containers.
|
|
205
|
+
- 🎨 Visual interface with colors and emojis for states.
|
|
206
|
+
- 👤 Author: Carlos Cochero (2025)
|
|
207
|
+
|
|
208
|
+
## Requirements
|
|
209
|
+
- Node.js >= 18
|
|
210
|
+
- Docker installed and running (CLI connects to local Docker socket)
|
|
211
|
+
|
|
212
|
+
## Troubleshooting
|
|
213
|
+
- If you don't see containers, make sure Docker is running and your user has permission to access the Docker socket.
|
|
214
|
+
- If you have issues with global install, try with `sudo` (Linux/macOS) or run terminal as administrator (Windows).
|
|
49
215
|
|
|
50
216
|
---
|
|
51
217
|
|
|
52
|
-
|
|
218
|
+
¡Disfruta monitoreando tus contenedores Docker desde la terminal con estilo! / Enjoy monitoring your Docker containers from the terminal in style!
|