Compare commits
2 commits
3ac43ff7a0
...
98bfe2e714
Author | SHA1 | Date | |
---|---|---|---|
98bfe2e714 | |||
12dda7f6b7 |
4 changed files with 140 additions and 37 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -26,6 +26,7 @@ data/*
|
|||
!README.md
|
||||
!CLUADE.md
|
||||
!.gitignore
|
||||
!LICENSE.md
|
||||
|
||||
# Permitir archivos en carpetas específicas
|
||||
# !carpeta1/*.txt
|
||||
|
|
90
CLAUDE.md
90
CLAUDE.md
|
@ -1,39 +1,69 @@
|
|||
# MRDevs Tools Development Guide
|
||||
|
||||
## Build & Installation Commands
|
||||
- `bin/bootstrap.sh` - Install basic tools and container management
|
||||
- `bin/update.sh` - Update development environment
|
||||
- `bin/cortana_install.sh` - Install Claude Code CLI
|
||||
- `bin/cortana_install.sh -u` - Uninstall Claude Code CLI
|
||||
- **`bin/bootstrap.sh`**: Installs basic tools and container management setup.
|
||||
- **`bin/update.sh`**: Updates the development environment.
|
||||
- **`bin/cortana_install.sh`**: Installs the Claude Code CLI.
|
||||
- **`bin/cortana_install.sh -u`**: Uninstalls the Claude Code CLI.
|
||||
|
||||
## Code Style Guidelines
|
||||
- **Shell Scripts**:
|
||||
- Add license header with copyright info (AGPL)
|
||||
- Include Modified date in comments
|
||||
- Use functions for modularity
|
||||
- Follow consistent variable naming (`UPPERCASE` for constants)
|
||||
- Document function purpose with comments
|
||||
- Include usage examples in script headers
|
||||
- Handle errors with proper exit codes
|
||||
- Use version from `bin/config/version` file in script header (#Version line)
|
||||
|
||||
### Shell Scripts
|
||||
- **License Header**: Always include a license header with copyright information (AGPL).
|
||||
- **Commenting**:
|
||||
- Include the **Modified Date** in the comments.
|
||||
- Document the **purpose of each function** and provide **usage examples** in the script header.
|
||||
- **Modularity**:
|
||||
- Use functions to ensure script modularity.
|
||||
- Group related tasks in functions for better readability and maintenance.
|
||||
- **Variable Naming**:
|
||||
- Use **UPPERCASE** for constants and environment variables.
|
||||
- Use **snake_case** for general variables and function names.
|
||||
- **Error Handling**: Ensure that errors are handled properly using **exit codes** and log relevant details.
|
||||
- **Versioning**: Include the script version (from the `bin/config/version` file) in the script header, e.g., `#Version 1.0.0`.
|
||||
|
||||
### Python Scripts
|
||||
- Adhere to Python's PEP-8 coding style.
|
||||
- Include proper **docstrings** for all functions and classes.
|
||||
- Always handle exceptions using `try-except` blocks, and ensure the script exits with appropriate status codes.
|
||||
|
||||
## Development Practices
|
||||
- Use `bin/lib/base.lib` for common functions
|
||||
- Use `bin/lib/developers.lib` for developers functions
|
||||
- Use `bin/lib/clonsole.lib` for dialog functions
|
||||
- Message files stored in `bin/msg/` (multilingual support)
|
||||
- Configuration in `bin/config/` directory
|
||||
- Use git commit messages with prefixes: [ADDED], [IMPROVED], [FIXED], [SOPS], [INIT]
|
||||
- Prefer podman over docker for container management
|
||||
- All shell scripts (.sh) and Python scripts (.py) must be placed in the `bin/` directory unless explicitly specified otherwise
|
||||
|
||||
- **Common Libraries**:
|
||||
- Use `bin/lib/base.lib` for commonly shared functions.
|
||||
- Use `bin/lib/developers.lib` for developer-specific utilities.
|
||||
- Use `bin/lib/clonsole.lib` for dialog-based functions.
|
||||
- **Multilingual Support**:
|
||||
- Store message files in `bin/msg/` to support multiple languages.
|
||||
- **Configuration Files**:
|
||||
- Store configuration settings in the `bin/config/` directory.
|
||||
- **Version Control**:
|
||||
- Use descriptive and consistent **commit message prefixes**:
|
||||
- `[ADDED]` for new features
|
||||
- `[IMPROVED]` for updates or enhancements
|
||||
- `[FIXED]` for bug fixes
|
||||
- `[SOPS]` for secrets management updates
|
||||
- `[INIT]` for initial commits
|
||||
- **Container Management**:
|
||||
- Prefer **Podman** over Docker for container management.
|
||||
- **Directory Structure**:
|
||||
- Place all shell scripts (`.sh`) and Python scripts (`.py`) in the `bin/` directory unless specified otherwise.
|
||||
|
||||
## Authorship Policy
|
||||
- Use `bin/config/python.header` how example to python comment header
|
||||
- Use `bin/config/bash.header` how example to bash comment header
|
||||
- For new projects created by Claude Code, use author: "Cortana Rosero One <cortana@rosero.one>"
|
||||
- Include reference indicating generation by Claude Code and the version used
|
||||
- Example header comment for Cortana:
|
||||
```
|
||||
# [Author] Cortana Rosero One <cortana@rosero.one>
|
||||
# [Generated] Created by Claude Code (claude-3-7-sonnet-20250219)
|
||||
```
|
||||
|
||||
- For Python files, use `bin/config/python.header` as a template for the comment header.
|
||||
- For Bash files, use `bin/config/bash.header` as a template for the comment header.
|
||||
- **Author Information**: For new projects generated by Claude Code, the author should be specified as:
|
||||
- `Cortana Rosero One <cortana@rosero.one>`
|
||||
- **Generation Reference**: Always include a reference to the Claude Code version used for generation.
|
||||
- Example header comment for files generated by Cortana:
|
||||
```bash
|
||||
# [Author] Cortana Rosero One <cortana@rosero.one>
|
||||
# [Generated] Created by Claude Code (claude-3-7-sonnet-20250219)
|
||||
```
|
||||
|
||||
## Additional Notes
|
||||
- Maintain **clarity and consistency** throughout the codebase to ensure that the development process remains smooth and maintainable.
|
||||
- Regularly **sync** with the main repository to ensure up-to-date dependencies and standards are being followed.
|
||||
- Encourage collaboration and **peer review** to improve code quality.
|
||||
|
||||
|
|
33
LICENSE.md
Normal file
33
LICENSE.md
Normal file
|
@ -0,0 +1,33 @@
|
|||
# GNU AFFERO GENERAL PUBLIC LICENSE
|
||||
## Version 3, 19 November 2007
|
||||
|
||||
Copyright © 2007 Free Software Foundation, Inc.
|
||||
<https://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
---
|
||||
|
||||
## Preamble
|
||||
|
||||
The GNU Affero General Public License is a free, copyleft license for software and other kinds of works, specifically designed to ensure cooperation with the community in the case of network server software.
|
||||
|
||||
The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, our General Public Licenses are intended to guarantee your freedom to share and change all versions of a program—to make sure it remains free software for all its users.
|
||||
|
||||
This license, the Affero General Public License, applies to any program or other work that contains a notice placed by the copyright holder stating it may be distributed under the terms of this Affero GPL. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein.
|
||||
|
||||
**[Truncated for brevity]**
|
||||
_For brevity, only the preamble and a note on availability are shown here._
|
||||
|
||||
---
|
||||
|
||||
## Full License Text
|
||||
|
||||
The full text of the GNU AGPL v3 is available from the Free Software Foundation:
|
||||
|
||||
👉 [https://www.gnu.org/licenses/agpl-3.0.txt](https://www.gnu.org/licenses/agpl-3.0.txt)
|
||||
|
||||
You may download and include it in your project as a file named:
|
||||
|
||||
```bash
|
||||
LICENSE
|
53
README.md
53
README.md
|
@ -64,13 +64,20 @@ MRDevs Tools utiliza una estructura organizada que separa el código (en ~/devs)
|
|||
| Comando | Descripción |
|
||||
|---------|-------------|
|
||||
| `bin/bootstrap.sh` | Instala herramientas básicas (incluyendo oathtool, zbar, redis-cli, gum y glow) y configura la gestión de contenedores |
|
||||
| `bin/update.sh` | Actualiza el entorno de desarrollo y herramientas (incluyendo oathtool, zbar, redis-cli y gum) |
|
||||
| `bin/update.sh` | Actualiza el entorno de desarrollo y herramientas (incluyendo oathtool, zbar, redis-cli, gum y glow) |
|
||||
| `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 |
|
||||
|
||||
### Interfaces de Usuario con Gum
|
||||
### Herramientas de CLI Modernas
|
||||
|
||||
MRDevs Tools utiliza [Gum](https://github.com/charmbracelet/gum) para crear interfaces de texto (TUI) elegantes y funcionales:
|
||||
MRDevs Tools integra herramientas modernas de Charm para mejorar la experiencia en la línea de comandos:
|
||||
|
||||
| Herramienta | Descripción |
|
||||
|---------|-------------|
|
||||
| [Gum](https://github.com/charmbracelet/gum) | Toolkit para interfaces TUI elegantes y funcionales |
|
||||
| [Glow](https://github.com/charmbracelet/glow) | Renderizador de Markdown para terminal con soporte para temas y paginación |
|
||||
|
||||
#### Interfaces de Usuario con Gum
|
||||
|
||||
| Comando/Documento | Descripción |
|
||||
|---------|-------------|
|
||||
|
@ -151,13 +158,22 @@ MRDevs Tools utiliza [Gum](https://github.com/charmbracelet/gum) para crear inte
|
|||
|
||||
## 📚 Guía de Usuario
|
||||
|
||||
### Interfaces de Texto con Gum
|
||||
### Herramientas de CLI Modernas
|
||||
|
||||
MRDevs Tools incluye soporte completo para [Gum](https://github.com/charmbracelet/gum), una herramienta que permite crear interfaces de texto (TUI) elegantes:
|
||||
MRDevs Tools incluye soporte completo para herramientas modernas de CLI de [Charm](https://charm.sh/):
|
||||
|
||||
#### Gum - Interfaces de Texto Elegantes
|
||||
|
||||
[Gum](https://github.com/charmbracelet/gum) permite crear interfaces de texto (TUI) elegantes y funcionales:
|
||||
|
||||
```bash
|
||||
# Abrir el tutorial completo sobre Gum
|
||||
xdg-open ~/devs/docs/forms-gum.md
|
||||
|
||||
# Ejemplos rápidos
|
||||
gum style --border normal --margin "1" --padding "1 2" "Texto con estilo"
|
||||
gum input --placeholder "Ingresa tu nombre"
|
||||
gum confirm "¿Deseas continuar?" && echo "Has confirmado" || echo "Has cancelado"
|
||||
```
|
||||
|
||||
El tutorial incluye:
|
||||
|
@ -166,7 +182,22 @@ El tutorial incluye:
|
|||
- Técnicas para estilizar texto y crear layouts complejos
|
||||
- Referencias visuales de cada componente
|
||||
|
||||
Para más detalles, consulta la [documentación completa de Gum](docs/forms-gum.md).
|
||||
#### Glow - Renderizador de Markdown
|
||||
|
||||
[Glow](https://github.com/charmbracelet/glow) es un renderizador de Markdown para la terminal:
|
||||
|
||||
```bash
|
||||
# Visualizar un archivo Markdown
|
||||
glow README.md
|
||||
|
||||
# Visualizar con tema oscuro
|
||||
glow -s dark README.md
|
||||
|
||||
# Modo paginado para documentos largos
|
||||
glow -p LICENSE.md
|
||||
```
|
||||
|
||||
Para más detalles, consulta la [documentación completa de estas herramientas](docs/forms-gum.md).
|
||||
|
||||
### Preparación del Entorno
|
||||
|
||||
|
@ -660,7 +691,15 @@ Para contribuir al proyecto:
|
|||
|
||||
## 📄 Licencia
|
||||
|
||||
Este proyecto está licenciado bajo la Licencia Pública General Affero (AGPL) - vea el archivo LICENSE para más detalles.
|
||||
Este proyecto está licenciado bajo la [GNU Affero General Public License v3.0](LICENSE.md) (AGPL-3.0).
|
||||
|
||||
La licencia AGPL-3.0 garantiza que:
|
||||
- Puedes usar, modificar y distribuir este software libremente
|
||||
- Si modificas el software y lo distribuyes o lo ofreces como un servicio de red, debes publicar el código fuente completo
|
||||
- Cualquier software derivado debe mantener la misma licencia AGPL-3.0
|
||||
- Se preservan los derechos de autor originales
|
||||
|
||||
El texto completo de la licencia está disponible en el archivo [LICENSE.md](LICENSE.md) del repositorio.
|
||||
|
||||
## 👥 Colaboradores
|
||||
|
||||
|
|
Loading…
Reference in a new issue