Build APIs at Super Saiyan Speed
Goku is a powerful command-line tool designed to supercharge API development in Golang. It eliminates the repetitive tasks of setting up boilerplate code, configuring project structures, and wiring core functionalities. With a single command, Goku creates a production-ready Golang project structure, and with additional commands, you can instantly integrate new features like CRUD modules without manually writing repetitive code.
Whether you're starting a new project or adding components to an existing one, Goku ensures consistency, speeds up development, and allows developers to focus on business logic rather than framework setup. It's the perfect companion for developers who value speed, scalability, and clean project structures.
Integrations:
- Goku comes pre-integrated with powerful tools and frameworks to streamline API development
- Swagger • Automatically generates interactive API documentation, enabling easy testing and client integration.
- Hot Reload • Leveraging AIR for live-reloading during development, ensuring changes are reflected instantly without manual restarts.
- Docker Support • A ready-to-use Dockerfile and docker-compose setup to containerize and deploy your API effortlessly.
- Security Scan • Static code analysis using Gosec to identify potential security vulnerabilities in your applications.
- Testing Framework • Built-in testing utilities and sample test files to ensure robust and reliable APIs from the start.
- Database Connectivity• Accelerate API development with a plug-and-play database solution.
Quick Start:
goku -v
- Outputs the current version of the CLI tool.
goku -h
- Displays a list of all supported CLI commands along with brief descriptions to guide usage.
Step 1: Create a New Project
goku create-project 'PROJECT-NAME'
app/
│── config/
│── controller/
│── models/
│── routes/
│── utils/
│── .env
│── dockerfile
│── go.mod
│── main.go
Step 2: Run and Build
goku -i
- Installs all necessary dependencies.
goku run dev
- Start the service in development mode.
- Includes AIR integration for efficient hot reloading during development.
goku run build
- Compile the application into a single executable file.
- The compiled output is saved in the
./dist
directory. - Use
--scan=false
to skip gosec from scanning your code goku run start
- Start the service in production mode.
- This command runs the previously compiled executable.
Step 3: Feature
goku crud 'NAME'
- Add configurations to support Create, Read, Update, and Delete (CRUD) operations.
- This includes defining routes, implementing controllers, establishing database connectivity, writing unit tests, and integrating Swagger for API documentation.
goku swag
- Ensure that the Swagger documentation is updated to reflect the latest changes in API endpoints and data models.
goku scan
- Run a vulnerability scan with Gosec.
goku test
- Run the pre-configured unit tests to validate the correctness and stability of the application logic.
Deployment With Docker:
goku moby
- A default Dockerfile is included with every project.
- If the Dockerfile is accidentally removed, you can regenerate it by running the above command:
goku m-build
- Build a Docker image of the application using the provided Dockerfile.
goku m-run 'port'
- Run the Docker image with latest tag on your desired port