{"_id":"@alborjefferson/ssh-remote-executor","_rev":"4-96274e54fd5f9275ce46945c2335c6b5","name":"@alborjefferson/ssh-remote-executor","dist-tags":{"latest":"1.2.0"},"versions":{"1.0.0":{"name":"@alborjefferson/ssh-remote-executor","version":"1.0.0","keywords":["ssh","cli","remote","automation","devops","server","terminal","sudo","ubuntu","linux"],"author":{"url":"https://github.com/AlborJefferson28","name":"Jefferson Albor","email":"tu-email@ejemplo.com"},"license":"MIT","_id":"@alborjefferson/ssh-remote-executor@1.0.0","maintainers":[{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"}],"homepage":"https://github.com/AlborJefferson28/ssh-cli#readme","bugs":{"url":"https://github.com/AlborJefferson28/ssh-cli/issues"},"bin":{"ssh-cli":"index.mjs"},"dist":{"shasum":"ef8cdad19e8423289f43be965f979bf33273283d","tarball":"https://registry.npmjs.org/@alborjefferson/ssh-remote-executor/-/ssh-remote-executor-1.0.0.tgz","fileCount":15,"integrity":"sha512-P/Ww1VBrntP5h6AdG+H770uLkcxLh5wymDE9KT7Ok9+OxLo8RfkUJ/UgYg3N1BSGMJxL6nz/s7qW1RlowM3tQw==","signatures":[{"sig":"MEUCIQDBUx3sVYHHj2GAU8eK0Skeya/JMSGK4Zp4gMYLi4LQiAIgY7ea/FQ1cPpFqEMz4btRBle9UUowW4WmfzIro+B/pUM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":93048},"main":"index.mjs","type":"module","engines":{"node":">=16.0.0"},"gitHead":"4e24de8a9b452d8f1b7a66835342753762911cd6","scripts":{"test":"echo \"Error: no test specified\" && exit 1","start":"node index.mjs","postinstall":"node postinstall.mjs","install-global":"./install.sh"},"_npmUser":{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"},"repository":{"url":"git+https://github.com/AlborJefferson28/ssh-cli.git","type":"git"},"_npmVersion":"9.2.0","description":"CLI para gestionar conexiones SSH y ejecutar comandos remotos con detección automática de contraseñas sudo","directories":{},"_nodeVersion":"18.19.1","dependencies":{"ssh2":"^1.17.0","inquirer":"^12.9.6"},"preferGlobal":true,"_hasShrinkwrap":false,"devDependencies":{},"_npmOperationalInternal":{"tmp":"tmp/ssh-remote-executor_1.0.0_1759043564385_0.5145970152164765","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@alborjefferson/ssh-remote-executor","version":"1.1.0","keywords":["ssh","cli","remote","automation","devops","server","terminal","sudo","ubuntu","linux"],"author":{"url":"https://github.com/AlborJefferson28","name":"Jefferson Albor","email":"tu-email@ejemplo.com"},"license":"MIT","_id":"@alborjefferson/ssh-remote-executor@1.1.0","maintainers":[{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"}],"homepage":"https://github.com/AlborJefferson28/ssh-cli#readme","bugs":{"url":"https://github.com/AlborJefferson28/ssh-cli/issues"},"bin":{"ssh-cli":"index.mjs"},"dist":{"shasum":"d8a96765b413a4e0a65dc9a83a08569cb56105bc","tarball":"https://registry.npmjs.org/@alborjefferson/ssh-remote-executor/-/ssh-remote-executor-1.1.0.tgz","fileCount":15,"integrity":"sha512-O3uCOOiqgKeEK7ljU7KdfNTbcU9o+ac/B1jZ12wIRHNX2VjNeas6Unw5kcBksxrdgndiy1TvJCbncM+I4nMJ3A==","signatures":[{"sig":"MEUCIDdkP/4bsUkLo3OOGzNXaPAzIvVhznLUmr3h8U7BKvbdAiEA/b78x+7nvpVmqKmAqKHCklam/386V1CK6k6LBdgksxs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":225219},"main":"index.mjs","type":"module","engines":{"node":">=16.0.0"},"gitHead":"491e6a0740b8961e422cc753d6badd8465efe922","scripts":{"test":"mocha test/**/*.test.js --timeout 10000","start":"node index.mjs","test:ci":"c8 --reporter=lcov --reporter=text-summary mocha test/**/*.test.js --timeout 10000","test:unit":"mocha test/unit/**/*.test.js --timeout 5000","test:debug":"mocha test/**/*.test.js --timeout 0 --inspect-brk","test:watch":"mocha test/**/*.test.js --timeout 10000 --watch","postinstall":"node postinstall.mjs","test:coverage":"c8 --reporter=html --reporter=text mocha test/**/*.test.js --timeout 10000","install-global":"./install.sh","test:integration":"mocha test/integration/**/*.test.js --timeout 15000"},"_npmUser":{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"},"repository":{"url":"git+https://github.com/AlborJefferson28/ssh-cli.git","type":"git"},"_npmVersion":"9.2.0","description":"CLI para gestionar conexiones SSH y ejecutar comandos remotos con detección automática de contraseñas sudo","directories":{},"_nodeVersion":"18.19.1","dependencies":{"ssh2":"^1.17.0","inquirer":"^8.2.6"},"preferGlobal":true,"_hasShrinkwrap":false,"devDependencies":{"c8":"^8.0.1","chai":"^4.3.8","mocha":"^10.2.0","sinon":"^16.0.0","mock-fs":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ssh-remote-executor_1.1.0_1759736979819_0.8978029642502654","host":"s3://npm-registry-packages-npm-production"}},"1.1.1":{"name":"@alborjefferson/ssh-remote-executor","version":"1.1.1","keywords":["ssh","cli","remote","automation","devops","server","terminal","sudo","ubuntu","linux"],"author":{"url":"https://github.com/AlborJefferson28","name":"Jefferson Albor","email":"tu-email@ejemplo.com"},"license":"MIT","_id":"@alborjefferson/ssh-remote-executor@1.1.1","maintainers":[{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"}],"homepage":"https://github.com/AlborJefferson28/ssh-cli#readme","bugs":{"url":"https://github.com/AlborJefferson28/ssh-cli/issues"},"bin":{"ssh-cli":"index.mjs"},"dist":{"shasum":"acbccf130cc2d64f7fb7570e0e279f0096bb2e7e","tarball":"https://registry.npmjs.org/@alborjefferson/ssh-remote-executor/-/ssh-remote-executor-1.1.1.tgz","fileCount":16,"integrity":"sha512-xwwFryCiXEpUwpvENpoJByVWi+Wop0R9lAqeOC2EH0DbHmO8u/FlwmjSLdsscZU+UVp38fbZLuZ+9YloLEiFJA==","signatures":[{"sig":"MEUCICuQNSHeOgMU/oyLCc38xYnLnnaW64eChlY6E7lXADkiAiEAqXoMaYLIxzoH9bOw/bo43tEoX6nSVax+HRkdpWbfTAA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230754},"main":"index.mjs","type":"module","engines":{"node":">=16.0.0"},"gitHead":"d5fd943b06ee723b3e5afa3d876adacfbe33dc2a","scripts":{"test":"mocha test/**/*.test.js --timeout 10000","start":"node index.mjs","test:ci":"c8 --reporter=lcov --reporter=text-summary mocha test/**/*.test.js --timeout 10000","test:unit":"mocha test/unit/**/*.test.js --timeout 5000","test:debug":"mocha test/**/*.test.js --timeout 0 --inspect-brk","test:watch":"mocha test/**/*.test.js --timeout 10000 --watch","postinstall":"node postinstall.mjs","test:coverage":"c8 --reporter=html --reporter=text mocha test/**/*.test.js --timeout 10000","install-global":"./install.sh","test:integration":"mocha test/integration/**/*.test.js --timeout 15000"},"_npmUser":{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"},"repository":{"url":"git+https://github.com/AlborJefferson28/ssh-cli.git","type":"git"},"_npmVersion":"9.2.0","description":"CLI para gestionar conexiones SSH y ejecutar comandos remotos con detección automática de contraseñas sudo","directories":{},"_nodeVersion":"18.19.1","dependencies":{"ssh2":"^1.17.0","inquirer":"^8.2.6"},"preferGlobal":true,"_hasShrinkwrap":false,"devDependencies":{"c8":"^8.0.1","chai":"^4.3.8","mocha":"^10.2.0","sinon":"^16.0.0","mock-fs":"^5.2.0"},"_npmOperationalInternal":{"tmp":"tmp/ssh-remote-executor_1.1.1_1759990817532_0.19997542852365613","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@alborjefferson/ssh-remote-executor","version":"1.2.0","description":"CLI para gestionar conexiones SSH y ejecutar comandos remotos con detección automática de contraseñas sudo","main":"index.mjs","type":"module","bin":{"ssh-cli":"index.mjs"},"scripts":{"start":"node index.mjs","test":"mocha test/**/*.test.js --timeout 10000","test:unit":"mocha test/unit/**/*.test.js --timeout 5000","test:integration":"mocha test/integration/**/*.test.js --timeout 15000","test:watch":"mocha test/**/*.test.js --timeout 10000 --watch","test:coverage":"c8 --reporter=html --reporter=text mocha test/**/*.test.js --timeout 10000","test:debug":"mocha test/**/*.test.js --timeout 0 --inspect-brk","test:ci":"c8 --reporter=lcov --reporter=text-summary mocha test/**/*.test.js --timeout 10000","install-global":"./install.sh","postinstall":"node postinstall.mjs"},"keywords":["ssh","cli","remote","automation","devops","server","terminal","sudo","ubuntu","linux"],"author":{"name":"Jefferson Albor","email":"tu-email@ejemplo.com","url":"https://github.com/AlborJefferson28"},"license":"MIT","homepage":"https://github.com/AlborJefferson28/ssh-cli#readme","repository":{"type":"git","url":"git+https://github.com/AlborJefferson28/ssh-cli.git"},"bugs":{"url":"https://github.com/AlborJefferson28/ssh-cli/issues"},"engines":{"node":">=16.0.0"},"preferGlobal":true,"dependencies":{"inquirer":"^8.2.6","ssh2":"^1.17.0"},"devDependencies":{"mocha":"^10.2.0","chai":"^4.3.8","sinon":"^16.0.0","c8":"^8.0.1","mock-fs":"^5.2.0"},"gitHead":"7a704f652475477433f5f0417d15aef1ea7075e7","_id":"@alborjefferson/ssh-remote-executor@1.2.0","_nodeVersion":"18.19.1","_npmVersion":"9.2.0","dist":{"integrity":"sha512-G/Q0lgtZHnHrgAWwlwoapmeOmaESrTxdEnEfuUwN5/60X9eL2JbgwQjdZWV5Pu9AWGSl8SYmibPJzSAoleWhjg==","shasum":"8b86de7a8cf604a7900a4b2996379ac6c34a2000","tarball":"https://registry.npmjs.org/@alborjefferson/ssh-remote-executor/-/ssh-remote-executor-1.2.0.tgz","fileCount":16,"unpackedSize":284102,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIB45b17dej2I4AvNGv2kTEpx12MivpqKNs5EKMlvnxCMAiEA1TwNcf55SYVHMoK9OuYo68yhYfGWEieqK+9wNlPdfJs="}]},"_npmUser":{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"},"directories":{},"maintainers":[{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/ssh-remote-executor_1.2.0_1760682922593_0.43378863279641644"},"_hasShrinkwrap":false}},"time":{"created":"2025-09-28T07:12:44.265Z","modified":"2025-10-17T06:35:22.949Z","1.0.0":"2025-09-28T07:12:44.603Z","1.1.0":"2025-10-06T07:49:39.994Z","1.1.1":"2025-10-09T06:20:17.729Z","1.2.0":"2025-10-17T06:35:22.773Z"},"bugs":{"url":"https://github.com/AlborJefferson28/ssh-cli/issues"},"author":{"name":"Jefferson Albor","email":"tu-email@ejemplo.com","url":"https://github.com/AlborJefferson28"},"license":"MIT","homepage":"https://github.com/AlborJefferson28/ssh-cli#readme","keywords":["ssh","cli","remote","automation","devops","server","terminal","sudo","ubuntu","linux"],"repository":{"type":"git","url":"git+https://github.com/AlborJefferson28/ssh-cli.git"},"description":"CLI para gestionar conexiones SSH y ejecutar comandos remotos con detección automática de contraseñas sudo","maintainers":[{"name":"alborjefferson","email":"jeffersonalbor28@gmail.com"}],"readme":"# SSH Remote Command Executor\n\n[![npm version](https://badge.fury.io/js/@alborjefferson%2Fssh-remote-executor.svg)](https://www.npmjs.com/package/@alborjefferson/ssh-remote-executor)\n[![Node.js](https://img.shields.io/badge/node.js-%3E%3D16.0.0-green.svg)](https://nodejs.org/)\n[![Ubuntu](https://img.shields.io/badge/ubuntu-tested-orange.svg)](https://ubuntu.com/)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n\nUn potente CLI para gestionar conexiones SSH y ejecutar comandos remotos con detección automática de contraseñas sudo y **modo debug avanzado** para solución de problemas en tiempo real.\n\n```\n╔══════════════════════════════════════════════════════════════╗\n║                                                              ║\n║              _____ _____ _   _     _____  _     _            ║\n║             |   __|   __| |_| |   |  ___|| |   | |           ║\n║             |___  |___  |  _  |   | |___ | |___| |           ║\n║             |_____|_____|_| |_|   |_____||_____|_|           ║\n║                                                              ║\n║             🚀 SSH Remote Command Executor v1.2.0            ║\n║                                                              ║\n╚══════════════════════════════════════════════════════════════╝\n```\n\n## 🌟 Características Principales\n\n- 🔧 **Modo Debug Interactivo**: Depura problemas en tiempo real sin cerrar la conexión SSH\n- 🤖 **Detección Inteligente de Hosts**: Configuración automática para hosts conocidos\n- 🔐 **Detección Automática de Sudo**: Manejo inteligente de contraseñas para comandos sudo\n- 💾 **Gestión de Procesos**: Guarda y reutiliza configuraciones SSH\n- 📊 **Logs Detallados**: Registro completo de todas las ejecuciones\n- 🎨 **Interfaz Intuitiva**: Menús interactivos con navegación visual\n- ⚡ **Ejecución Rápida**: Acceso directo por ID de host y posición\n\n\n## 🚀 Instalación\n\n### Desde npm (Recomendado)\n\n```bash\n# Instalación global\nnpm install -g @alborjefferson/ssh-remote-executor\n\n# ¡Usar inmediatamente!\nssh-cli help\n```\n\n### Desde código fuente\n\n```bash\n# 1. Clonar el repositorio\ngit clone https://github.com/AlborJefferson28/ssh-cli.git\ncd ssh-cli\n\n# 2. Instalar dependencias\nnpm install\n\n# 3. Configurar comandos cortos (recomendado)\n./install.sh\n\n# 4. ¡Usar el CLI!\nssh-cli help\n```\n\n## 💡 Uso Básico\n\n```bash\n# Mostrar ayuda\nssh-cli help\n\n# Crear nuevo proceso SSH (modo interactivo)\nssh-cli start\n\n# Listar procesos guardados por host\nssh-cli list\n\n# Ejecutar proceso específico\nssh-cli start -h 1 -p 2  # Host ID 1, posición 2\n\n# Eliminar proceso\nssh-cli delete -p 2\n```\n\n## 🔧 Modo Debug Avanzado\n\nCuando un comando falla durante la ejecución, el CLI ofrece **modo debug interactivo** con conexión directa:\n\n```\n⚠️  Error detectado en el comando: sudo systemctl restart nginx\n🔧 ¿Cómo deseas proceder?\n  > 🔧 Entrar en modo debug\n    ⏭️  Saltar este comando y continuar\n    🚪 Finalizar proceso\n```\n\n### Experiencia de Conexión Directa\n\nEl modo debug te coloca **directamente en el log completo** con una línea de comandos activa que incluye:\n\n#### ⌨️ Navegación Sencilla\n- **↑ / ↓**: Navega por el historial de comandos (hasta 50 comandos)\n- **Ctrl+Q / Ctrl+X**: Salir del modo debug\n- **Ctrl+L**: Mostrar logs completos\n- **Ctrl+H**: Ayuda contextual\n\n#### 🖥️ Interfaz Profesional\n- **Terminal limpio**: Sin duplicación visual\n- **Formato estructurado**: Salida organizada con marcos ASCII\n- **Historial de comandos**: Navegación rápida por comandos anteriores\n\n```\n📋 HISTORIAL DE COMANDOS:\n════════════════════════════════════════════════════════════════════════════════\n✅ COMANDO 1: cd /var/www/app\n────────────────────────────────────────────────────────\n  /var/www/app\n  └─ Código de salida: 0\n\n✅ COMANDO 2: git pull origin main\n────────────────────────────────────────────────────────\n  Already up to date.\n  └─ Código de salida: 0\n\n❌ COMANDO 3: sudo systemctl restart nginx\n────────────────────────────────────────────────────────\n  Job for nginx.service failed because...\n  └─ Código de salida: 1\n\n💡 Atajos: Ctrl+Q=Salir | Ctrl+X=Finalizar | Ctrl+L=Log | Ctrl+H=Ayuda\n\n🔧 debug@Servidor Web:~$ \n```\n\n### Atajos de Teclado Optimizados\n\n- **Ctrl+Q**: 🔄 Salir del debug (volver al proceso)\n- **Ctrl+X**: 🚪 Finalizar conexión completamente  \n- **Ctrl+L**: � Actualizar y mostrar log completo\n- **Ctrl+H**: 🆘 Mostrar ayuda con comandos útiles\n- **Ctrl+C**: 📋 Mostrar menú de opciones avanzadas\n\n### Flujo de Diagnóstico Rápido\n\n```bash\n# Ejemplo de sesión debug real:\n🔧 debug@Servidor Web:~$ nginx -t\nnginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use)\n\n🔧 debug@Servidor Web:~$ sudo lsof -i :80\napache2   1234 www-data    4u  IPv6  TCP *:http (LISTEN)\n\n🔧 debug@Servidor Web:~$ sudo systemctl stop apache2\n🔧 debug@Servidor Web:~$ sudo systemctl restart nginx\n🔧 debug@Servidor Web:~$ # Ctrl+Q para volver al proceso\n```\n\n## ✨ Características Principales\n\n- 🔧 **Modo Debug Interactivo**: Solución de problemas en tiempo real\n- 🤖 **Detección Inteligente de Hosts**: Pre-llena configuraciones existentes\n- 🔐 **Detección automática de sudo**: Envía contraseñas automáticamente\n- 💾 **Procesos reutilizables**: Guarda configuraciones para uso futuro\n- 📁 **Contexto persistente**: Mantiene directorio de trabajo entre comandos\n- 📊 **Logging detallado**: Registro completo de todas las ejecuciones\n- 🎨 **Interfaz profesional**: Diseño limpio con progress indicators\n\n## 📚 Documentación Completa\n\nVer la [documentación completa](docs/README.md) para:\n- [📦 Guía de instalación detallada](docs/installation.md)\n- [⚡ Configuración de aliases](docs/aliases.md)\n- [🚀 Inicio rápido](docs/quick-start.md)\n- [📋 Referencia de comandos](docs/commands.md)\n- [💡 Ejemplos prácticos](docs/examples.md)\n- [🛠️ Solución de problemas](docs/troubleshooting.md)\n\n## 🎯 Ejemplo Rápido\n\n```bash\n# Conectar a servidor y ejecutar comandos\nssh-cli start\n\n# Configuración interactiva:\n# Host: mi-servidor.com\n# Usuario: deploy\n# Contraseña: ********\n# Comandos: \n#   1. cd /var/www/app\n#   2. git pull origin main\n#   3. sudo systemctl restart nginx\n\n# ¡El CLI maneja todo automáticamente!\n```\n\n## 📋 Requisitos\n\n- **Node.js** >= 16.0.0\n- **Ubuntu Linux** (probado)\n- **Acceso SSH** a servidores remotos\n\n## � Testing\n\nEste proyecto incluye una suite completa de tests unitarios e integración para garantizar la calidad y confiabilidad del código.\n\n### Ejecutar Tests\n\n```bash\n# Instalar dependencias de testing\ncd test && npm install\n\n# Ejecutar todos los tests\nnpm test\n\n# Solo tests unitarios\nnpm run test:unit\n\n# Solo tests de integración  \nnpm run test:integration\n\n# Tests con cobertura\nnpm run test:coverage\n\n# Tests en modo watch\nnpm run test:watch\n\n# Script de conveniencia\n./test/run-tests.sh\n```\n\n### Cobertura de Tests\n\nLa suite de tests cubre:\n- ✅ **Sistema de archivos**: Carga/guardado de procesos\n- ✅ **Gestión de procesos**: CRUD completo con validaciones\n- ✅ **Detección de contraseñas**: Patrones sudo y prompts\n- ✅ **Validaciones**: Todas las validaciones de entrada\n- ✅ **Procesamiento de comandos**: Contexto y ejecución\n- ✅ **Navegación interactiva**: Menús y selección\n- ✅ **Conexiones SSH**: Integración completa\n- ✅ **End-to-end**: Flujos completos del usuario\n\nVer [documentación de tests](test/README.md) para detalles completos.\n\n## �🤝 Contribuir\n\n¡Las contribuciones son bienvenidas! Ver [CONTRIBUTING.md](CONTRIBUTING.md) para detalles.\n\n## 📄 Licencia\n\nEste proyecto está bajo la Licencia MIT\n\n---\n\n⭐ ¡Si te gusta este proyecto, dale una estrella en GitHub!","readmeFilename":"README.md"}