-
Notifications
You must be signed in to change notification settings - Fork 4
Thunder CLI
Kamil Mosciszko edited this page Mar 31, 2025
·
2 revisions
The Thunder CLI is a dedicated command‐line tool designed to work with the Thunder backend framework. It provides developers with a streamlined way to generate code, manage configurations, and interact with various Thunder features directly from the terminal.
A custom CLI tool to automate:
-
Generating gRPC and Prisma files (
thunder generate) -
Deploying Kubernetes resources (
thunder deploy) -
Initializing project (
thunder init) -
Docker (
thunder build) -
Test: (
thunder test)
If you haven't already, navigate to your project directory where generator.go is located.
Make sure you have Go, Minikube, and kubectl installed.
Run the following command:
chmod +x install.sh && ./install.shThis script will:
- Compile
generator.gointo thethunder-generatebinary. - Move
thunder-generateand thethunderCLI script to/usr/local/bin/. - Make them globally accessible.
thunder generate --proto yourfile.protothunder testthunder init projectname
Note replace projectname with actual project name
Before deploying make sure You run that command:
thunder build
Congratulations!, Now You can use deploy!
thunder deployThis command will:
- Start Minikube.
- Apply PostgreSQL deployments and services.
- Apply your app’s Kubernetes deployments and services.
- Restart PgBouncer and your app deployment.
- Forward port
8080to access the application.
-
Go (for building
thunder-generate) - Minikube (for Kubernetes)
- kubectl (to manage Kubernetes resources)
- Prisma Client Go (if using Prisma)
-
Protobuf Compiler (
protoc) (if using gRPC)
- If
thunderis not recognized, make sure/usr/local/bin/is in your$PATH:export PATH=$PATH:/usr/local/bin