Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/rishang/install-release

Simple package manager to easily install, update and manage any command-line(CLI) single binary tool directly from github releases
https://github.com/rishang/install-release

cli darwin github go golang install-release installer linux package-manager python release releases shell ubuntu

Last synced: about 6 hours ago
JSON representation

Simple package manager to easily install, update and manage any command-line(CLI) single binary tool directly from github releases

Awesome Lists containing this project

README

        


๐Ÿš€ Install Release



Python Version


Downloads

**Install Release** is a CLI tool by name `ir` to install any tool for your device(Linux/MacOS/WSL) directly from their GitHub releases and keep them updated. Consider it as a small package manager to install single binary tools from GitHub releases.

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

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

## Table of Contents ๐Ÿ“š

- [Table of Contents ๐Ÿ“š](#table-of-contents-)
- [Getting started โšก](#getting-started-)
- [Prerequisites ๐Ÿ“‹](#prerequisites-)
- [Install `install-release` package ๐Ÿ“ฆ](#install-install-release-package-)
- [Updating `install-release` ๐Ÿ”„](#updating-install-release-)
- [Example usage `ir --help` ๐Ÿ’ก](#example-usage-ir---help-)
- [Install completion for cli ๐ŸŽ ](#install-completion-for-cli-)
- [Install tool from GitHub releases ๐ŸŒˆ](#install-tool-from-github-releases-)
- [List installed tools ๐Ÿ“‹](#list-installed-tools-)
- [Remove installed release โŒ](#remove-installed-release-)
- [Update all previously installed tools to the latest version ๐Ÿ•ถ๏ธ](#update-all-previously-installed-tools-to-the-latest-version-๏ธ)
- [Pull state templates for installing tools ๐Ÿ“„](#pull-state-templates-for-installing-tools-)
- [Hold Update to specific installed tool โœ‹](#hold-update-to-specific-installed-tool-)
- [Config tool installation path ๐Ÿ—‚๏ธ](#config-tool-installation-path-๏ธ)
- [Config updates for pre-release versions ๐Ÿ”Œ](#config-updates-for-pre-release-versions-)
- [Configure GitHub token for higher rate limit ๐Ÿ”‘](#configure-github-token-for-higher-rate-limit-)

## Getting started โšก

```bash
# Install ir
pip install -U install-release
```

Example Installation a tool named [deno](https://github.com/denoland/deno)(A modern runtime for JavaScript and TypeScript) directly from its GitHub releases.

```bash
# ir get [GITHUB-URL]

โฏ ir get https://github.com/denoland/deno
```

![demo](https://raw.githubusercontent.com/Rishang/install-release/main/.github/images/demo.png)

Checking for deno is installed by `install-release`:

```
โฏ which deno
~/bin/deno

โฏ deno --version
deno 1.46.3 (stable, release, x86_64-unknown-linux-gnu)
v8 12.9.202.5-rusty
typescript 5.5.2
```

## Prerequisites ๐Ÿ“‹

- python3.8 or higher

- [libmagic](https://github.com/ahupp/python-magic#installation)
- Default releases Installation Path is: `~/bin/`,
This is the path where installed tools will get stored.

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

```bash
export PATH=$HOME/bin:$PATH
```

## Install `install-release` package ๐Ÿ“ฆ

```bash
pip install -U install-release
```

## Updating `install-release` ๐Ÿ”„

For seeing version:

```bash
ir me --version
```

For updating:

```bash
ir me --upgrade
```

## Example usage `ir --help` ๐Ÿ’ก

```
# Help page

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

GitHub Release Installer, based on your system

Commands:
get | Install GitHub release, cli tool
ls | list all installed releases, cli tools
rm | remove any installed release, cli tools
upgrade | Upgrade all installed releases, cli tools
state | show currently stored state
config | Set configs for tool
pull | Install tools from a remote state
hold | Keep updates a tool on hold.
me | Update ir tool.
```

For sub-command help use: `ir --help`

Example: `ir get --help`

#### Install completion for cli ๐ŸŽ 

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

#### Install tool from GitHub releases ๐ŸŒˆ

```bash
โฏ 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
```

#### List installed tools ๐Ÿ“‹

```bash
โฏ 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 โŒ

```bash
# Remove installed release

โฏ ir rm gron

INFO Removed: gron
```

#### Update all previously installed tools to the latest version ๐Ÿ•ถ๏ธ

```bash
โฏ 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 for any other device, to make a sync for tools installed via ir

```bash
โฏ 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 to the specific tool, you can use `hold {tool-name}` command which will pause update for that tool.

Example: keep tool named [k9s](https://github.com/derailed/k9s) update on hold

```bash
โฏ ir hold k9s
INFO Update on hold for, k9s to True
```

You can list tools on hold updates by `ls --hold` command

```bash
โฏ 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 unhold update to the specific tool, you can use `hold --unset {tool-name}` command by which it will pause update for that tool.

```
โฏ ir hold --unset k9s
INFO Update on hold for, k9s to False
```

#### Config tool installation path ๐Ÿ—‚๏ธ

```bash
โฏ ir config --path ~/.local/bin

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

#### Config 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 latest release.

```bash
โฏ ir config --pre-release
```

#### Configure GitHub token for higher rate limit ๐Ÿ”‘

```bash
โฏ ir config --token [your github token]

INFO: Update token
INFO: Done.
```