Installation
gh-templates
is a Rust-based CLI tool that can be installed through various methods.
Installation Methods
Homebrew (macOS/Linux)
brew install RafaelJohn9/tap/gh-templates
PyPI
pip install gh-templates
npm
npm install -g gh-templates
Cargo
cargo install gh-templates
This will download, compile, and install the latest version of gh-templates
to your Cargo bin directory (usually ~/.cargo/bin
).
Quick Install (directly from github releases)
Install gh-templates
automatically with a single command:
Linux/macOS:
curl -sSL https://raw.githubusercontent.com/RafaelJohn9/gh-templates/main/install/install.sh | bash
Windows (PowerShell):
iwr -useb https://raw.githubusercontent.com/RafaelJohn9/gh-templates/main/install/install.ps1 | iex
✅ The installer automatically:
- Detects your OS and architecture
- Downloads the latest version
- Installs to the appropriate location (
~/.local/bin
on Linux/macOS,~/bin
on Windows) - Makes the binary executable
Note: Ensure your install directory is in your
PATH
. On Linux/macOS, you may need to addexport PATH="$HOME/.local/bin:$PATH"
to your shell profile.
Manual Installation
If you prefer to install manually, download the appropriate binary for your platform from the GitHub Releases page:
Linux (x86_64, glibc) - Most common
wget https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
Linux (x86_64, musl) - Alpine Linux, static builds
wget https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
Linux (x86, 32-bit glibc) - Older systems
wget https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
Linux (x86, 32-bit musl) - Alpine Linux 32-bit
wget https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
Linux (ARM64, glibc) - Raspberry Pi 4, ARM servers
wget https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
Linux (ARM64, musl) - Alpine Linux on ARM64
wget https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
macOS (Apple Silicon) - M1, M2, M3+ Macs
curl -LO https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
macOS (Intel) - Pre-2020 Macs
curl -LO https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates
chmod +x gh-templates
mkdir -p ~/.local/bin
mv gh-templates ~/.local/bin/
Windows (x86_64) - 64-bit Windows
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
Invoke-WebRequest -Uri "https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates.exe" -OutFile "$env:USERPROFILE\bin\gh-templates.exe"
Note: Make sure
$env:USERPROFILE\bin
is in yourPATH
environment variable.
Alternative using curl (if available):
mkdir "%USERPROFILE%\bin"
curl -LO https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates.exe
move gh-templates.exe "%USERPROFILE%\bin\"
Windows (x86, 32-bit) - Older Windows systems
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
Invoke-WebRequest -Uri "https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates.exe" -OutFile "$env:USERPROFILE\bin\gh-templates.exe"
Note: Make sure
$env:USERPROFILE\bin
is in yourPATH
environment variable.
Windows (ARM64) - Surface Pro X, Windows on ARM
New-Item -ItemType Directory -Force -Path "$env:USERPROFILE\bin"
Invoke-WebRequest -Uri "https://github.com/RafaelJohn9/gh-templates/releases/latest/download/gh-templates.exe" -OutFile "$env:USERPROFILE\bin\gh-templates.exe"
Note: Make sure
$env:USERPROFILE\bin
is in yourPATH
environment variable.
Adding to PATH
After installation, you may need to add the binary location to your PATH:
Linux/macOS - Adding ~/.local/bin to PATH
Add this line to your shell configuration file (~/.bashrc
, ~/.zshrc
, etc.):
export PATH="$HOME/.local/bin:$PATH"
Then reload your shell:
source ~/.bashrc # or ~/.zshrc
Windows - Adding to PATH
-
Via System Properties (GUI):
- Press
Win + R
, typesysdm.cpl
, press Enter - Click "Environment Variables"
- Under "User variables", select "Path" and click "Edit"
- Click "New" and add
%USERPROFILE%\bin
- Click OK to save
- Press
-
Via PowerShell (Command):
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
[Environment]::SetEnvironmentVariable("Path", "$userPath;$env:USERPROFILE\bin", "User") -
Restart your terminal for changes to take effect.
Verify Installation
After installation, verify that gh-templates
is working correctly:
gh-templates --version
You should see output similar to:
gh-templates 0.1.0
After installation, verify that gh-templates
is working correctly:
gh-templates --version
You should see output similar to:
gh-templates 0.1.0
Build Information
To see detailed build information about your installation:
gh-templates --build-info
This displays compilation details and other build metadata.
The --force
flag ensures the existing installation is overwritten with the new version.
Next Steps
Now that you have gh-templates
installed, check out the Usage Guide to learn how to use it effectively.