CLI Commands
Complete reference for all RapidGo CLI commands.
RapidGo uses Cobra for its CLI. All commands are run via your application's entry point.
Server
| Command |
Description |
serve |
Start the HTTP server |
serve --mode=web |
Start in a specific service mode |
serve --port=3000 |
Start on a custom port |
go run cmd/main.go serve
go run cmd/main.go serve --mode=api --port=3000
Database
| Command |
Description |
migrate |
Run all pending migrations |
migrate:rollback |
Rollback the last migration batch |
migrate:status |
Show migration status |
db:seed |
Run all seeders |
db:seed --seeder Name |
Run a specific seeder |
go run cmd/main.go migrate
go run cmd/main.go migrate:rollback
go run cmd/main.go migrate:status
go run cmd/main.go db:seed
go run cmd/main.go db:seed --seeder UserSeeder
Code Generation
| Command |
Description |
make:controller Name |
Create a resource controller |
make:model Name |
Create a GORM model |
make:service Name |
Create a service |
make:provider Name |
Create a service provider |
make:migration name |
Create a migration file |
make:admin |
Create an admin user interactively |
go run cmd/main.go make:controller Post
go run cmd/main.go make:model Post
go run cmd/main.go make:service Payment
go run cmd/main.go make:provider Mail
go run cmd/main.go make:migration create_posts_table
go run cmd/main.go make:admin
Background Processing
| Command |
Description |
work |
Start the queue worker |
schedule:run |
Start the task scheduler |
go run cmd/main.go work
go run cmd/main.go schedule:run
Project
| Command |
Description |
new [name] |
Create a new project from the starter template |
version |
Show the framework version |
rapidgo new myapp
rapidgo version