Griffin is a powerful command-line tool designed to streamline the development of Go web applications. Inspired by the mythical Griffin—a creature of strength and agility—this tool empowers developers to quickly generate CRUD (Create, Read, Update, Delete) applications with minimal effort.
Griffin integrates seamlessly with the Echo web framework and GORM ORM, providing a robust foundation for building scalable and maintainable web applications.
-
Project Scaffolding: Quickly bootstrap a new project with a single command.
-
CRUD Generation: Generate models, handlers, repositories, and routes for any resource.
-
Database Migrations: Automate database setup and configuration using Goose.
-
RESTful APIs: Scaffold RESTful APIs with JSON responses.
-
Best Practices: Follow best practices for Go web development.
To install Griffin, ensure you have Go installed on your system, then run:
go install github.com/MhmoudGit/griffin/cmd/griffin@latestGriffin provides a set of commands to help you manage your Go web application:
griffin new my_projectThis command will create a new project directory with the necessary structure to get started.
Make sure to create a postgres database with the same name as the new project's name, or change the config.yaml after project generation
griffin gen posts title:string body:stringThis command will generate CRUD code for a posts resource, including a model, handler, repository, and routes.
griffin migrateThis command will run database migrations using Goose.
griffin server
This command will start the development server.
- Inspired by the Elixir Phoenix CLI tools.
- Built with Cobra, Echo, and GORM.
Griffin: The ultimate tool for Go developers who want to focus on building great applications without getting bogged down by boilerplate code. Let Griffin handle the heavy lifting while you soar to new heights in your development journey.