vin

package module
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2020 License: MIT Imports: 16 Imported by: 0

README

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 when new applications are released or versions are upgraded, 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

  • TOML-based configuration
  • Easy to use, but also highly scalable

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.

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

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

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

Usage

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

[[app]]
repo = "cli/cli"

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

vin install

Configuration

[[app]]
# repo is the GitHub repository name in "owner/repo" format.
repo = "cli/cli"

# tag is the tag on GitHub.
# If empty, it is treated as "latest".
tag = "v1.2.0"

# keywords is a list of keywords for selecting suitable assets from multiple assets.
# If empty, it is treated as ["runtime.GOOS", "runtime.GOARCH"].
keywords = ["amd64", "linux"]

# command is the command to run after installation.
command = """
gh completion -s zsh > ~/.zfunc/_gh
"""

References

Thanks to ghg for the idea.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	// Repo is the GitHub repository name in "owner/repo" format.
	Repo string `toml:"repo"`

	// Tag is the tag on GitHub.
	Tag string `toml:"tag"`

	// Keywords is a list of keywords for selecting suitable assets from multiple assets.
	Keywords []string `toml:"keywords"`

	// Command is the command to run after installation.
	Command string `toml:"command"`
	// contains filtered or unexported fields
}

App represents an application.

type CLI

type CLI struct{}

CLI represents a CLI for Vin.

func NewCLI

func NewCLI() *CLI

func (*CLI) Run

func (c *CLI) Run() error

Run runs the CLI.

type Vin

type Vin struct {
	Apps []App `toml:"app"`
	// contains filtered or unexported fields
}

Vin represents a Vin client.

func New

func New(path string) (*Vin, error)

New returns a Vin client. `path` is the path to the `vin.toml`.

Directories

Path Synopsis
cmd
vin

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL