tipsy is command line interface helps you work with the gin framework
English | 简体中文
Tipsy is a command-line tool written in Go for Gin framework projects. Similar to Laravel's artisan, it can initialize a new Gin project and quickly generate various components like entities, repositories, controllers, middlewares, and services.
go install github.com/YianAndCode/tipsy/cmd/tipsy@latestTo create a new Gin project:
tipsy create <project_name>(Note: <project_name> is a required parameter)
This command will generate a well-structured Gin project with the following directory layout:
.
├── cmd
│ └── api
│ └── bootstrap
└── internal
├── config
├── contract
│ ├── constant
│ │ └── errcode
│ ├── datatype
│ └── error
├── controller
│ └── user
├── data
├── entity
├── log
├── middleware
│ └── auth
├── repo
│ └── user
├── router
├── server
└── service
└── user
Tipsy provides several commands to generate different components. The <name> argument is required for all component generation commands.
- Create a new entity:
tipsy new entity <name>- Create a new repo:
tipsy new repo <name>- Create a new controller:
tipsy new controller <name>- Create a new middleware:
tipsy new middleware <name>- Create a new service:
tipsy new service <name>Each command will generate the corresponding Go source files with proper structure and basic implementations.
This project is licensed under the MIT License - see the LICENSE file for details.