/install-release

A tool to install and update any cli tool from github releases

Primary LanguagePythonGNU General Public License v3.0GPL-3.0

install-release ๐Ÿš€

Python Version Downloads

install-release is a cli tool to install any tool for your device directly from their github releases and keep them updated. you can consider it as a small package manager for github releases.

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

Also it's mainly for installing tools that are not directly available in the officially by package managers apt, yum, pacman etc.

# Install install-release
pip install -U install-release
# Example Installation a tool named `gron` directly from its github releases

# install-release get [GITHUB-URL]

โฏ install-release get https://github.com/tomnomnom/gron 

demo

Checking for gron is installed using installed-release:

โฏ which gron
/home/noobi/.release-bin/gron

โฏ gron --help
Transform JSON (from a file, URL, or stdin) into discrete assignments to make it greppable
... # more

Prerequisites

  • python3.8 or higher

  • libmagic

  • Default releases Installation Path is: ~/.release-bin/, This is the path where installed tools will get stored.

  • In order to run installed tools, you need to add the following line your ~/.bashrc or ~/.zshrc file:

export PATH=$HOME/.release-bin:$PATH

Install this package

pip install -U install-release

Example usage install-release

# Help page

โฏ install-release --help
Usage: install-release [OPTIONS] COMMAND [ARGS]...

  Github Release Installer, based on your system

  Commands:
    get      | Install github release, cli tool
    ls       | list all installed release, cli tools
    rm       | remove any installed release, cli tools
    upgrade  | Upgrade all installed release, cli tools
    state    | show currnet stored state
    config   | Set configs for tool
    pull     | Install tools from remote state
    version  | print version of install-release 

For sub command help use: install-release <sub-command> --help

Example: install-release get --help

You can shorten the command by setting alias to your .bashrc or .zshrc

alias ir="install-release"

after this you can you alias directly for easiness

Example: ir get --help

Install tool from github releases

โฏ install-release 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/.release-bin/kubectx                                                                  core.py:132
 INFO     Installed: kubectx
# checking if kubectx is installed
โฏ which kubectx
/home/noobi/.release-bin/kubectx

โฏ kubectx --version
0.9.4

List installed tools

โฏ install-release 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

โฏ install-release rm gron
    
INFO     Removed: gron           

Update all previously installed tools to the latest version

โฏ install-release 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 ~/.release-bin/terrascan
 INFO     Installed: terrascan

Progress... โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 100% 0:00:00 

Config tool installation path

โฏ install-release config --path ~/.local/bin

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

Config github to token for higher rate limit

โฏ install-release config --token [your github token]

INFO: Update token
INFO: Done.