Habitat command-line interface (CLI) reference

The commands for the Habitat CLI (hab) are listed below. This document is not currently auto-updating, so the results of hab --help should be considered a better source for a complete list of commands for the time being.

hab

The main program that allows you to sign and upload packages, start Habitat services, and other related functions through various subcommands.

USAGE

hab [FLAGS] [SUBCOMMAND]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

SUBCOMMANDS

bldr      Commands relating to Habitat build service
cli       Commands relating to Habitat runtime config
config    Commands relating to Habitat runtime config
file      Commands relating to Habitat files
help      Prints this message or the help of the given subcommand(s)
origin    Commands relating to Habitat origin keys
pkg       Commands relating to Habitat packages
plan      Commands relating to plans and other app-specific configuration.
ring      Commands relating to Habitat rings
studio    Commands relating to Habitat Studios
sup       Commands relating to the Habitat Supervisor
svc       Commands relating to Habitat services
user      Commands relating to Habitat users

ALIASES

apply      Alias for: 'config apply'
install    Alias for: 'pkg install'
run        Alias for: 'sup run'
setup      Alias for: 'cli setup'
start      Alias for: 'svc start'
stop       Alias for: 'svc stop'
term       Alias for: 'sup term'


hab bldr

Commands relating to Habitat Builder.

USAGE

hab bldr [SUBCOMMAND]

FLAGS

-h, --help    Prints help information

SUBCOMMANDS

encrypt  Reads a stdin stream containing plain text and outputs an encrypted representation
help     Prints this message or the help of the given subcommand(s)
job      Commands relating to Habitat Builder jobs

Read More:

hab bldr encrypt

Reads a stdin stream containing plain text and outputs an encrypted representation.

USAGE

hab bldr encrypt [OPTIONS]  

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-u, --url <BLDR_URL>    Specify an alternate Builder endpoint . If not specified, the value will
                          be taken from the HAB_BLDR_URL environment variable if defined. 
                          (default: https://bldr.habitat.sh)

hab bldr job

Commands relating to Habitat Builder jobs

USAGE

hab bldr job [SUBCOMMAND]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

SUBCOMMANDS

cancel     Cancel a build job group and any in-progress builds
demote     Demote packages from a completed build job to a specified channel
help       Prints this message or the help of the given subcommand(s)
promote    Promote packages from a completed build job to a specified channel
start      Schedule a build job or group of jobs
status     Get the status of a job group

Read More:

hab bldr job cancel

Cancel a build job group and any in-progress builds

USAGE

hab bldr job cancel [OPTIONS] <GROUP_ID>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<GROUP_ID>    The job group id that was returned from "hab bldr start" (ex: 771100000000000000)

hab bldr job demote

Demote packages from a completed build job to a specified channel

USAGE

hab bldr job demote [FLAGS] [OPTIONS] <GROUP_ID> <CHANNEL>

FLAGS

-i, --interactive    Allow editing the list of demotable packages
-v, --verbose        Show full list of demotable packages
-h, --help           Prints help information
-V, --version        Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)
-o, --origin <ORIGIN>      Limit the demotable packages to the specified origin

ARGS

<GROUP_ID>    The job id that was returned from "hab bldr start" (ex: 771100000000000000)
<CHANNEL>     The target channel name

hab bldr job promote

Promote packages from a completed build job to a specified channel

USAGE

hab bldr job promote [FLAGS] [OPTIONS] <GROUP_ID> <CHANNEL>

FLAGS

-i, --interactive    Allow editing the list of promotable packages
-v, --verbose        Show full list of promotable packages
-h, --help           Prints help information
-V, --version        Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)
-o, --origin <ORIGIN>      Limit the promotable packages to the specified origin

ARGS

<GROUP_ID>    The job id that was returned from "hab bldr start" (ex: 771100000000000000)
<CHANNEL>     The target channel name

hab bldr job start

Schedule a build job or group of jobs

USAGE

hab bldr job start [FLAGS] [OPTIONS] <PKG_IDENT>

FLAGS

-g, --group      Schedule jobs for this package and all of its reverse dependencies
-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<PKG_IDENT>    The origin and name of the package to schedule a job for (eg: core/redis)

hab bldr job status

Get the status of a job group

USAGE

hab bldr job status [OPTIONS] <GROUP_ID|--origin <ORIGIN>>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-u, --url <BLDR_URL>     Specify an alternate Builder endpoint . If not specified, the value will
                          be taken from the HAB_BLDR_URL environment variable if defined. 
                          (default: https://bldr.habitat.sh)
-o, --origin <ORIGIN>    You can see the status of every group in an origin by providing this value

ARGS

<GROUP_ID>    The group id that was returned from "hab bldr job start" (ex: 771100000000000000)


hab cli

Commands relating to Habitat runtime config.

USAGE

hab cli [SUBCOMMAND]

FLAGS

-h, --help    Prints help information

SUBCOMMANDS

completers    Creates command-line completers for your shell.
help          Prints this message or the help of the given subcommand(s)
setup         Sets up the CLI with reasonable defaults.

Read More

hab cli completers

Creates command-line completers for your shell.

USAGE

hab cli completers --shell <SHELL>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-s, --shell <SHELL>    The name of the shell you want to generate the command-completion. Supported
                        Shells: bash, fish, zsh, powershell [values: bash, fish, zsh, powershell]

hab cli setup

Sets up the CLI with reasonable defaults.

USAGE

hab cli setup 

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information


hab config apply

Applies a configuration to a group of Habitat Supervisors.

USAGE

hab config apply [OPTIONS] <SERVICE_GROUP> <VERSION_NUMBER> [FILE]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

    --org <ORG>      Name of service organization to use for encryption
-p, --peer <PEER>    A comma-delimited list of one or more Habitat Supervisor peers 
                        (default: 127.0.0.1:9638)
-r, --ring <RING>    Ring key name, which will encrypt communication messages
-u, --user <USER>    Name of a user key to use for encryption

ARGS

<SERVICE_GROUP>     Target service group (ex: redis.default)
<VERSION_NUMBER>    A version number (positive integer) for this configuration (ex: 42)
<FILE>              Path to local file on disk (ex: /tmp/config.toml, default: <stdin>)

Read More:


hab file

Upload a file to the Supervisor ring.

USAGE

hab file upload [OPTIONS] <SERVICE_GROUP> <VERSION_NUMBER> <FILE>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

    --org  <ORG>     Name of service organization
-p, --peer <PEER>    A comma-delimited list of one or more Habitat Supervisor peers 
                        (default: 127.0.0.1:9638)
-r, --ring <RING>    Ring key name, which will encrypt communication messages
-u, --user <USER>    Name of the user key

ARGS

<SERVICE_GROUP>     Target service group (ex: redis.default)
<VERSION_NUMBER>    A version number (positive integer) for this configuration (ex: 42)
<FILE>              Path to local file on disk


hab origin key

Commands relating to Habitat origin key maintenance.

USAGE

hab origin key [SUBCOMMAND]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

SUBCOMMANDS

download    Download origin key(s) to HAB_CACHE_KEY_PATH
export      Outputs the latest origin key contents to stdout
generate    Generates a Habitat origin key
help        Prints this message or the help of the given subcommand(s)
import      Reads a stdin stream containing a public or secret origin key contents and writes 
                the key to disk
upload      Upload origin keys to Habitat Builder

Read More:

hab origin key download

Download origin key(s) to HAB_CACHE_KEY_PATH

USAGE

hab origin key download [FLAGS] [OPTIONS] <ORIGIN> [REVISION]

FLAGS

-s, --secret     Download secret key instead of public key
-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder (required for downloading secret keys)
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<ORIGIN>      The origin name
<REVISION>    The key revision

hab origin key export

Outputs the latest origin key contents to stdout.

USAGE

hab origin key export [OPTIONS] <ORIGIN>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-t, --type <PAIR_TYPE>    Export either the 'public' or 'secret' key

ARGS

<ORIGIN>

hab origin key generate

Generates a Habitat origin key.

USAGE

hab origin key generate [ORIGIN]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<ORIGIN>    The origin name

hab origin key import

Reads a stdin stream containing a public or secret origin key contents and writes the key to disk.

USAGE

hab origin key import

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

hab origin key upload

Upload origin keys to Habitat Builder.

USAGE

hab origin key upload [FLAGS] [OPTIONS] <ORIGIN|--pubfile <PUBLIC_FILE>>

FLAGS

-s, --secret     Upload secret key in addition to the public key
-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>     Authentication token for Habitat Builder
-u, --url <BLDR_URL>        Specify an alternate Builder endpoint . If not specified, the value
                             will be taken from the HAB_BLDR_URL environment variable if defined.
                             (default: https://bldr.habitat.sh)
    --pubfile <PUBLIC_FILE> Path to a local public origin key file on disk
    --secfile <SECRET_FILE> Path to a local secret origin key file on disk

ARGS

<ORIGIN>    The origin name


hab pkg

Commands relating to Habitat packages.

USAGE

hab pkg [SUBCOMMAND]

FLAGS

-h, --help    Prints help information

SUBCOMMANDS

binds       Displays the binds for a service
binlink     Creates a binlink for a package binary in a common 'PATH' location
build       Builds a Plan using a Studio
channels    Find out what channels a package belongs to
config      Displays the default configuration options for a service
demote      Demote a package from a specified channel
env         Prints the runtime environment of a specific installed package
exec        Executes a command using the 'PATH' context of an installed package
export      Exports the package to the specified format
hash        Generates a blake2b hashsum from a target at any given filepath
help        Prints this message or the help of the given subcommand(s)
install     Installs a Habitat package from Builder or locally from a Habitat Artifact
path        Prints the path to a specific installed release of a package
promote     Promote a package to a specified channel
provides    Search installed Habitat packages for a given file
search      Search for a package in Builder
sign        Signs an archive with an origin key, generating a Habitat Artifact
upload      Uploads a local Habitat Artifact to Builder
verify      Verifies a Habitat Artifact with an origin key

Read More

  • Knowledge Article: Developing Packages
  • binds Displays the binds for a service
  • binlink Creates a binlink for a package binary in a common 'PATH' location
  • build Builds a Plan using a Studio
  • channels Find out what channels a package belongs to
  • config Displays the default configuration options for a service
  • demote Demote a package from a specified channel
  • env Prints the runtime environment of a specific installed package
  • exec Executes a command using the 'PATH' context of an installed package
  • export Exports the package to the specified format
  • hash Generates a blake2b hashsum from a target at any given filepath
  • install Installs a Habitat package from Builder or locally from a Habitat Artifact
  • path Prints the path to a specific installed release of a package
  • promote Promote a package to a specified channel
  • provides Search installed Habitat packages for a given file
  • search Search for a package in Builder
  • sign Signs an archive with an origin key, generating a Habitat Artifact
  • upload Uploads a local Habitat Artifact to Builder
  • verify Verifies a Habitat Artifact with an origin key

hab pkg binds

Displays the binds for a service

USAGE

hab pkg binds <PKG_IDENT>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-statis/1.42.2)

Creates a symlink for a package binary in a common 'PATH' location

USAGE

hab pkg binlink [FLAGS] [OPTIONS] <PKG_IDENT> [BINARY]

FLAGS

-f, --force      Overwrite existing binlinks
-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-d, --dest <DEST_DIR>    Sets the destination directory (default: /bin)

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2)
<BINARY>       The command to symlink (ex: bash)

hab pkg build

Builds a Plan using a Studio

USAGE

hab pkg build [FLAGS] [OPTIONS] <PLAN_CONTEXT>

FLAGS

-w, --windows    Use a Windows Studio instead of a Docker Studio (only available on Windows)
-D, --docker     Uses a Dockerized Studio for the build (default: Studio uses a chroot on linux)
-R, --reuse      Reuses a previous Studio for the build (default: clean up before building)
-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-k, --keys <HAB_ORIGIN_KEYS> Installs secret origin keys (ex: "unicorn", "acme,other,acme-ops")
-r, --root <HAB_STUDIO_ROOT> Sets the Studio root (default: /hab/studios/<DIR_NAME>)
-s, --src <SRC_PATH>         Sets the source path (default: $PWD)

ARGS

<PLAN_CONTEXT>    A directory containing a `plan.sh` file or a
                  `habitat/` directory which contains the `plan.sh` file

hab pkg channels

Find out what channels a package belongs to

USAGE

hab pkg channels [OPTIONS] <PKG_IDENT>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<PKG_IDENT>    A fully qualified package identifier (ex: core/busybox-static/1.42.2/20170513215502)

hab pkg config

Displays the default configuration options for a service

USAGE

hab pkg config <PKG_IDENT>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2)

hab pkg demote

Demote a package from a specified channel

USAGE

hab pkg demote [OPTIONS] <PKG_IDENT> <CHANNEL>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Habitat Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<PKG_IDENT>    A fully qualified package identifier (ex: core/busybox-static/1.42.2/20170513215502)
<CHANNEL>      Demote from the specified release channel

hab pkg env

Prints the runtime environment of a specific installed package

USAGE

hab pkg env <PKG_IDENT>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2)

hab pkg exec

Executes a command using the 'PATH' context of an installed package

USAGE

hab pkg exec <PKG_IDENT> <CMD> [ARGS]...

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2)
<CMD>          The command to execute (ex: ls)
<ARGS>...      Arguments to the command (ex: -l /tmp)

hab pkg export

Exports the package to the specified format

USAGE

hab pkg export [OPTIONS] <FORMAT> <PKG_IDENT>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)
-c, --channel <CHANNEL>    Retrieve the container package from the specified release channel
                                (default: stable)

ARGS

<FORMAT>       The export format (ex: aci, cf, docker, kubernetes, mesos, or tar)
<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2) or filepath
                to a Habitat Artifact (ex: /home/acme-redis-3.0.7-21120102031201-x86_64-linux.hart)

hab pkg hash

Generates a blake2b hashsum from a target at any given filepath

USAGE

hab pkg hash [SOURCE]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<SOURCE>    A filepath of the target

hab pkg install

Installs a Habitat package from Builder or locally from a Habitat Artifact

USAGE

hab pkg install [FLAGS] [OPTIONS] <PKG_IDENT_OR_ARTIFACT>...

FLAGS

-b, --binlink    Binlink all binaries from installed package(s)
-f, --force      Overwrite existing binlinks
-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)
-c, --channel <CHANNEL>    Install from the specified release channel (default: stable)

ARGS

<PKG_IDENT_OR_ARTIFACT>... One or more Habitat package identifiers (ex: acme/redis) and/or filepaths to
                            a Habitat Artifact (ex: ~/acme-redis-3.0.7-21120102031201-x86_64-linux.hart)

hab pkg path

Prints the path to a specific installed release of a package

USAGE

hab pkg path <PKG_IDENT>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2)

hab pkg promote

Promote a package to a specified channel

USAGE

hab pkg promote [OPTIONS] <PKG_IDENT> <CHANNEL>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<PKG_IDENT>    A fully qualifed package identifier (ex: core/busybox-static/1.42.2/20170513215502)
<CHANNEL>      Promote to the specified release channel

hab pkg provides

Search installed Habitat packages for a given file

USAGE

hab pkg provides [FLAGS] <FILE>

FLAGS

-p               Show full path to file
-r               Show fully qualified package names (ex: core/busybox-static/1.24.2/20160708162350)
-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<FILE>    File name to find

Search for a package in Builder

USAGE

hab pkg search [OPTIONS] <SEARCH_TERM>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)

ARGS

<SEARCH_TERM>    Search term

hab pkg sign

Signs an archive with an origin key, generating a Habitat Artifact

USAGE

hab pkg sign [OPTIONS] <SOURCE> <DEST>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

    --origin <ORIGIN>    Origin key used to create signature

ARGS

<SOURCE>    A path to a source archive file (ex: /home/acme-redis-3.0.7-21120102031201.tar.xz)
<DEST>      The destination path to the signed Habitat Artifact 
                (ex:/home/acme-redis-3.0.7-21120102031201-x86_64-linux.hart)

hab pkg upload

Uploads a local Habitat Artifact to Builder

USAGE

hab pkg upload [OPTIONS] <HART_FILE>...

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

OPTIONS

-z, --auth <AUTH_TOKEN>    Authentication token for Builder
-u, --url <BLDR_URL>       Specify an alternate Builder endpoint . If not specified, the value will
                            be taken from the HAB_BLDR_URL environment variable if defined. 
                            (default: https://bldr.habitat.sh)
-c, --channel <CHANNEL>    Additional release channel to upload package to. Packages are always uploaded
                            to `unstable`, regardless of the value of this option. (default: none)

ARGS

<HART_FILE>...    One or more filepaths to a Habitat Artifact 
                    (ex: /home/acme-redis-3.0.7-21120102031201-x86_64-linux.hart)

hab pkg verify

Verifies a Habitat Artifact with an origin key

USAGE

hab pkg verify <SOURCE>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<SOURCE>    A path to a Habitat Artifact (ex: /home/acme-redis-3.0.7-21120102031201-x86_64-linux.hart)


hab plan init

Generates common package specific configuration files. Executing without argument will create a habitat directory in your current folder for the plan. If PKG_NAME is specified it will create a folder with that name. Environment variables (those starting with 'pkg_') that are set will be used in the generated plan

USAGE

hab plan init [FLAGS] [OPTIONS] [PKG_NAME]

FLAGS

    --windows           Use a Windows Powershell plan template
    --with-all          Generate omnibus plan with all available plan options
    --with-callbacks    Include callback functions in template
    --with-docs         Include plan options documentation
-h, --help              Prints help information
-V, --version           Prints version information

OPTIONS

-o, --origin <ORIGIN>              Origin for the new app
-s, --scaffolding <SCAFFOLDING>    Specify explicit Scaffolding for your app (ex: node, ruby)

ARGS

<PKG_NAME>    Name for the new app


hab ring key

Commands relating to Habitat ring keys

USAGE

hab ring key [SUBCOMMAND]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

SUBCOMMANDS

export      Outputs the latest ring key contents to stdout
generate    Generates a Habitat ring key
help        Prints this message or the help of the given subcommand(s)
import      Reads a stdin stream containing ring key contents and writes the key to disk

Read More:

hab ring key export

Outputs the latest ring key contents to stdout

USAGE

hab ring key export <RING>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<RING>    Ring key name

hab ring key generate

Generates a Habitat ring key

USAGE

hab ring key generate <RING>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<RING>    Ring key name

hab ring key import

Reads a stdin stream containing ring key contents and writes the key to disk

USAGE

hab ring key import

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information


hab studio

USAGE

    hab studio [FLAGS] [OPTIONS] <SUBCOMMAND> [ARG ..]

COMMON FLAGS

-h  Prints this message
-n  Do not mount the source path into the Studio (default: mount the path)
-N  Do not mount the source artifact cache path into the Studio (default: mount the path)
-q  Prints less output for better use in scripts
-v  Prints more verbose output
-V  Prints version information
-D  Use a docker studio instead of a chroot studio (only available on Linux)
-w  Use a Windows studio instead of a docker studio (only available on Windows)

COMMON OPTIONS

-a <ARTIFACT_PATH>    Sets the source artifact cache path (default: /hab/cache/artifacts)
-k <HAB_ORIGIN_KEYS>  Installs secret origin keys (default:$HAB_ORIGIN )
-r <HAB_STUDIO_ROOT>  Sets a Studio root (default: /hab/studios/<DIR_NAME>)
-s <SRC_PATH>         Sets the source path (default: $PWD)
-t <STUDIO_TYPE>      Sets a Studio type when creating (default: default) Valid types: 
                        [default baseimage busybox stage1]

SUBCOMMANDS

build     Build using a Studio
enter     Interactively enter a Studio
help      Prints this message
new       Creates a new Studio
rm        Destroys a Studio
run       Run a command in a Studio
version   Prints version information

SUBCOMMAND HELP

hab studio <SUBCOMMAND> -h

ENVIRONMENT VARIABLES

ARTIFACT_PATH         Sets the source artifact cache path ('-a' option overrides)
HAB_NOCOLORING        Disables text coloring mode despite TERM capabilities
HAB_NONINTERACTIVE    Disables interactive progress bars despite tty
HAB_ORIGIN            Propagates this variable into any studios
HAB_ORIGIN_KEYS       Installs secret keys ('-k' option overrides)
HAB_STUDIOS_HOME      Sets a home path for all Studios (default: /hab/studios)
HAB_STUDIO_NOSTUDIORC Disables sourcing a '.studiorc' in 'studio enter'
HAB_STUDIO_ROOT       Sets a Studio root ('-r' option overrides)
HAB_STUDIO_SUP        Sets args for a Supervisor in 'studio enter'
NO_ARTIFACT_PATH      If set, do not mount the source artifact cache path ('-N' flag overrides)
NO_SRC_PATH           If set, do not mount the source path ('-n' flag overrides)
QUIET                 Prints less output ('-q' flag overrides)
SRC_PATH              Sets the source path ('-s' option overrides)
STUDIO_TYPE           Sets a Studio type when creating ('-t' option overrides)
VERBOSE               Prints more verbose output ('-v' flag overrides)
http_proxy            Sets an http_proxy environment variable inside the Studio
https_proxy           Sets an https_proxy environment variable inside the Studio
no_proxy              Sets a no_proxy environment variable inside the Studio

EXAMPLES

# Create a new default Studio
hab studio new

# Enter the default Studio
hab studio enter

# Run a command in the default Studio
hab studio run wget --version

# Destroy the default Studio
hab studio rm

# Create and enter a busybox type Studio with a custom root
hab studio -r /opt/slim -t busybox enter

# Run a command in the slim Studio, showing only the command output
hab studio -q -r /opt/slim run busybox ls -l /

# Verbosely destroy the slim Studio
hab studio -v -r /opt/slim rm

Read More: - Knowledge Article: Studio - Knowledge Article: Environment Variables - Blog: Habitat Studio Artifact Caching - hab studio build - hab studio enter - hab studio new - hab studio rm - hab studio run

hab studio build

Execute a build using a Studio.

USAGE

hab studio [COMMON_FLAGS] [COMMON_OPTIONS] build [FLAGS] [PLAN_DIR]

FLAGS

-R  Reuse a previous Studio state (default: clean up before building)

EXAMPLES

# Build a Redis plan
hab-studio build plans/redis

# Reuse previous Studio for a build
hab-studio build -R plans/glibc

hab studio enter

Interactively enter a Studio.

USAGE

hab studio [COMMON_FLAGS] [COMMON_OPTIONS] enter

hab studio new

Create a new Studio.

USAGE

 hab studio [COMMON_FLAGS] [COMMON_OPTIONS] new

hab studio rm

Destroy a Studio.

USAGE

hab studio [COMMON_FLAGS] [COMMON_OPTIONS] rm

hab studio run

Run a command in a Studio

USAGE

hab studio [COMMON_FLAGS] [COMMON_OPTIONS] run [CMD] [ARG ..]

ARGUMENTS

CMD     Command to run in the Studio
ARG     Arguments to the command

EXAMPLE

hab-studio run wget --version


hab sup

The Habitat Supervisor

USAGE

hab sup [FLAGS]

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information
-V, --version     Prints version information

SUBCOMMANDS

bash      Start an interactive Bash-like shell
config    Displays the default configuration options for a service
help      Prints this message or the help of the given subcommand(s)
load      Load a service to be started and supervised by Habitat from a package or artifact. Services
          started in this manner will persist through Supervisor restarts.
run       Run the Habitat Supervisor
sh        Start an interactive Bourne-like shell
start     Start a loaded, but stopped, Habitat service or a transient service from a package/artifact.
          If the Habitat Supervisor is not already running this will additionally start one for you.
status    Query the status of Habitat services.
stop      Stop a running Habitat service.
term      Gracefully terminate the Habitat Supervisor and all of its running services
unload    Unload a persistent or transient service started by the Habitat Supervisor. If the Supervisor
          is running when the service is unloaded the service will be stopped.

Read More:

hab sup bash

Start an interactive Bash-like shell

USAGE

hab sup bash [FLAGS]

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

hab sup config

Displays the default configuration options for a service

USAGE

hab sup config [FLAGS] <PKG_IDENT>

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

ARGS

<PKG_IDENT>    A package identifier (ex: core/redis, core/busybox-static/1.42.2)

hab sup load

Load a service to be started and supervised by Habitat from a package or artifact. Services started in this manner will persist through Supervisor restarts.

USAGE

hab-sup load [FLAGS] [OPTIONS] <PKG_IDENT_OR_ARTIFACT>

FLAGS

-f, --force       Load or reload an already loaded service. If the service was previously loaded and
                    running this operation will also restart the service
    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

OPTIONS

-a, --application <APPLICATION>    Application name; [default: not set].
    --bind <BIND>...               One or more service groups to bind to a configuration
-u, --url <BLDR_URL>               Receive package updates from Builder at the specified URL
                                        [default: https://bldr.habitat.sh]
    --channel <CHANNEL>            Receive package updates from the specified release channel
                                        [default: stable]
-e, --environment <ENVIRONMENT>    Environment name; [default: not set].
    --group <GROUP>                The service group; shared config and topology [default: default].
    --override-name <NAME>         The name for the state directory if there is more than one Supervisor
                                        running [default: default]
    --password <PASSWORD>          Password of the service user (only available on Windows)
-s, --strategy <STRATEGY>          The update strategy; [default: none] [values: none, at-once, rolling]
-t, --topology <TOPOLOGY>          Service topology; [default: none]

ARGS

<PKG_IDENT_OR_ARTIFACT> A Habitat package identifier (ex: core/redis) or filepath to a Habitat Artifact
                            (ex: /home/core-redis-3.0.7-21120102031201-x86_64-linux.hart)

hab sup run

Run the Habitat Supervisor

USAGE

hab-sup run [FLAGS] [OPTIONS]

FLAGS

-A, --auto-update       Enable automatic updates for the Supervisor itself
    --no-color          Turn ANSI color off
-I, --permanent-peer    If this Supervisor is a permanent peer
-v                      Verbose output; shows line numbers
-h, --help              Prints help information

OPTIONS

-u, --url <BLDR_URL>                       Receive Supervisor updates from Builder at the specified URL
                                                [default: https://bldr.habitat.sh]
    --channel <CHANNEL>                    Receive Supervisor updates from the specified release channel
                                                [default: stable]
-n, --events <EVENTS>                      Name of the service group running a Habitat EventSrv to
                                            forward Supervisor and service event data to
    --listen-gossip <LISTEN_GOSSIP>        The listen address for the gossip system
                                                [default: 0.0.0.0:9638]
    --listen-http <LISTEN_HTTP>            The listen address for the HTTP gateway
                                                [default: 0.0.0.0:9631]
    --override-name <NAME>                 The name of the Supervisor if launching more than one
                                                [default: default]
    --org <ORGANIZATION>                   The organization that the Supervisor and its subsequent
                                            services are part of [default: default]
    --peer <PEER>...                       The listen address of an initial peer (IP[:PORT])
    --peer-watch-file <PEER_WATCH_FILE>    Watch this file for connecting to the ring
-r, --ring <RING>                          Ring key name

hab sup sh

Start an interactive Bourne-like shell

USAGE

hab sup sh [FLAGS]

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

hab sup start

Start a loaded, but stopped, Habitat service or a transient service from a package or artifact. If the Habitat Supervisor is not already running this will additionally start one for you.

USAGE

hab-sup start [FLAGS] [OPTIONS] <PKG_IDENT_OR_ARTIFACT>

FLAGS

-A, --auto-update       Enable automatic updates for the Supervisor itself
    --no-color          Turn ANSI color off
-I, --permanent-peer    If this Supervisor is a permanent peer
-v                      Verbose output; shows line numbers
-h, --help              Prints help information

OPTIONS

-a, --application <APPLICATION>         Application name; [default: not set].
    --bind <BIND>...                    One or more service groups to bind to a configuration
-u, --url <BLDR_URL>                    Receive package updates from Builder at the specified URL
                                            [default: https://bldr.habitat.sh]
    --channel <CHANNEL>                 Receive package updates from the specified release channel
                                            [default: stable]
    --config-from <CONFIG_DIR>          Use package config from this path rather than the package itself
-e, --environment <ENVIRONMENT>         Environment name; [default: not set].
-n, --events <EVENTS>                   Name of the service group running a Habitat EventSrv to forward
                                            Supervisor and service event data to
    --group <GROUP>                     The service group; shared config and topology [default: default]
    --listen-gossip <LISTEN_GOSSIP>     The listen address for the gossip system [default: 0.0.0.0:9638]
    --listen-http <LISTEN_HTTP>         The listen address for the HTTP gateway [default: 0.0.0.0:9631]
    --override-name <NAME>              The name for the state directory if launching more than one
                                            Supervisor [default: default]
    --org <ORGANIZATION>                The organization that the Supervisor and its subsequent services
                                            are part of [default: default]
    --password <PASSWORD>               Password of the service user (only available on Windows)
    --peer <PEER>...                    The listen address of an initial peer (IP[:PORT])
    --peer-watch-file <PEER_WATCH_FILE> Watch this file for connecting to the ring
-r, --ring <RING>                       Ring key name
-s, --strategy <STRATEGY>               The update strategy; [default: none]
                                            [values: none, at-once, rolling]
-t, --topology <TOPOLOGY>               Service topology; [default: none]

ARGS: A Habitat package identifier (ex: core/redis) or filepath to a Habitat Artifact (ex: /home/core-redis-3.0.7-21120102031201-x86_64-linux.hart)

hab sup status

Query the status of Habitat services.

USAGE

hab sup status [FLAGS] [OPTIONS] [PKG_IDENT]

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

OPTIONS

    --override-name <NAME>    The name for the state directory if there is more than one
                              Supervisor running [default: default]

ARGS

<PKG_IDENT>    A Habitat package identifier (ex: core/redis)

hab sup stop

Stop a running Habitat service.

USAGE

hab sup stop [FLAGS] [OPTIONS] <PKG_IDENT>

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

OPTIONS

    --override-name <NAME>    The name for the state directory if there is more than one
                                Supervisor running [default: default]

ARGS

<PKG_IDENT>    A Habitat package identifier (ex: core/redis)

hab sup term

Gracefully terminate the Habitat Supervisor and all of its running services

USAGE

hab sup term [FLAGS] [OPTIONS]

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

OPTIONS

    --override-name <NAME>    The name of the Supervisor if more than one is running [default: default]

hab sup unload

Unload a persistent or transient service started by the Habitat supervisor. If the Supervisor is running when the service is unloaded the service will be stopped.

USAGE

hab sup unload [FLAGS] [OPTIONS] <PKG_IDENT>

FLAGS

    --no-color    Turn ANSI color off
-v                Verbose output; shows line numbers
-h, --help        Prints help information

OPTIONS

    --override-name <NAME>    The name for the state directory if there is more than one
                              Supervisor running [default: default]

ARGS

<PKG_IDENT>    A Habitat package identifier (ex: core/redis)                                  


hab svc key generate

Generates a Habitat service key

USAGE

hab svc key generate <SERVICE_GROUP> [ORG]

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<SERVICE_GROUP>    Target service group (ex: redis.default)
<ORG>              The service organization

Read More:


hab user key generate

Generates a Habitat user key

USAGE

hab user key generate <USER>

FLAGS

-h, --help       Prints help information
-V, --version    Prints version information

ARGS

<USER>    Name of the user key