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 tidyin folder to install dependencies. - Run
go run main.go. - Run
go build main.goto build the project. - Install the cli with
go install. - Run
gclito see the commands.
- Install Make to run.
- Run
make build linuxto build the project for linux. - Run
make build windowsto build the project for windows. - Run
make build darwinto build the project for darwin.
gclito see the commands.gcli createCreate a new handler/service/repository/model.gcli newCreate a new api project template.gcli versionShow the cli version.gcli upgradeUpgrade 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