Galus is a live reloading tool for Go applications, similar to Air or CompileDaemon. It monitors file changes in your project, automatically recompiles, and restarts the application.
Features
Live Reloading: Automatically detects changes in specified file types (e.g., .go) and recompiles and restarts the application.
Configurable via .galus.toml: Customize watched directories, file extensions, build commands, and runtime arguments using a TOML configuration file.
Colorful CLI Output: Provides clear, color-coded output for better user experience (e.g., green for success, red for errors).
Rich CLI Commands: Supports init to create a default configuration file, version to display the app version, and help for command usage details.
Graceful Shutdown: Uses SIGTERM to safely stop running processes, with a fallback to force termination if needed.
Configuration Validation: Ensures build_cmd and command_args are valid before starting the live reload process.
Cross-Platform: Works on any platform supported by Go, with easy installation via go get.
Installation
Install galus using go get:
go get github.com/aliftech/galus
Install the binary to make galus available globally:
go install github.com/aliftech/galus
Ensure $GOPATH/bin is in your $PATH:
export PATH=$PATH:$(go env GOPATH)/bin
Usage
Initialize a configuration file: In your project directory, run:
galus init
This creates a .galus.toml configuration file with default setting.
Start live reloading: In your project directory, run:
galus
Galus will monitor file changes (e.g., .go files), recompile, and restart your application.
Configuration
The .galus.toml file allows you to customize Galus behavior. Example configuration: