[ADDED] Soporte para gum (Charm TUI toolkit)
- Añadida instalación de gum a bootstrap.sh - Implementada actualización automática de gum en update.sh - Agregada función gum_install en bootstrap.lib - Actualizada documentación en README para reflejar el nuevo componente - Actualizada la estructura de directorios con el nuevo directorio data/ - Actualizada versión a 1.3.1 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
4a372209d9
commit
2d9afccca0
4 changed files with 103 additions and 16 deletions
26
README.md
26
README.md
|
@ -63,8 +63,8 @@ MRDevs Tools utiliza una estructura organizada que separa el código (en ~/devs)
|
||||||
|
|
||||||
| Comando | Descripción |
|
| Comando | Descripción |
|
||||||
|---------|-------------|
|
|---------|-------------|
|
||||||
| `bin/bootstrap.sh` | Instala herramientas básicas (incluyendo oathtool, zbar y redis-cli) y configura la gestión de contenedores |
|
| `bin/bootstrap.sh` | Instala herramientas básicas (incluyendo oathtool, zbar, redis-cli y gum) y configura la gestión de contenedores |
|
||||||
| `bin/update.sh` | Actualiza el entorno de desarrollo y herramientas (incluyendo oathtool, zbar y redis-cli) |
|
| `bin/update.sh` | Actualiza el entorno de desarrollo y herramientas (incluyendo oathtool, zbar, redis-cli y gum) |
|
||||||
| `bin/npm_install.sh` | Instala NodeJS y npm de forma interactiva |
|
| `bin/npm_install.sh` | Instala NodeJS y npm de forma interactiva |
|
||||||
| `bin/project_new.sh` | Crea un nuevo proyecto con estructura estandarizada según el tipo seleccionado |
|
| `bin/project_new.sh` | Crea un nuevo proyecto con estructura estandarizada según el tipo seleccionado |
|
||||||
|
|
||||||
|
@ -548,16 +548,18 @@ MRDevs Tools está diseñado con la seguridad y privacidad en mente:
|
||||||
```
|
```
|
||||||
$HOME/
|
$HOME/
|
||||||
├── devs/ # Directorio principal del proyecto
|
├── devs/ # Directorio principal del proyecto
|
||||||
│ └── bin/ # Scripts ejecutables y herramientas
|
│ ├── bin/ # Scripts ejecutables y herramientas
|
||||||
│ ├── lib/ # Bibliotecas compartidas
|
│ │ ├── lib/ # Bibliotecas compartidas
|
||||||
│ ├── msg/ # Archivos de mensajes multilingües
|
│ │ ├── msg/ # Archivos de mensajes multilingües
|
||||||
│ ├── config/ # Configuraciones y parámetros
|
│ │ ├── config/ # Configuraciones y parámetros
|
||||||
│ │ └── *.gitignore # Plantillas para proyectos
|
│ │ │ └── *.gitignore # Plantillas para proyectos
|
||||||
│ ├── bootstrap.sh # Instalador básico
|
│ │ ├── bootstrap.sh # Instalador básico
|
||||||
│ ├── update.sh # Actualizador de entorno
|
│ │ ├── update.sh # Actualizador de entorno
|
||||||
│ ├── ollama*.sh # Scripts de Ollama
|
│ │ ├── ollama*.sh # Scripts de Ollama
|
||||||
│ ├── claude_voice.py # Asistente de voz para Claude Code
|
│ │ ├── claude_voice.py # Asistente de voz para Claude Code
|
||||||
│ └── ... # Otros scripts
|
│ │ └── ... # Otros scripts
|
||||||
|
│ └── data/ # Datos persistentes (no versionados)
|
||||||
|
│ └── rates/ # Tarifas almacenadas para programadores
|
||||||
│
|
│
|
||||||
├── .sounds/ # Archivos de audio para notificaciones
|
├── .sounds/ # Archivos de audio para notificaciones
|
||||||
├── .ollama/ # Configuración y datos de Ollama (IA)
|
├── .ollama/ # Configuración y datos de Ollama (IA)
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#Company Email : mauro@rosero.one
|
#Company Email : mauro@rosero.one
|
||||||
#Personal Email : mauro.rosero@gmail.com
|
#Personal Email : mauro.rosero@gmail.com
|
||||||
#Created : 2025/03/19 11:57:08
|
#Created : 2025/03/19 11:57:08
|
||||||
#Modified : 2025/03/30 16:30:00
|
#Modified : 2025/04/04 14:00:00
|
||||||
#Version : 1.3.0
|
#Version : 1.3.1
|
||||||
#Use Notes :
|
#Use Notes :
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Derechos de Autor [2025] [Mauro Rosero P. <mauro@rosero.one>]
|
# Derechos de Autor [2025] [Mauro Rosero P. <mauro@rosero.one>]
|
||||||
|
@ -89,6 +89,7 @@ install() {
|
||||||
local OATHTOOL_PACKAGE=oathtool
|
local OATHTOOL_PACKAGE=oathtool
|
||||||
local ZBAR_PACKAGE=zbar
|
local ZBAR_PACKAGE=zbar
|
||||||
local REDIS_CLI_PACKAGE=redis-tools
|
local REDIS_CLI_PACKAGE=redis-tools
|
||||||
|
local GUM_PACKAGE=gum
|
||||||
|
|
||||||
# Load base bash library
|
# Load base bash library
|
||||||
BIN_HOME=$BIN_PATH
|
BIN_HOME=$BIN_PATH
|
||||||
|
@ -231,6 +232,14 @@ install() {
|
||||||
os_pkgs_install $REDIS_CLI_PACKAGE
|
os_pkgs_install $REDIS_CLI_PACKAGE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Install gum if not already installed
|
||||||
|
command_installed gum
|
||||||
|
if [ $? -ne 0 ]
|
||||||
|
then
|
||||||
|
echo "Instalando gum..."
|
||||||
|
gum_install
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# Load messages
|
# Load messages
|
||||||
|
|
|
@ -465,3 +465,51 @@ function zbar_install() {
|
||||||
echo "zbar instalado correctamente."
|
echo "zbar instalado correctamente."
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Install gum package (TUI toolkit)
|
||||||
|
function gum_install() {
|
||||||
|
echo "Instalando gum (toolkit para interfaces TUI)..."
|
||||||
|
|
||||||
|
if [ "$(uname)" == "Darwin" ]; then
|
||||||
|
# En macOS, instalamos a través de Homebrew
|
||||||
|
brew install gum
|
||||||
|
elif [ -f /etc/debian_version ] || [ -f /etc/os-release ]; then
|
||||||
|
# En sistemas Debian y derivados
|
||||||
|
mkdir -p /etc/apt/keyrings
|
||||||
|
curl -fsSL https://repo.charm.sh/apt/gpg.key | gpg --dearmor -o /etc/apt/keyrings/charm.gpg
|
||||||
|
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" > /etc/apt/sources.list.d/charm.list
|
||||||
|
apt update
|
||||||
|
apt install -y gum
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
# En sistemas Red Hat
|
||||||
|
echo '[charm]
|
||||||
|
name=Charm
|
||||||
|
baseurl=https://repo.charm.sh/yum/
|
||||||
|
enabled=1
|
||||||
|
gpgcheck=1
|
||||||
|
gpgkey=https://repo.charm.sh/yum/gpg.key' | tee /etc/yum.repos.d/charm.repo
|
||||||
|
dnf install -y gum
|
||||||
|
elif [ -f /etc/arch-release ]; then
|
||||||
|
# En Arch Linux, instalamos desde AUR
|
||||||
|
command_installed "yay"
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "Instalando yay para acceder a AUR..."
|
||||||
|
pacman -Sy --noconfirm git base-devel
|
||||||
|
git clone https://aur.archlinux.org/yay.git /tmp/yay
|
||||||
|
cd /tmp/yay
|
||||||
|
makepkg -si --noconfirm
|
||||||
|
cd - > /dev/null
|
||||||
|
rm -rf /tmp/yay
|
||||||
|
fi
|
||||||
|
yay -S --noconfirm gum
|
||||||
|
elif [ -f /etc/rc.conf ]; then
|
||||||
|
# En FreeBSD
|
||||||
|
pkg install -y gum
|
||||||
|
else
|
||||||
|
echo "${os_nofound}"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "gum instalado correctamente."
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#Company Email : mauro@rosero.one
|
#Company Email : mauro@rosero.one
|
||||||
#Personal Email : mauro.rosero@gmail.com
|
#Personal Email : mauro.rosero@gmail.com
|
||||||
#Created : 2024/12/09 10:27:00
|
#Created : 2024/12/09 10:27:00
|
||||||
#Modified : 2025/03/30 16:30:00
|
#Modified : 2025/04/04 14:00:00
|
||||||
#Version : 1.3.0
|
#Version : 1.3.1
|
||||||
#Use Notes :
|
#Use Notes :
|
||||||
#==============================================================================
|
#==============================================================================
|
||||||
# Derechos de Autor [2025] [Mauro Rosero P. <mauro@rosero.one>]
|
# Derechos de Autor [2025] [Mauro Rosero P. <mauro@rosero.one>]
|
||||||
|
@ -288,6 +288,34 @@ update_additional_tools() {
|
||||||
fi
|
fi
|
||||||
echo -e "${head_info}: redis-cli actualizado correctamente."
|
echo -e "${head_info}: redis-cli actualizado correctamente."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Actualizar gum si está instalado
|
||||||
|
command_installed gum
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
echo -e "\n${head_info}: Actualizando gum (Charm TUI toolkit)..."
|
||||||
|
if [ -f /etc/debian_version ] || [ -f /etc/os-release ]; then
|
||||||
|
# Para sistemas basados en Debian
|
||||||
|
apt update
|
||||||
|
apt install --only-upgrade -y gum
|
||||||
|
elif [ -f /etc/redhat-release ]; then
|
||||||
|
# Para sistemas basados en Red Hat
|
||||||
|
dnf upgrade -y gum
|
||||||
|
elif [ -f /etc/arch-release ]; then
|
||||||
|
# Para Arch Linux con yay
|
||||||
|
command_installed yay
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
yay -Syu --noconfirm gum
|
||||||
|
else
|
||||||
|
echo -e "${head_error}: yay no está instalado, no se puede actualizar gum"
|
||||||
|
fi
|
||||||
|
elif [ "$(uname)" == "Darwin" ]; then
|
||||||
|
# Para macOS con Homebrew
|
||||||
|
brew upgrade gum
|
||||||
|
else
|
||||||
|
echo -e "${head_error}: Sistema operativo no soportado para actualizar gum"
|
||||||
|
fi
|
||||||
|
echo -e "${head_info}: gum actualizado correctamente."
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Actualizar herramientas adicionales con sudo si están instaladas
|
# Actualizar herramientas adicionales con sudo si están instaladas
|
||||||
|
|
Loading…
Reference in a new issue