Skip to content

razpinator/gmx

Repository files navigation

gmx

A Golang based implementation of genmax. This is a code/file generation tool that feeds data into templates. This can be used for scaffolding projects.

Installation

Package Managers (Recommended):

Homebrew (macOS/Linux):

# Install
brew install razpinator/tap/gmx

# Uninstall
brew uninstall gmx

Scoop (Windows):

# Install
scoop bucket add razpinator https://github.com/razpinator/scoop-bucket
scoop install gmx

# Uninstall
scoop uninstall gmx

APT (Ubuntu/Debian):

# Download and install .deb package from releases
curl -LO https://github.com/razpinator/gmx/releases/latest/download/gmx_linux_amd64.deb
sudo dpkg -i gmx_linux_amd64.deb

# Uninstall
sudo apt remove gmx

RPM (RHEL/CentOS/Fedora):

# Download and install .rpm package from releases
curl -LO https://github.com/razpinator/gmx/releases/latest/download/gmx_linux_amd64.rpm
sudo rpm -i gmx_linux_amd64.rpm

# Uninstall
sudo rpm -e gmx

AUR (Arch Linux):

# Using yay or your preferred AUR helper
yay -S gmx

# Uninstall
yay -R gmx

Quick Install Scripts:

Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/razpinator/gmx/main/install.sh | bash

Windows (PowerShell):

iwr -useb https://raw.githubusercontent.com/razpinator/gmx/main/install.ps1 | iex

Go-based Installer:

For users who prefer a native Go installer:

# Download and run the Go installer
go install github.com/razpinator/gmx/installer@latest
gmx-installer

Or build from source:

git clone https://github.com/razpinator/gmx.git
cd gmx/installer
go build -o gmx-installer .
./gmx-installer

Manual Installation:

If you have Golang installed using below command.

go install github.com/razpinator/gmx@latest

Note: After manual installation, you may need to add $(go env GOPATH)/bin to your PATH.

Alternatively, you can visit the Releases page for platform specific files.

Uninstallation

Package Managers (Easiest):

# Homebrew
brew uninstall gmx

# Scoop (Windows)
scoop uninstall gmx

# APT (Ubuntu/Debian)
sudo apt remove gmx

# RPM (RHEL/CentOS/Fedora) 
sudo rpm -e gmx

# AUR (Arch Linux)
yay -R gmx

Quick Uninstall Scripts:

Linux/macOS:

curl -fsSL https://raw.githubusercontent.com/razpinator/gmx/main/uninstall.sh | bash

Windows (PowerShell):

iwr -useb https://raw.githubusercontent.com/razpinator/gmx/main/uninstall.ps1 | iex

Go-based Uninstaller:

If you have the Go installer available:

# Using the installer binary
installer uninstall

# Or install and run the uninstaller
go install github.com/razpinator/gmx/installer@latest
$(go env GOPATH)/bin/installer uninstall

Manual Uninstallation:

  1. Remove the binary:

    # If installed via go install
    rm $(go env GOPATH)/bin/gmx
    
    # If installed to custom location
    rm /path/to/gmx
  2. Clean Go module cache:

    go clean -modcache github.com/razpinator/gmx
  3. Remove PATH configuration (if added by installer):

    • Linux/macOS: Remove the export line from ~/.bashrc, ~/.zshrc, or your shell config
    • Windows: Remove the Go bin directory from your system PATH

What gets removed:

  • ✅ GMX binary from installation directory
  • ✅ Go module cache entries
  • ✅ PATH configuration added by installer scripts
  • ✅ Automatic backup of shell config files

Commands

Command Description
gmx init Create a new project.
gmx run <workflow-name> Run a workflow and generate your files.

Extensions supported in templates

The following methods are supported in the template:

Description Usage
Pluralize {{ "dog" | pluralize }}
Kebab Case {{ "Hello World" | kebabcase }}
Camel case {{ "Hello World" | camelcase }}
Snake case {{ "Hello World" | snakecase }}
Pascale case {{ "hello world" | pascalecase }}
UUID Generation {{ "" | uuid }}
Generate secret in 16 bit - hexadecimal {{ "" | secret }}
Generate secret in 64 bit - hexadecimal {{ "" | secret_complex }}
Read value from env file {{ "MY_CONFIG_KEY" | config: ".env" }}
Join strings to make a file path. {{ "home" | joinpath: ["documents", "file.txt"] }}
Convert first character to lower case. {{ "Hello World" | lowerfirst }}

About

Golang implementation of the genmax engine.

Resources

License

Stars

Watchers

Forks

Packages

No packages published