2015-07-28 01:07:52 -07:00
# QWER
2014-12-18 12:08:02 -07:00
### _extendable version manager_
2014-09-29 09:51:09 -07:00
2015-05-11 10:33:05 -07:00
> I've built plugins to support the following languages:
2015-07-28 01:05:40 -07:00
> * [Ruby](https://github.com/HashNuke/qwer-ruby)
> * [Erlang](https://github.com/HashNuke/qwer-erlang)
> * [Elixir](https://github.com/HashNuke/qwer-elixir)
> * [Node.js](https://github.com/HashNuke/qwer-nodejs)
2014-12-20 07:16:14 -07:00
>
2015-07-28 01:05:40 -07:00
> There is a [super-simple API](https://github.com/HashNuke/qwer/blob/master/docs/creating-plugins.md) for supporting more languages.
2014-11-30 06:46:11 -07:00
2014-12-20 07:16:14 -07:00
---
2014-11-30 06:46:11 -07:00
2015-05-11 10:36:25 -07:00
## SETUP
2014-11-30 06:46:11 -07:00
2014-11-30 20:32:14 -07:00
Copy-paste the following into command line:
2014-11-30 06:46:11 -07:00
2015-05-11 10:33:05 -07:00
```bash
2015-07-28 01:05:40 -07:00
git clone https://github.com/HashNuke/qwer.git ~/.qwer
2015-05-10 09:51:33 -07:00
2015-05-11 10:33:05 -07:00
```
Depending on your OS, run the following
```bash
2015-05-10 09:51:33 -07:00
# For Ubuntu or other linux distros
2015-07-28 01:05:40 -07:00
echo '. $HOME/.qwer/qwer.sh' >> ~/.bashrc
2015-05-10 09:51:33 -07:00
# OR for Max OSX
2015-07-28 01:05:40 -07:00
echo '. $HOME/.qwer/qwer.sh' >> ~/.bash_profile
2014-11-30 06:46:11 -07:00
```
2015-05-18 22:08:42 -07:00
If you use zsh or any other shell, replace `.bashrc` with the config file for the respective shell.
> For most plugins, it is good if you have installed the following packages OR their equivalent on you OS
2015-05-19 01:52:55 -07:00
> * **OS X**: Install these via homebrew `automake autoconf openssl libyaml readline ncurses libxslt libtool unixodbc`
> * **Ubuntu**: `automake autoconf libreadline-dev libncurses-dev libssl-dev libyaml-dev libxslt-dev libffi-dev libtool unixodbc-dev`
2014-11-30 06:46:11 -07:00
2015-07-28 01:05:40 -07:00
**That's all ~! You are ready to use qwer**
2014-11-30 20:32:14 -07:00
2015-05-11 10:36:25 -07:00
-----------------------
2014-11-30 20:32:14 -07:00
2015-05-11 10:36:25 -07:00
## USAGE
2015-05-17 18:25:35 -07:00
### Manage plugins
2014-11-30 20:32:14 -07:00
2015-07-28 01:05:40 -07:00
Plugins are how qwer understands how to handle different packages.
2014-11-30 06:46:11 -07:00
2015-05-17 18:25:35 -07:00
##### Add a plugin
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer plugin-add < name > < git-url >
# qwer plugin-add erlang https://github.com/HashNuke/qwer-erlang.git
2014-11-30 06:46:11 -07:00
```
2014-11-30 20:32:14 -07:00
2015-06-14 05:27:32 -07:00
##### List installed plugins
```bash
2015-07-28 01:05:40 -07:00
qwer plugin-list
# qwer plugin-list
2015-06-14 05:27:32 -07:00
```
2015-05-17 18:25:35 -07:00
##### Remove a plugin
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer plugin-remove < name >
# qwer plugin-remove erlang
2014-11-30 06:46:11 -07:00
```
2015-05-17 18:25:35 -07:00
##### Update plugins
2014-11-30 06:46:11 -07:00
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer plugin-update --all
2014-11-30 06:46:11 -07:00
```
If you want to update a specific package, just say so.
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer plugin-update < name >
# qwer plugin-update erlang
2014-11-30 06:46:11 -07:00
```
2015-05-17 18:25:35 -07:00
### Manage versions
2014-11-30 06:46:11 -07:00
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer install < name > < version >
# qwer install erlang 17.3
2014-11-30 06:46:11 -07:00
2015-07-28 01:05:40 -07:00
qwer which < name >
# qwer which erlang
2015-05-27 00:20:23 -07:00
# 17.3
2015-07-28 01:05:40 -07:00
qwer uninstall < name > < version >
# qwer uninstall erlang 17.3
2014-11-30 06:46:11 -07:00
```
2015-05-21 21:44:53 -07:00
*If a plugin supports downloading & compiling from source, you can also do this `ref:foo` (replace `foo` with the branch/tag/commit).* You'll have to use the same name when uninstalling too.
2015-05-11 10:36:25 -07:00
##### Lists installed versions
2014-11-30 06:46:11 -07:00
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer list < name >
# qwer list erlang
2014-11-30 06:46:11 -07:00
```
2015-05-11 10:36:25 -07:00
##### List all available versions
2014-11-30 06:46:11 -07:00
2014-11-30 20:32:14 -07:00
```bash
2015-07-28 01:05:40 -07:00
qwer list-all < name >
# qwer list-all erlang
2014-11-30 06:46:11 -07:00
```
2015-05-17 18:25:35 -07:00
## The `.tool-versions` file
2014-11-30 06:46:11 -07:00
2015-05-21 21:24:37 -07:00
Add a `.tool-versions` file to your project dir and versions of those tools will be used.
2015-05-21 21:34:41 -07:00
**Global defaults can be set in the file `$HOME/.tool-versions` **
2015-05-21 21:36:45 -07:00
This is what a `.tool-versions` file looks like:
2014-10-19 09:18:48 -07:00
```
2015-05-21 21:34:41 -07:00
ruby 2.2.0
nodejs 0.12.3
2014-10-19 09:18:48 -07:00
```
2015-05-21 21:34:41 -07:00
The versions can be in the following format:
* `0.12.3` - an actual version. Plugins that support downloading binaries, will download binaries.
* `ref:v1.0.2-a` or `ref:39cb398vb39` - tag/commit/branch to download from github and compile
* `path:/src/elixir` - a path to custom compiled version of a tool to use. For use by language developers and such.
2015-05-21 21:24:37 -07:00
2014-11-30 06:46:11 -07:00
## Credits
2014-10-19 09:18:48 -07:00
2014-12-20 07:05:56 -07:00
Me ([@HashNuke](http://github.com/HashNuke)), High-fever, cold, cough.
2014-10-19 09:18:48 -07:00
2014-11-30 06:46:11 -07:00
Copyright 2014 to the end of time
2014-12-20 07:05:56 -07:00
-------
2015-07-28 01:07:52 -07:00
Read the [ballad ](https://github.com/HashNuke/qwer/blob/master/ballad-of-asdf.md ).