A CLI tool for quickly scaffolding Docker and GitLab CI configurations for your projects.
Hermes is a command-line interface tool that helps developers quickly generate essential DevOps configuration files. It provides templates for:
- Dockerfiles - Pre-configured for NestJS, NestJS Microservices, and NextJS projects
- Docker Compose files - Base, development, and production configurations
- GitLab CI/CD - Ready-to-use CI/CD pipelines for both monolith and microservices architectures
- Interactive CLI interface with easy-to-use prompts
- Works from any directory - templates are bundled with the tool
- Support for both monolith and microservices architectures
- Automatic file merging for GitLab CI configurations (monolith mode)
- Helpful guidance for microservices setup
- Node.js (v14 or higher)
- For GitLab CI monolith setup: yq (YAML processor)
# Clone the repository
git clone git@github.com:frfhrts/hermes.git
cd hermes
chmod +x install.sh
./install.sh
Simply run hermes from any directory:
hermesThe CLI will guide you through an interactive menu:
- Dockerfile
- Docker Compose
- GitLab CI
For Dockerfiles:
- NestJS
- NestJS Microservices
- NextJS
For Docker Compose:
- base
- dev
- prod
For GitLab CI:
- Monolith: Automatically merges root and service configurations into a single
.gitlab-ci.yml - Microservices: Choose between:
- Root GitLab CI (for project root)
- Service GitLab CI (for individual microservices)
$ hermes
# Select: 1 (Dockerfile)
# Choose: 1 (NestJS)
# � Dockerfile created in current directory# In your project root
$ hermes
# Select: 3 (GitLab CI)
# Choose: 2 (Microservices)
# Choose: 1 (root)
# � Root .gitlab-ci.yml created
# Then in each microservice directory
$ cd services/api
$ hermes
# Select: 3 (GitLab CI)
# Choose: 2 (Microservices)
# Choose: 2 (service)
# � Service .gitlab-ci.yml createdFor monolith GitLab CI setup, Hermes uses yq to merge configuration files. Install it:
macOS:
brew install yqLinux:
snap install yqOR
sudo wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
sudo chmod +x /usr/local/bin/yqOther platforms: See yq installation guide
chmod +x uninstall.sh
./uninstall.shContributions are welcome! Here's how you can help:
- Fork the repository
- Clone your fork:
git clone git@github.com:YOUR_USERNAME/hermes.git cd hermes - Install dependencies:
npm install
- Make your changes
- Build and test:
npm run build npm link # Test locally hermes # Run the tool
-
Add your template file to the appropriate directory:
templates/dockerfiles/for Dockerfilestemplates/docker-compose-files/for Docker Compose filestemplates/gitlab/for GitLab CI files
-
Update the corresponding array in
src/main.ts:dockerfileListfor DockerfilesdockerComposeListfor Docker Compose filesgitlabOptionsListfor GitLab CI files
-
Test your changes locally
- Create a new branch:
git checkout -b feature/your-feature-name
- Commit your changes:
git add . git commit -m "Add your descriptive commit message"
- Push to your fork:
git push origin feature/your-feature-name
- Open a Pull Request on GitHub
- Use TypeScript
- Follow existing code patterns
- Add comments for complex logic
- Test your changes before submitting
This project is licensed under the MIT License - see the LICENSE file for details.
https://github.com/frfhrts/hermes
Found a bug or have a feature request? Please open an issue on GitHub.