The first and most common way to install is using Homebrew.
If you don’t know what Homebrew is, visit http://brew.sh/.
I won’t be covering installation of Homebrew in this article.
That being said…
Open up Terminal.app and run the following commands.
$ brew tap joshuairl/homebrew-cfenv $ brew update $ brew install cfenv
Using Git / GitHub
This will get you going with the latest version of cfenv and make it easy to fork and contribute any changes back upstream. Anyway, we start by installing Git if we don’t already have it. You can do this with homebrew via
brew install git or by downloading Xcode w/ Command Line Tools (recommended). But I’m not going to cover how to do that here.
- Check out cfenv into
$ git clone https://github.com/joshuairl/cfenv.git ~/.cfenv
$PATHfor access to the
$ echo 'export PATH="$HOME/.cfenv/bin:$PATH"' >> ~/.bash_profile
cfenv initto your shell to enable shims and autocompletion.
$ echo 'eval "$(cfenv init -)"' >> ~/.bash_profile
- Restart your shell so that PATH changes take effect. (Opening a new terminal tab will usually do it.) Now check if cfenv was set up:
$ type cfenv // "cfenv is a function"
If you’ve installed cfenv manually using git, you can upgrade your installation to the cutting-edge version at any time.
$ cd ~/.cfenv $ git pull
To use a specific release of cfenv, check out the corresponding tag:
$ cd ~/.cfenv $ git fetch $ git checkout v0.0.6
If you’ve installed via Homebrew, then upgrade via its
$ brew update $ brew upgrade cfenv
That’s all there is to it!
For usage information and additional installation tips and steps visit