From 554a6b960cfbc6b93390f8df0731af592e4fe8bf Mon Sep 17 00:00:00 2001 From: Akash Manohar J Date: Mon, 1 Dec 2014 09:02:14 +0530 Subject: [PATCH] Update readme --- README.md | 71 ++++++++++++++++++++++++++++------------------- ballad-of-asdf.md | 30 ++++++++++++++++++++ 2 files changed, 72 insertions(+), 29 deletions(-) create mode 100644 ballad-of-asdf.md diff --git a/README.md b/README.md index 81ab36ca..568ead8e 100644 --- a/README.md +++ b/README.md @@ -2,56 +2,71 @@ > for everything that needs a version manager -asdf is an extendable version manager. +asdf is an extendable version manager. Read the [ballad](https://github.com/HashNuke/asdf/blob/master/ballad-of-asdf.md) Add or create a source for any package/language/tool you want. There's a [simple API](#creating-package-sources) for it. +## Table of Contents + +* [Install](#install) +* [Manage sources](#manage-sources) +* [Manage packages](#manage-packages) +* [The `.versions` file](the-versions-file) +* [Creating package sources](#creating-package-sources) + + +## Install + +Copy-paste the following into command line: + +```bash +git clone https://github.com/HashNuke/asdf.git ~/.asdf +echo 'export PATH="$HOME/.asdf/bin:$PATH"' >> ~/.bash_profile +``` + +**That's all ~! You are ready to use asdf** + +It clones the adsf repo and adds `~/.asdf/bin` to `$PATH` in `~/.bash_profile`. + + ## Manage sources Sources are how asdf understands how to handle packages. -#### Add a source for a package -``` -asdf source-add -``` +#### Add a package -Say you want to add Erlang. There's a package source for it at . - -``` +```bash +# asdf source-add asdf source-add erlang https://github.com/HashNuke/asdf-erlang.git ``` #### Remove a source -``` -asdf source-remove -``` - -Now you want to remove the package source for erlang you added earlier. - -``` +```bash +# asdf source-remove asdf source-remove erlang ``` + #### Update sources -To update all sources run the following - -``` +```bash +# To update all sources asdf source-update --all ``` If you want to update a specific package, just say so. -``` -asdf source-update +```bash +# asdf source-update +asdf source-update erlang ``` ## Manage packages -``` +```bash # asdf install asdf install erlang 17.3 @@ -61,22 +76,22 @@ asdf uninstall erlang 17.3 #### Lists installed versions -``` +```bash # asdf list -asdf list +asdf list erlang ``` #### List all available versions -``` +```bash # asdf list-all asdf list-all erlang ``` #### Use a specific version of a package -``` -asdf use +```bash +# asdf use asdf use erlang 17.3 ``` @@ -121,9 +136,7 @@ These scripts are run when `list-all`, `install`, `uninstall` or `use` commands ### bin/uninstall -Uninstalls a command - -You'll get the same args as the `install` script. +Uninstalls a command. Same args as the `bin/install` script. ### bin/use diff --git a/ballad-of-asdf.md b/ballad-of-asdf.md new file mode 100644 index 00000000..16dcf03b --- /dev/null +++ b/ballad-of-asdf.md @@ -0,0 +1,30 @@ +# Ballad of asdf + +> Once upon a time there was a programming language +There were many versions of it +So people wrote a version manager for it +To switch between versions for projects +Different, old, new. + +> Then there came more programming languages +So there came more version managers +And many commands for them + +> I installed a lot of them (rbenv, erlenv, exenv, nvm, etc) +I learnt a lot of commands + +> Then I said, just one more version manager +Which I will write instead + +> So, there came another version manager +**asdf version manager** - + +> A version manager so extendable +for which anyone can create a plugin +To support their favourite language +No more installing more version managers +Or learning more commands + +--- + +*This was the mail I wrote to a few friends to tell them about the project. Thanks to [@roshanvid](http://twitter.com/roshanvid) for suggesting that this go into the readme*