A fast, user-friendly command-line tool for installing GitHub releases with automatic platform detection and version management.
- 🚀 Fast installs: Install latest versions by default
- 🎯 Smart asset selection: Automatically detects your platform and architecture
- 🎨 Beautiful UI: Colored output and interactive menus
- 📦 Package management: List, update, and remove installed packages
- 🔄 Version control: Install specific versions or choose interactively
- ⚡ Simple commands: Intuitive CLI with smart defaults
# Install latest version (fast & simple)
gri cli/cli
# Show interactive version menu
gri cli/cli menu
# Install specific version
gri cli/cli v2.20.0
# List installed packages
gri ls
# Update all packages
gri up
# Remove a package
gri rm cli/cligri/
├── main.go # CLI entry point and command handling
├── go.mod # Go module definition
└── pkg/
├── models/ # Core data structures
│ └── models.go # Config, RepInfo, GitHubRelease, Asset
├── github/ # GitHub API client
│ └── client.go # API interactions
├── installer/ # Core installation logic
│ └── installer.go # ReleaseInstaller and methods
├── ui/ # User interface and display
│ └── ui.go # Colors, menus, tables, usage
└── utils/ # File operations and utilities
└── utils.go # Archive handling, platform detection
The application is structured as a modular Go project with clear separation of concerns:
models: Contains all data structures and typesgithub: Handles GitHub API interactions and rate limitinginstaller: Core business logic for installation, updates, and package managementui: All user interface elements including colors, interactive menus, and formatted outpututils: File operations, archive extraction, and platform-specific logic
- Modularity: Each package has a single responsibility
- Testability: Clear interfaces make unit testing straightforward
- Extensibility: Easy to add new features without touching core logic
- Maintainability: Well-organized code with clear dependencies
gri <owner>/<repo>- Install latest versiongri <owner>/<repo> menu- Show version selection menugri <owner>/<repo> <version>- Install specific version
gri ls- List installed packagesgri ls <owner>/<repo>- Show versions for repositorygri rm <owner>/<repo>- Remove packagegri up- Update all packages
gri set-install-dir <path>- Set the default install directory for binaries (persists in config)
menu,v,versions- Trigger version selection menu
# Build for current platform
go build -o gri .
# Build for multiple platforms
GOOS=linux GOARCH=amd64 go build -o gri-linux .
GOOS=windows GOARCH=amd64 go build -o gri.exe .
GOOS=darwin GOARCH=arm64 go build -o gri-darwin .GRI includes shell completion scripts for enhanced command-line experience:
- Bash: Tab completion for commands, repositories, and version options
- Zsh: Intelligent completion with descriptions and context-aware suggestions
- Fish: Rich completions with descriptions and smart argument handling
The easiest way to install completions is using the built-in command:
# Bash
gri completions bash > ~/.local/share/bash-completion/completions/gri
# Zsh
gri completions zsh > ~/.zsh/completions/_gri
# Fish
gri completions fish > ~/.config/fish/completions/gri.fishAlternative manual installation:
# Bash (add to ~/.bashrc)
source completions/gri.bash
# Zsh (copy to completion directory)
cp completions/_gri /usr/local/share/zsh/site-functions/
# Fish (copy to completions directory)
cp completions/gri.fish ~/.config/fish/completions/See completions/README.md for detailed installation instructions.
GRI stores configuration in ~/.config/gri/config.json and installs binaries to ~/.local/bin by default.
You can change the default install directory for binaries using:
gri set-install-dir /usr/local/binThis updates the persistent config. You can also override the install directory for the current session by setting the GRI_INSTALL_DIR environment variable:
export GRI_INSTALL_DIR=/custom/pathPrecedence:
- If
GRI_INSTALL_DIRis set in the environment, it takes priority over the config value. - Otherwise, the value set via
gri set-install-diris used.
- Linux (amd64, arm64, 386, arm)
- macOS/Darwin (amd64, arm64)
- Windows (amd64, 386)
Automatically detects platform and selects appropriate assets from GitHub releases.