Gcli is a command line made in golang to help you create crud in your api project more easily. It is also possible to create a new project with the necessary structure to start your api project.
Template | Description | Available |
---|---|---|
gcli-lite-template | A lite template with only the necessary to start a project with database connection and a simple handler. | ❌ |
gcli-basic-template | A basic template with the necessary to start a project with gorm and postgres connection. | ❌ |
gcli-advanced-template | A advanced template with the necessary to start a expansive project with gorm, postgres, jwt, cors, logger, wire and more. | ✅ |
- Clone the repository :
git clone https://github.com/vinirossado/gcli
. - Install GO to run.
- Install Visual Studio Code to edit or use your favorite editor.
- Open your Terminal and run
go mod tidy
in folder to install dependencies. - Run
go run main.go
. - Run
go build main.go
to build the project. - Install the cli with
go install
. - Run
gcli
to see the commands.
- Install Make to run.
- Run
make build linux
to build the project for linux. - Run
make build windows
to build the project for windows. - Run
make build darwin
to build the project for darwin.
gcli
to see the commands.gcli create
Create a new handler/service/repository/model.gcli new
Create a new api project template.gcli version
Show the cli version.gcli upgrade
Upgrade the cli to the latest version.gcli help <command>
Help about any command.gcli wire cmd/server
[wire.go path] Wire is a code generation tool that automates connecting components using dependency injection.
Gopher artwork by Beth Anderson.
- Fork the repository!
- Clone your fork.
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D