GithubHelp home page GithubHelp logo

thinca / ciw Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 0.0 14 KB

A wrapper to install cli binary from language associated package manager.

License: zlib License

Shell 100.00%

ciw's Introduction

ciw - CLI Install Wrapper

A wrapper to install cli binary from language associated package manager.

Requirements

  • jq
  • curl

Following commands are required for each plugins.

  • go
  • npm
  • cargo

Install

Put bin/ciw to your $PATH. This is just a Bash script.

$ curl https://raw.githubusercontent.com/thinca/ciw/master/bin/ciw -o path/to/bin/ciw
$ chmod a+x path/to/bin/ciw

Usage

Install app

$ ciw install cargo:ripgrep

Arguments of ciw install takes a form like ${type}:${package} or ${type}:${package}@${version}.

$ ciw install go:github.com/mattn/jvgrep/[email protected]

List installed apps

$ ciw list
cargo:ripgrep

Update apps

ciw update without arguments to update all installed apps.

$ ciw update

Or, ciw update with arguments to update specified apps.

$ ciw update cargo:ripgrep

ciw checks if a newer version exists, and does nothing if there is no newer version.

Note that only apps without @${version} can be updated.

Uninstall app

$ ciw uninstall cargo:ripgrep

Restore

You can restore all apps from ciw list.

# Save your apps list to "ciw.list" file
$ ciw list > ciw.list

# Restore your apps from saved list
$ ciw install $(< ciw.list)

Group

By default, all apps are installed to main group.

You can change group by -g or --group option or $CIW_GROUP environment variable.

$ ciw -g local install cargo:ripgrep

Installed app is placed at each group, but CLIs are linked at $CIW_INSTALL_PATH as same.

ciw list lists only the specified group.

Environment Variables

$CIW_INSTALL_PATH

Installed apps are linked from this directory. You should add this directory to $PATH.

Default: ${HOME}/.local/bin

$CIW_GROUP

Group name.

Default: main

$CIW_DATA_PATH

Base directory to place data of ciw.

Default:

  • ${XDG_DATA_HOME}/ciw (if ${XDG_DATA_HOME} is present.)
  • ${HOME}/.local/share/ciw

$CIW_PACKAGES_PATH

Base directory to install apps.

Default: ${CIW_DATA_PATH}/pkg/${CIW_GROUP}

$CIW_CACHE_PATH

Some plugin makes cache data under this directory.

Default:

  • ${XDG_CACHE_HOME}/ciw (if ${XDG_CACHE_HOME} is present.)
  • ${HOME}/.cache/ciw

License

Zlib License

Author

thinca [email protected]

ciw's People

Contributors

thinca avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.