Below you'll find installation instructions for each platform and their requirements. The Habitat CLI is currently supported on Linux, Mac, and Windows.
Table of Contents
- Download and Install the Habitat CLI Tool
- Configure Your Workstation
- Download and Install FAQ
From building packages to running services, everything in Habitat is done through the hab command-line interface (CLI) tool. To get started using Habitat, you need to download and install the hab CLI tool that corresponds to your workstation OS.
Requires 64-bit processor running 10.9 or later
Once you have downloaded the
hab CLI, unzip it onto your machine. Unzipping to
/usr/local/bin should place it on your
PATH. In order to use the Habitat Studio, you'll also need to install Docker for Mac.
Install Habitat Using Homebrew
Habitat can also be installed with Homebrew, by running the following commands:
Requires 64-bit Windows 10 Pro, Enterprise, or Education editions (1511 November update, build 10586 or later) with Hyper-V enabled
Once you have downloaded the
hab CLI, unzip it onto your machine. We suggest unzipping to
C:\habitat and then adding that folder to your
PATH variable. Here’s how to do that with Powershell:
In order to use the Habitat Studio, you'll also need to install Docker for Windows.Download Habitat for WindowsDownload Docker for Windows
Installing Habitat on Windows Using Chocolatey
Habitat can also be installed with Chocolatey, by running the following command:
Once Habitat has been installed, the
hab CLI makes it easy to get your workstation configured by guiding through the setup process. To set up your workstation, run
hab setup and follow the instructions.
Setup asks you to create a new origin and a set of origin keys. Optionally, you can also provide a GitHub personal access token to upload packages to the public depot and share them with the Habitat community.
The GitHub personal access token needs information provided from the
read:orgOAuth scopes. Habitat uses the information provided through these scopes for authentication and to determine features based on team membership.
For more information about using Habitat Builder, see the section on Working with Builder.
During setup, you may elect to provide anonymous usage data of the
hab CLI tool. This information is used by the Habitat team to improve the CLI experience.
For information on the types of data we gather and how we intend to use it, see Analytics in Habitat.
You can change your settings at any time by re-running the
hab setup command.
That's it. You're all set up and ready to use Habitat to build and run packages!
This section tracks some frequently encountered questions around downloading and installing the
Q: Can I just download a GitHub release of habitat?
A: While we do cut releases in GitHub as part of our release process those archives are going to be a tar'ed point in time of our source code. As the
hab cli is written rust if you follow this approach you'll need to compile the source for your platform.
Q: Compile for my platform? Does that mean there aren't any OS native packages of
A: We publish compiled packages for OSX, Linux, and Windows.
hab has a requirement of either a Linux kernel >= 2.6.32, OSX >= 10.9, or 64-bit Windows 10 Pro, Enterprise, or Education editions (1511 November update, build 10586 or later) with Hyper-V enabled.
Q: What if I need an old version of
A: We've got you covered! The script we provide for doing curlbash installations will allow you to specify a
-v flag to pull down a specific version of habitat.
Q: Oh! A curlbash I (love||hate) those.
A: Indeed they are divisive, we know, that's why we provide a few different ways for you to download. If you'd like to take a look at the script in advance of running it, you can find it in the core habitat repo.
Install Habitat via curlbash using the following command:
curl https://raw.githubusercontent.com/habitat-sh/habitat/master/components/hab/install.sh | sudo bash
Q: Er, how do I install habitat?
A: You'll need to download the
hab package. Extract the binary to somewhere on your $PATH (or somewhere that you can execute the binary from a command line). If you're installing on a workstation we would strongly recommend running
hab setup after youve extracted the binary. Read our step by step docs here.
Q: How do I install
hab across my server fleet?
A: for the most part, we leave that up to you. You could just use the aforementioned curl-bash with your provisioner of choice. If your app was dockerized with habitat then you won't even need to ask this question, because you'll have everything you need inside your container. We are working on first class mesos dc/os, cloudfoundry and kubernetes integrations - which you can keep up to date on in our best practices section and blog.