Template generation tools
CLI Tool for generating different project modules for templating complex systems
with ease. Dockerized version also provides set of tools for code generation and
linting.
Options:
Options you can specify under 'gen' command:
- drone - includes drone.yml template for project CI-CD
- mit - adds MIT license to project
- gpl - adds GPLv3 license to project
- make - adds Makefile to project
- pkgbuild - arch format PKGBUILD for packaging to AUR
- lego - generates templates of commands for lego, to simplify process of obtaining certificates
Compose file options:
- compose-nginx - adds nginx to your compose file, and generates template of config in directory (reuses certificates generated by lego)
- compose-postgres - adds postgres to compose file, and goose tool for migrations aswell
- compose-redis - adds redis to compose
- compose-nats - adds single nats node to compose, and nats-ui for visualization
- compose-gitea - adds gitea with some predefined parameters and configuartion files, additional themes, description, logo
- compose-drone - adds drone server and runner to compose, with predifined parameters to connect to gitea
- compose-pacman - adds self-hosted pacman repository for arch packages
- compose-pocketbase - adds pocketbase template to compose (self-hosted real-time backend)
- compose-mkdocs - adds mkdocs with theme, custom css and some preconfigured stuff
- compose-kuma - adds kuma, for tracking and visualizing services stability
- compose-dozzle - adds dozzle, for for viewing services logs
Go code options:
- go-cli - includes cobra and viper
- go-lint - includes golanglint-ci linter for go code
- go-grpc - includes proto and buf files for generation
- go-docker - includes 2 stage Dockerfile and compose for ease of development
- go-pg - includes pgx module in porstgres, sqlc for generation and goose for migrations
- go-redis - includes redis template
- go-nats - includes consumer and producer nats template
Installation:
docker pull dancheg97.ru/templates/gen-tools:latest
go install dancheg97.ru/templates/gen-tools@latest
yay -Sy gen-tools
Examples:
gen-tools gen drone gpl
gen-tools go --repo myrepo.com/me/tool
gen-tools infr --name Nice --domain nice.org --user admin --pass SeCReT --email he@he.org
gen-tools infr --name Nice --domain nice.org --user admin --pass SeCReT --email he@he.org
- gen-tools - tool for generating go project templates
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest gen-tools --help
- gofumpt - tool for formatting go code
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest gofumpt --help
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest golanglint-ci --help
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest buf --help
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest sqlc --help
- go-swag - tool for generating
swagger.yaml
from code annotations.
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest swag --help
- go-lego - tool for obtaining sertificates from ACME.
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest lego --help
- go-lego - tool for migrating database (eg postgres).
docker run --rm -it -v $(pwd):/wd -w /wd dancheg97.ru/templates/gen-tools:latest goose --help