This guide covers different ways to install and set up Galaplate for your development environment.
Choose one of the following databases:
The easiest way to get started with Galaplate:
curl -sSL https://raw.githubusercontent.com/sheenazien8/galaplate/master/install.sh | bash
This script will:
$GOPATH/bin
Install directly using Go’s package manager:
go install github.com/sheenazien8/galaplate/cmd/galaplate@latest
Make sure your $GOPATH/bin
is in your $PATH
:
# Add to your shell profile (.bashrc, .zshrc, etc.)
export PATH=$PATH:$(go env GOPATH)/bin
# Replace VERSION with the latest version
wget https://github.com/sheenazien8/galaplate/releases/download/v1.0.0/galaplate-linux-amd64.tar.gz
tar -xzf galaplate-linux-amd64.tar.gz
sudo mv galaplate /usr/local/bin/
chmod +x /usr/local/bin/galaplate
For developers who want the latest features:
# Clone the repository
git clone https://github.com/sheenazien8/galaplate.git
cd galaplate
# Build the CLI tool
go build -o galaplate cmd/galaplate/main.go
# Install to your PATH
sudo mv galaplate /usr/local/bin/
Check that Galaplate is installed correctly:
galaplate --version
You should see output similar to:
Galaplate v1.0.0
Install additional tools for the best development experience:
# Install development dependencies using console commands
go run main.go console db:create
This installs:
If you prefer to install tools manually:
# Hot reload tool
go install github.com/cespare/reflex@latest
# Database migration tool (optional - console commands available)
go install github.com/amacneil/dbmate@latest
# Environment CLI (requires Node.js)
npm install -g dotenv-cli
Galaplate now includes a powerful console command system. After installation, you can:
# View all available console commands
go run main.go console list
# Generate new models, DTOs, jobs, etc.
go run main.go console make:model User
go run main.go console make:dto UserDto
go run main.go console make:job ProcessEmail
# Database operations
go run main.go console db:up
go run main.go console db:status
go run main.go console db:fresh
# Install MySQL
brew install mysql
# Start MySQL service
brew services start mysql
# Secure installation (optional but recommended)
mysql_secure_installation
# Update package index
sudo apt update
# Install MySQL
sudo apt install mysql-server
# Start MySQL service
sudo systemctl start mysql
sudo systemctl enable mysql
# Secure installation
sudo mysql_secure_installation
# Install MySQL repository
sudo yum install mysql-server
# Start MySQL service
sudo systemctl start mysqld
sudo systemctl enable mysqld
# Get temporary root password
sudo grep 'temporary password' /var/log/mysqld.log
# Secure installation
mysql_secure_installation
# Install PostgreSQL
brew install postgresql
# Start PostgreSQL service
brew services start postgresql
# Create a database user (optional)
createuser --interactive
# Update package index
sudo apt update
# Install PostgreSQL
sudo apt install postgresql postgresql-contrib
# Start PostgreSQL service
sudo systemctl start postgresql
sudo systemctl enable postgresql
# Switch to postgres user
sudo -u postgres psql
# Install PostgreSQL
sudo yum install postgresql-server postgresql-contrib
# Initialize database
sudo postgresql-setup initdb
# Start PostgreSQL service
sudo systemctl start postgresql
sudo systemctl enable postgresql
Recommended extensions for Go development:
# Install VS Code extensions
code --install-extension golang.go
code --install-extension ms-vscode.vscode-json
code --install-extension bradlc.vscode-tailwindcss
GoLand by JetBrains provides excellent Go support out of the box. No additional setup required.
For Vim users, consider these plugins:
Set up Git hooks for better development workflow:
# In your Galaplate project directory
git config core.hooksPath .githooks
chmod +x .githooks/*
# Check if Go is installed
go version
# If not installed, download from https://golang.org/dl/
# Or use package manager:
# macOS: brew install go
# Ubuntu: sudo apt install golang-go
# Fix permissions for global installation
sudo chown -R $(whoami) $(go env GOPATH)
sudo chown -R $(whoami) $(go env GOROOT)
# Add Go binary path to your shell profile
echo 'export PATH=$PATH:$(go env GOPATH)/bin' >> ~/.bashrc
source ~/.bashrc
# Check if MySQL is running
sudo systemctl status mysql
# Start MySQL if not running
sudo systemctl start mysql
# Check MySQL port
netstat -tlnp | grep :3306
# Check PostgreSQL status
sudo systemctl status postgresql
# Check PostgreSQL port
netstat -tlnp | grep :5432
# Connect to PostgreSQL
sudo -u postgres psql
Speed up dependency downloads:
# Set Go module proxy
export GOPROXY=https://proxy.golang.org,direct
export GOSUMDB=sum.golang.org
Enable Go build cache for faster builds:
# Check build cache location
go env GOCACHE
# Clean build cache if needed
go clean -cache
After successful installation:
If you encounter issues during installation:
Installation complete! 🎉 You’re ready to start building with Galaplate!