项目作者: skmatz

项目描述 :
A next-generation GitHub Releases installer
高级语言: Go
项目地址: git://github.com/skmatz/vin.git
创建时间: 2020-12-05T10:38:43Z
项目社区:https://github.com/skmatz/vin

开源协议:MIT License

下载


banner



ci


release


go report card


license


go version


release


Description
|
Features
|
Installation
|
Usage
|
Configuration
|
References

Description

vin is the CLI to install applications from GitHub Releases.

In recent years, many useful CLI tools have been made by Go, Rust, etc.
Many of them are available as pre-built binaries in GitHub Releases, but we have to manipulate the browser to download them, decompress the compressed files, and move the executables to the appropriate path.

vin makes it easy to manage all at once by writing a list of applications in a TOML file.
No longer do we have to select suitable assets for our machines from GitHub Releases, no longer do we have to look up the options for the tar command, and no longer do we have to be pained when we setup a new machine.

Features

  • Easy to use
  • TOML-based configuration

Installation

Download the binary from GitHub Releases.
Unfortunately, the first time you install vin, you need to open the browser.

Or, if you have Go, you can install vin with the following command.

  1. go get github.com/skmatz/vin/...

After installation, add ~/.vin/bin to your $PATH.

  1. export PATH="$HOME/.vin/bin:$PATH"

Usage

First, put the following TOML file in ~/.config/vin/vin.toml.

  1. [[app]]
  2. repo = "cli/cli"

You can set this with the following command.

  1. # darwin
  2. mkdir -p ~/Library/Application\ Support/vin
  3. vin example > ~/Library/Application\ Support/vin/vin.toml
  4. # linux
  5. mkdir -p ~/.config/vin
  6. vin example > ~/.config/vin/vin.toml
  7. # windows (confirmed on Windows Terminal)
  8. mkdir -p ~\AppData\Roaming\vin\vin.toml
  9. vin example > ~\AppData\Roaming\vin\vin.toml

Yes, all you have to do is run the following command.

  1. vin get

Configuration

  1. [[app]]
  2. # repo is the GitHub repository name in "owner/repo" format.
  3. repo = "cli/cli"
  4. # tag is the tag on GitHub.
  5. # If empty, it is treated as "latest".
  6. tag = "v1.2.0"
  7. # keywords is a list of keywords for selecting suitable assets from multiple assets.
  8. # If empty, it is treated as [$GOOS, $GOARCH].
  9. keywords = ["amd64", "linux"]
  10. # name is the name of the executable file.
  11. # If empty, it is treated as the original name.
  12. name = "gh"
  13. # hosts is a list of host names.
  14. # If empty, it is treated as any hosts.
  15. hosts = ["awesome-machine"]
  16. # priority is the priority of the application.
  17. priority = 3
  18. # command is the command to run after installation.
  19. command = """
  20. gh completion -s zsh > ~/.zfunc/_gh
  21. """

References

Thanks to ghg for the idea.