Skip to content

Rishang/install-release

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Install Release

Python Version Downloads

Install Release is a CLI tool by name ir to install any single-binary executable package for your device(Linux/MacOS/WSL) directly from their GitHub or GitLab releases and keep them updated. Consider it as a CLI to install, update and remove any single binary tools from GitHub/GitLab releases.

This can be any tool you want to install, which is pre-compiled for your device and present on GitHub or GitLab releases.

INFO: It's mainly for installing tools that are not directly available officially by package managers like apt, yum, pacman, brew etc.

How it works

Table of Contents πŸ“š

Example: Installing deno (Rust-based JavaScript runtime) directly from its GitHub releases:

# Usage: ir get [GITHUB-URL or GITLAB-URL]
❯ ir get https://github.com/denoland/deno

Verify the installation:

❯ which deno
~/bin/deno

❯ deno --version
deno 1.46.3 ...

Example: Installing GitLab CLI with a custom binary name glab:

❯ ir get https://gitlab.com/gitlab-org/cli -n glab

Verify the installation:

❯ which glab
~/bin/glab

❯ glab --version
glab 1.80.0 ...

Manage your tools

Once installed, you can manage your tools with these simple commands:

  • List: ir ls β€” See all installed tools and versions.
  • Update: ir upgrade β€” Upgrade all installed tools to their latest releases.
  • Remove: ir rm deno β€” Remove a tool from your system.

For more details, check the Table of Contents.

Prerequisites πŸ“‹

  • python3.8 or higher
  • libmagic
  • Default installation path: ~/bin/ (Ensure this is in your PATH)
# Add this to your ~/.bashrc or ~/.zshrc
export PATH=$HOME/bin:$PATH

Updating install-release πŸ”„

For seeing version:

ir me --version

For updating:

ir me --upgrade

Example usage ir --help πŸ’‘

# Help page

❯ ir --help
Usage: ir [OPTIONS] COMMAND [ARGS]...

  GitHub / GitLab release installer based on your system (Linux/MacOS)

  Commands:
    get      | Install GitHub/GitLab repository CLI tool from its releases
    ls       | List all installed CLI tools
    rm       | Remove any installed CLI tool
    upgrade  | Upgrade all installed CLI tools from their repositories
    state    | Show the current stored state of Install-Release
    config   | Set configs for Install-Release
    pull     | Install tools from the remote install-release state URL
    hold     | Keep an installed CLI tool's updates on hold.
    me       | Update the Install-Release tool.

For sub-command help use: ir <sub-command> --help

Example: ir get --help

Install completion for cli 🎠

# ir --install-completion [SHELL: bash|zsh|fish|powershell]
# Example for zsh:
ir --install-completion zsh

Install tool from GitHub/GitLab releases 🌈

❯ ir get "https://github.com/ahmetb/kubectx"

πŸ“‘ Repo     : ahmetb/kubectx
🌟 Stars    : 13295
✨ Language : Go
πŸ”₯ Title    : Faster way to switch between clusters and namespaces in kubectl

                              πŸš€ Install: kubectx
┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━┓
┃ Name    ┃ Selected Item                      ┃ Version ┃ Size Mb ┃ Downloads ┃
┑━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━┩
β”‚ kubectx β”‚ kubectx_v0.9.4_linux_x86_64.tar.gz β”‚ v0.9.4  β”‚ 1.0     β”‚ 43811     β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Install this tool (Y/n/?): y
 INFO     Downloaded: 'kubectx_v0.9.4_linux_x86_64.tar.gz' at /tmp/dn_kubectx_ph6i7dmk                                                               utils.py:159
 INFO     install /tmp/dn_kubectx_ph6i7dmk/kubectx /home/noobi/bin/kubectx                                                                  core.py:132
 INFO     Installed: kubectx
# checking if kubectx is installed
❯ which kubectx
/home/noobi/bin/kubectx

❯ kubectx --version
0.9.4

Install specific release asset from GitHub/GitLab releases πŸ”¦

In rare cases where install-release does not automatically find the correct release file for your system, you can manually specify the release file name. There are two ways to do this:

Method 1: Interactive Selection (Recommended)

During the installation prompt, type ? to view all available release assets and select the one you want:

❯ ir get https://github.com/ekzhang/bore

πŸ“‘ Repo     : ekzhang/bore
🌟 Stars    : 8234
✨ Language : Rust
πŸ”₯ Title    : A simple CLI tool for making tunnels to localhost

                              πŸš€ Install: bore
┏━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━┓
┃ Name ┃ Selected Item                            ┃ Version ┃ Size Mb ┃ Downloads ┃
┑━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━┩
β”‚ bore β”‚ bore-v0.4.0-x86_64-unknown-linux-musl... β”‚ v0.4.0  β”‚ 1.2     β”‚ 1523      β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Path: /home/noobi/bin
Install this tool (Y/n/?): ?

                    πŸ“¦ Available Assets for bore
┏━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ ID ┃ Filename                                        ┃ Size (MB) ┃ Downloads ┃
┑━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━━━━━━┩
β”‚ 1  β”‚ bore-v0.4.0-x86_64-unknown-linux-musl.tar.gz    β”‚ 1.2       β”‚ 1523      β”‚
β”‚ 2  β”‚ bore-v0.4.0-x86_64-unknown-linux-gnu.rpm        β”‚ 1.3       β”‚ 845       β”‚
β”‚ 3  β”‚ bore-v0.4.0-aarch64-unknown-linux-musl.deb      β”‚ 1.1       β”‚ 234       β”‚
β”‚ 4  β”‚ bore-v0.4.0-x86_64-apple-darwin.dmg             β”‚ 1.2       β”‚ 456       β”‚
β”‚ 5  β”‚ bore-v0.4.0-x86_64-apple-darwin.tar.gz          β”‚ 1.2       β”‚ 1523      β”‚
β””β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Enter your desired file ID to install (or 'n' to cancel): 3

The tool will automatically parse the selected filename into keywords and store them for future upgrades.

Method 2: Command-line Flag

You can also specify the release file name directly using the -a flag:

❯ ir get [GITHUB-URL or GITLAB-URL] -a [release asset filename]

Example: Installing the bore tool from GitHub with the release file name bore-v0.4.0-arm-unknown-linux-musleabi.tar.gz. Here, the keywords generated are: bore, v0.4.0, arm, linux, musleabi

❯ ir get https://github.com/ekzhang/bore -a bore-v0.4.0-arm-unknown-linux-musleabi.tar.gz

How it works:

  • The tool parses the release file name into keywords (removing version numbers and file extensions)
  • These keywords are stored in the state file to match the correct release file during future tool upgrades
  • This ensures consistent upgrades to the same release variant

Note: If install-release fails to identify the correct release package for your system, please raise a GitHub issue to help improve the tool.

List installed tools πŸ“‹

❯ ir ls

                       Installed tools
┏━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name      ┃ Version ┃ Url                                  ┃
┑━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ terrascan β”‚ v1.15.2 β”‚ https://github.com/tenable/terrascan β”‚
β”‚ gron      β”‚ v0.7.1  β”‚ https://github.com/tomnomnom/gron    β”‚
β”‚ kubectx   β”‚ v0.9.4  β”‚ https://github.com/ahmetb/kubectx    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Remove installed release ❌

# Remove installed release

❯ ir rm gron

INFO     Removed: gron

Update all previously installed tools to the latest version πŸ•ΆοΈ

❯ ir upgrade

Fetching: https://github.com/tenable/terrascan#terrascan
Fetching: https://github.com/ahmetb/kubectx#kubectx

Following tools will be upgraded:

terrascan

Upgrade these tools (Y/n): y

Updating: terrascan, v1.15.0 => v1.15.2
 INFO     Downloaded: 'terrascan_1.15.2_Linux_x86_64.tar.gz' at /tmp/dn_terrascan_0as71a6v
 INFO     install /tmp/dn_terrascan_0as71a6v/terrascan ~/bin/terrascan
 INFO     Installed: terrascan

Progress... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00

Pull state templates for installing tools πŸ“„

You can push your state to somewhere like GitHub and use it on any other device to sync the tools installed via ir.

❯ ir pull --url https://raw.githubusercontent.com/Rishang/dotFiles/main/templates/install-release/state.json

Hold Update to specific installed tool βœ‹

In case you want to hold an update for a specific tool, you can use the hold {tool-name} command which will pause updates for that tool.

Example: Keep tool named k9s update on hold:

❯ ir hold k9s
 INFO     Update on hold for, k9s to True

You can list tools on hold updates by using the ls --hold command:

❯ ir ls --hold
             Installed tools kept on hold
┏━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
┃ Name ┃ Version ┃ Url                               ┃
┑━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┩
β”‚ k9s  β”‚ v0.26.7 β”‚ https://github.com/derailed/k9s   β”‚
β””β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

In case you want to remove the update hold for a specific tool, you can use the hold --unset {tool-name} command:

❯ ir hold --unset k9s
 INFO     Update on hold for, k9s to False

Configure tool installation path

❯ ir config --path ~/.local/bin

INFO   Updated path to:  ~/.local/bin
INFO   Done

Configure updates for pre-release versions πŸ”Œ

This is useful when you want to install pre-release versions of tools like beta or alpha releases. By default, it is set to False, in which case it will only check for the latest stable release.

❯ ir config --pre-release

Configure GitHub/GitLab tokens for higher rate limit πŸ”‘

For GitHub:

❯ ir config --github-token [your github token]

INFO: Updated GitHub token
INFO: Done.

For GitLab:

❯ ir config --gitlab-token [your gitlab token]

INFO: Updated GitLab token
INFO: Done.