CLI helper to install Github releases on your system.

Overview

Github release installer

CI PyPI Python Versions PyPI Package Version

gh-release-install is a CLI helper to install Github releases on your system. It can be used for pretty much anything, to install a formatter in your CI, deploy some binary using an orcherstration tool, or on your desktop.

This project was mainly created to...

# ...turn this mess:
wget --quiet --output-document=- "https://github.com/koalaman/shellcheck/releases/download/v0.7.1/shellcheck-v0.7.1.linux.x86_64.tar.xz" \
    | tar --extract --xz --directory=/usr/local/bin --strip-components=1 --wildcards 'shellcheck*/shellcheck' \
    && chmod +x /usr/local/bin/shellcheck

wget --quiet --output-document=/usr/local/bin/shfmt "https://github.com/mvdan/sh/releases/download/v3.2.1/shfmt_v3.2.1_linux_amd64" \
    && chmod +x /usr/local/bin/shfmt

# Into this:
pip3 install gh-release-install

gh-release-install \
      "koalaman/shellcheck" \
      "shellcheck-{tag}.linux.x86_64.tar.xz" --extract "shellcheck-{tag}/shellcheck" \
      "/usr/bin/shellcheck"

gh-release-install \
      "mvdan/sh" \
      "shfmt_{tag}_linux_amd64" \
      "/usr/bin/shfmt"

Features:

  • Download releases from Github.
  • Extract zip or tarball on the fly.
  • Pin to a desired version or get the latest version.
  • Keep track of the local tools version using a version file.

Installation

Install the package from pip:

pip install gh-release-install
gh-release-install --help

Or with with pipx:

pipx install gh-release-install
gh-release-install --help

Usage

Usage: gh-release-install [OPTIONS] REPOSITORY ASSET DESTINATION

  Install GitHub release file on your system.

  The REPOSITORY argument define the Github REPOSITORY org/repo to get the
  release from.

  Examples:
      mvdan/sh
      prometheus/prometheus

  The ASSET argument define the release ASSET filename. Note that ASSET may
  contain variables such as '{version}' or '{tag}'.

  Examples:
      shfmt_{tag}_linux_amd64
      prometheus-{version}.linux-amd64.tar.gz

  The DESTINATION argument define the DESTINATION path for the downloaded
  file. Note that DESTINATION may contain variables such as '{version}' or
  '{tag}'.

  Examples:
      /usr/bin/local/shfmt
      /opt/prometheus/prometheus

  If the release asset is an archive, use the --extract flag to extract the
  <filename> from the archive and install the extracted file instead. Note
  that <filename> may contain variables such as '{version}' or '{tag}'.

  Examples:
      --extract prometheus-{version}.linux-amd64/prometheus

  To install a specific version, use the --version flag to set the desired
  version. With 'latest' the installer will ask the Github API to find the
  latest version. The default is 'latest'.

  Examples:
      latest
      v2.28.1

  To track the version installed on the system, use the --version-file flag to
  define the <filename> where the version should be saved. The default is not
  to save this version file. Note that <filename> may contain variables such
  as '{destination}'.

  Examples:
      --version-file /opt/versions/prometheus.version
      --version-file {destination}.version

  Some full examples:

  gh-release-install \
      'mvdan/sh' \
      'shfmt_{tag}_linux_amd64' \
      '/usr/bin/local/shfmt' \
      --version 'v3.3.1'

  gh-release-install \
      'prometheus/prometheus' \
      'prometheus-{version}.linux-amd64.tar.gz' \
      --extract 'prometheus-{version}.linux-amd64/prometheus' \
      '/usr/local/bin/prometheus' \
      --version-filename '{destination}.version'

Options:
  --extract <filename>       Archive member to extract.
  --version <version>        Release version to install.
  --version-file <filename>  File to track the version installed.
  --help                     Show this message and exit.
Owner
Jonas L.
Jonas L.
Unpacks things.

$ unp_ unp is a command line tool that can unpack archives easily. It mainly acts as a wrapper around other shell tools that you can find on v

Armin Ronacher 405 Jan 03, 2023
A command line tool to publish ads on ebay-kleinanzeigen.de

kleinanzeigen-bot Feedback and high-quality pull requests are highly welcome! About Installation Usage Development Notes License About kleinanzeigen-b

83 Dec 26, 2022
Wordle helper: help you print posible 5-character words based on you input

Wordle Helper This program help you print posible 5-character words based on you

Gwan Thanakrit Juthamongkhon 4 Jan 19, 2022
cli simple python script to interact with iphone afc api based on python library( tidevice )

afcclient cli simple python script to interact with iphone afc api based on python library( tidevice ) installation pip3 install -U tidevice cp afccli

fyst_14 2 Jul 15, 2022
Low-Cost Open Source Ventilator or PAPR

Last updated 2020/04/19 Low-Cost Open-Source Ventilator-ish Device or PAPR NOTE: This is currently an independent project not affiliated with any comm

Johnny Lee 1.7k Dec 21, 2022
A command line utility for tracking a stock market portfolio. Primarily featuring high resolution braille graphs.

A command line stock market / portfolio tracker originally insipred by Ericm's Stonks program, featuring unicode for incredibly high detailed graphs even in a terminal.

Conrad Selig 51 Nov 29, 2022
Termtyper is a TUI typing application that provides you a great feel with typing with a lot of options to tweak

Termtyper Termtyper is a TUI (Text User Interface) typing application that provides you a great feel with typing with a lot of options to tweak! It is

Noob Coder 834 Dec 27, 2022
Convert ACSM files to DRM-free EPUB files with one command on Linux

Knock Convert ACSM files to DRM-free EPUB files using one command. This software does not utilize Adobe Digital Editions nor Wine. It is completely fr

Benton Edmondson 622 Dec 09, 2022
Command Line Manager + Interactive Shell for Python Projects

Manage Command Line Manager + Interactive Shell for Python Projects

Python Manage 123 Aug 28, 2022
Features terminal for python

Features Terminal V1.0 (23/10/2021) Um programa para linux com diferentes ferramentas! Recursos: Criador de QR code Gerador de senhas Teste de velocid

1 Oct 26, 2021
Squirrel - A cli program to track writing progress

Squirrel Very much a WIP project squirrel is a command line program that tracks you writing progress and gives you useful information and cute and pic

3 Mar 23, 2022
Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer or phone

Hack-All is a simple CLI tool that helps ethical-hackers to make a reverse connection without knowing the target device in use is it computer

LightYagami17 5 Nov 22, 2022
Palm CLI - the tool-belt for data teams

Palm CLI: The extensible CLI at your fingertips Palm is a universal CLI developed to improve the life and work of data professionals. Palm CLI documen

Palmetto 41 Dec 12, 2022
term2048 is a terminal-based version of 2048.

term2048 is a terminal-based version of 2048.

Baptiste Fontaine 798 Nov 21, 2022
A lightweight Python module and command-line tool for generating NATO APP-6(D) compliant military symbols from both ID codes and natural language names

Python military symbols This is a lightweight Python module, including a command-line script, to generate NATO APP-6(D) compliant military symbol icon

Nick Royer 5 Dec 27, 2022
Command line client for Audience Insights

Dynamics 365 Audience Insights CLI The AuI CLI is a command line tool for Dynamics 365 Audience Insights. It is based on the customerinsights Python l

Microsoft 8 Jan 09, 2023
A next-generation CLI and TUI that aims to be your personal assistant for everything competitive programming related. 🚀

Competitive Programming Tool Kit The Competitive Programming Tool Kit (cptk for short), is a command line and terminal user interface (CLI and TUI) th

Alon 4 May 21, 2022
Plumbum: Shell Combinators

Plumbum: Shell Combinators Ever wished the compactness of shell scripts be put into a real programming language? Say hello to Plumbum Shell Combinator

Tomer Filiba 2.5k Dec 28, 2022
Animefetch is an anime command-line system information tool written in python

Animefetch - v0.0.3 An anime command-line system information tool written in python. Description Animefetch is an anime command-line system informatio

Thadeuks 6 Jun 17, 2022
A Bot Which Send Automatically Commands To Karuta Hub to Gain it's Currency

A Bot Which Send Automatically Commands To Karuta Hub to Gain it's Currency

HarshalWaykole 1 Feb 09, 2022