π₯οΈ Velora CLI
Velora provides a command line interface (CLI) to quickly scaffold projects and modules. The CLI helps you bootstrap a new application or generate new resources without writing boilerplate code manually.
π¦ Installation
go install github.com/aryan-salemababdi/Velora@latestAfter installing, verify with:
velora --helpβ οΈ Ensure your Go bin path is in $PATH:
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.zshrc source ~/.zshrc
(Add it permanently in ~/.zshrc or ~/.bashrc)
π Create a New App
Use the new command to scaffold a new Velora application:
velora new myappThis creates a new directory myapp with:
main.goβ application entrypointapp/β default module with service, controller, and DTO__tests__/β basic tests for service and controller
π§© Generate a Module
Use the g module command to scaffold a new module:
velora g module userThis generates:
user.service.gouser.controller.gouser.module.godto/user.dto.go__tests__/user.*_test.go
π Example
Example service generated by velora g module user:
package user
type Service struct{}
func NewService() *Service { return &Service{} }
func (s *Service) FindAll() []string {
return []string{"example"}
}π§ Troubleshooting
- If
veloracommand is not found β check your$PATH. - If
go installfails β ensure Go version >= 1.21 is installed. - If modules donβt register β verify you added them in
main.go.
π Summary
velora new [name]β creates a new Velora appvelora g module [name]β generates a module scaffold- Each module includes service, controller, module, DTO, and tests
Next: learn how to configure middlewares and modules in your Velora app.