__init__.py 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. """
  2. Modules package for the Boilerplates CLI.
  3. To add a new module:
  4. 1. Create a new Python file: cli/modules/[module_name].py
  5. 2. Create a class inheriting from Module with the import: from ..core.module import Module
  6. 3. Ensure the class properly sets 'files' parameter and implements required methods
  7. 4. Import and register the module in cli/__main__.py
  8. Available modules:
  9. - compose: Manage Docker Compose configurations and services
  10. - ansible: Manage Ansible playbooks and configurations
  11. - docker: Manage Docker configurations and files
  12. - github_actions: Manage GitHub Actions workflows
  13. - gitlab_ci: Manage GitLab CI/CD pipelines
  14. - kestra: Manage Kestra workflows and configurations
  15. - kubernetes: Manage Kubernetes manifests and configurations
  16. - packer: Manage Packer templates and configurations
  17. - terraform: Manage Terraform configurations and modules
  18. - vagrant: Manage Vagrant configurations and files
  19. Example:
  20. # In cli/modules/mymodule.py
  21. from ..core.module import Module
  22. class MyModule(Module):
  23. def __init__(self):
  24. super().__init__(
  25. name="mymodule",
  26. description="My module description",
  27. files=["config.yml", "settings.json"],
  28. vars={"key": "value"} # optional
  29. )
  30. def register(self, app):
  31. return super().register(app)
  32. """