Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 5119803c00
Fetching contributors…

Cannot retrieve contributors at this time

549 lines (545 sloc) 18.831 kb
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW" "1" "November 2012" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for OS X
.
.SH "SYNOPSIS"
\fBbrew\fR \-\-version
.
.br
\fBbrew\fR [\-\-verbose|\-v] command [options] [formula] \.\.\.
.
.SH "DESCRIPTION"
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn\'t include with OS X\.
.
.SH "OPTIONS"
.
.TP
\fB\-v\fR, \fB\-\-verbose\fR command [options] [formula] \.\.\.
With \fB\-\-verbose\fR, many commands print extra debugging information\.
.
.SH "ESSENTIAL COMMANDS"
For the full command list, see the COMMANDS section\.
.
.TP
\fBinstall\fR \fIformula\fR
Install \fIformula\fR\.
.
.TP
\fBremove\fR \fIformula\fR
Uninstall \fIformula\fR\.
.
.TP
\fBupdate\fR
Fetch the newest version of Homebrew from GitHub using \fBgit\fR(1)\.
.
.TP
\fBlist\fR
List all installed formulae\.
.
.TP
\fBsearch\fR, \fB\-S\fR \fItext\fR|/\fItext\fR/
Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is surrounded with slashes, then it is interpreted as a regular expression\. If no search term is given, all available formula are displayed\.
.
.SH "COMMANDS"
.
.TP
\fBaudit\fR [\fIformulae\fR]
Check \fIformulae\fR for Homebrew coding style violations\. This should be run before submitting a new formula\.
.
.IP
If no \fIformulae\fR are provided, all of them are checked\.
.
.IP
\fBaudit\fR exits with a non\-zero status if any errors are found\. This is useful, for instance, for implementing pre\-commit hooks\.
.
.TP
\fBcat\fR \fIformula\fR
Display the source to \fIformula\fR\.
.
.TP
\fBcleanup [\-\-force] [\-ns]\fR [\fIformulae\fR]
For all installed or specific formulae, remove any older versions from the cellar\. By default, does not remove out\-of\-date keg\-only brews, as other software may link directly to specific versions\. In addition old downloads from the Homebrew download\-cache are deleted\.
.
.IP
If \fB\-\-force\fR is passed, remove out\-of\-date keg\-only brews as well\.
.
.IP
If \fB\-n\fR is passed, show what would be removed, but do not actually remove anything\.
.
.IP
If \fB\-s\fR is passed, scrubs the cache, removing downloads for even the latest versions of formula\. Note downloads for any installed formula will still not be deleted\. If you want to delete those too: \fBrm \-rf $(brew \-\-cache)\fR
.
.TP
\fBcreate [\-\-autotools|\-\-cmake] [\-\-no\-fetch] [\-\-set\-name <name>] [\-\-set\-version <version>]\fR \fIURL\fR
Generate a formula for the downloadable file at \fIURL\fR and open it in \fBEDITOR\fR\. Homebrew will attempt to automatically derive the formula name and version, but if it fails, you\'ll have to make your own template\. The wget formula serves as a simple example\.
.
.IP
If \fB\-\-autotools\fR is passed, create a basic template for an Autotools\-style build\. If \fB\-\-cmake\fR is passed, create a basic template for a CMake\-style build\.
.
.IP
If \fB\-\-no\-fetch\fR is passed, Homebrew will not download \fIURL\fR to the cache and will thus not add the MD5 to the formula for you\.
.
.IP
The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are creating\.
.
.TP
\fBdeps [\-\-1] [\-n] [\-\-tree] [\-\-all]\fR \fIformula\fR
Show \fIformula\fR\'s dependencies\.
.
.IP
If \fB\-\-1\fR is passed, only show dependencies one level down, instead of recursing\.
.
.IP
If \fB\-n\fR is passed, show dependencies in topological order\.
.
.IP
If \fB\-\-tree\fR is passed, show dependencies as a tree\.
.
.IP
If \fB\-\-all\fR is passed, show dependencies for all formulae\.
.
.TP
\fBdiy [\-\-set\-name <name>] [\-\-set\-version <version>]\fR
Automatically determine the installation prefix for non\-Homebrew software\.
.
.IP
Using the output from this command, you can install your own software into the Cellar and then link it into Homebrew\'s prefix with \fBbrew link\fR\.
.
.IP
The options \fB\-\-set\-name\fR and \fB\-\-set\-version\fR each take an argument and allow you to explicitly set the name and version of the package you are installing\.
.
.TP
\fBdoctor\fR
Check your system for potential problems\. Doctor exits with a non\-zero status if any problems are found\.
.
.TP
\fBedit\fR
Open all of Homebrew for editing\.
.
.TP
\fBedit\fR \fIformula\fR
Open \fIformula\fR in \fBEDITOR\fR\.
.
.TP
\fBfetch [\-\-force] [\-v] [\-\-HEAD] [\-\-deps]\fR \fIformulae\fR
Download the source packages for the given \fIformulae\fR\. For tarballs, also print MD5 and SHA1 checksums\.
.
.IP
If \fB\-\-HEAD\fR is passed, download the HEAD versions of \fIformulae\fR instead\. \fB\-v\fR may also be passed to make the VCS checkout verbose, useful for seeing if an existing HEAD cache has been updated\.
.
.IP
If \fB\-\-force\fR is passed, remove a previously cached version and re\-fetch\.
.
.IP
If \fB\-\-deps\fR is passed, also download dependencies for any listed \fIformulae\fR\.
.
.TP
\fBhome\fR
Open Homebrew\'s own homepage in a browser\.
.
.TP
\fBhome\fR \fIformula\fR
Open \fIformula\fR\'s homepage in a browser\.
.
.TP
\fBinfo [\-\-all]\fR \fIformula\fR
Display information about \fIformula\fR\.
.
.IP
If \fB\-\-all\fR is passed, show info for all formulae\.
.
.TP
\fBinfo \-\-github\fR \fIformula\fR
Open a browser to the GitHub History page for formula \fIformula\fR\.
.
.IP
To view formula history locally: \fBbrew log \-p <formula>\fR\.
.
.TP
\fBinfo\fR \fIURL\fR
Print the name and version that will be detected for \fIURL\fR\.
.
.TP
\fBinstall [\-\-force] [\-\-debug] [\-\-ignore\-dependencies] [\-\-fresh] [\-\-use\-clang] [\-\-use\-gcc] [\-\-use\-llvm] [\-\-build\-from\-source] [\-\-devel] [\-\-HEAD]\fR \fIformula\fR
Install \fIformula\fR\.
.
.IP
\fIformula\fR is usually the name of the formula to install, but it can be specified several different ways\. See \fISPECIFYING FORMULAE\fR\.
.
.IP
If \fB\-\-force\fR is passed, will install \fIformula\fR if it exists, even if it is blacklisted\.
.
.IP
If \fB\-\-debug\fR is passed and brewing fails, open a shell inside the temporary directory used for compiling\.
.
.IP
If \fB\-\-ignore\-dependencies\fR is passed, skip installing any dependencies of any kind\. If they are not already present, the formula will probably fail to install\.
.
.IP
If \fB\-\-fresh\fR is passed, the installation process will not re\-use any options from previous installs\.
.
.IP
If \fB\-\-use\-clang\fR is passed, attempt to compile using clang\.
.
.IP
If \fB\-\-use\-gcc\fR is passed, attempt to compile using GCC\. This is useful for systems whose default compiler is LLVM\-GCC\.
.
.IP
If \fB\-\-use\-llvm\fR is passed, attempt to compile using the LLVM front\-end to GCC\. \fINOTE\fR: Not all formulae will build with LLVM\.
.
.IP
If \fB\-\-build\-from\-source\fR is passed, compile from source even if a bottle is provided for \fIformula\fR\.
.
.IP
If \fB\-\-devel\fR is passed, and \fIformula\fR defines it, install the development version\.
.
.IP
If \fB\-\-HEAD\fR is passed, and \fIformula\fR defines it, install the HEAD version, aka master, trunk, unstable\.
.
.IP
To install a newer version of HEAD use \fBbrew rm <foo> && brew install \-\-HEAD <foo>\fR or \fBbrew install \-\-force \-\-HEAD <foo>\fR\.
.
.TP
\fBinstall \-\-interactive [\-\-git]\fR \fIformula\fR
Download and patch \fIformula\fR, then open a shell\. This allows the user to run \fB\./configure \-\-help\fR and otherwise determine how to turn the software package into a Homebrew formula\.
.
.IP
If \fB\-\-git\fR is passed, Homebrew will create a Git repository, useful for creating patches to the software\.
.
.TP
\fBln\fR, \fBlink [\-\-overwrite] [\-\-dry\-run]\fR \fIformula\fR
Symlink all of \fIformula\fR\'s installed files into the Homebrew prefix\. This is done automatically when you install formula, but can be useful for DIY installations\.
.
.IP
If \fB\-\-overwrite\fR is passed, Homebrew will delete files which already exist in the prefix while linking\.
.
.IP
If \fB\-\-dry\-run\fR or \fB\-n\fR is passed, Homebrew will list all files which would be linked or which would be deleted by \fBbrew link \-\-overwrite\fR, but will not actually link or delete any files\.
.
.TP
\fBls, list [\-\-unbrewed] [\-\-versions]\fR [\fIformulae\fR]
Without any arguments, list all installed formulae\.
.
.IP
If \fIformulae\fR are given, list the installed files for \fIformulae\fR\. Combined with \fB\-\-verbose\fR, recursively list the contents of all subdirectories in each \fIformula\fR\'s keg\.
.
.IP
If \fB\-\-unbrewed\fR is passed, list all files in the Homebrew prefix not installed by Homebrew\.
.
.IP
If \fB\-\-versions\fR is passed, show the version number for installed formulae, or only the specified formulae if \fIformulae\fR are given\.
.
.TP
\fBlog [git\-log\-options]\fR \fIformula\fR \.\.\.
Show the git log for the given formulae\. Options that \fBgit\-log\fR(1) recognizes can be passed before the formula list\.
.
.TP
\fBmissing\fR [\fIformulae\fR]
Check the given \fIformulae\fR for missing dependencies\.
.
.IP
If no \fIformulae\fR are given, check all installed brews\.
.
.TP
\fBoptions [\-\-compact] [\-\-all] [\-\-installed]\fR \fIformula\fR
Display install options specific to \fIformula\fR\.
.
.IP
If \fB\-\-compact\fR is passed, show all options on a single line separated by spaces\.
.
.IP
If \fB\-\-all\fR is passed, show options for all formulae\.
.
.IP
If \fB\-\-installed\fR is passed, show options for all installed formulae\.
.
.TP
\fBoutdated [\-\-quiet]\fR
Show formulae that have an updated version available\.
.
.IP
If \fB\-\-quiet\fR is passed, list only the names of outdated brews\. Otherwise, the versions are printed as well\.
.
.TP
\fBprune\fR
Remove dead symlinks from the Homebrew prefix\. This is generally not needed, but can be useful when doing DIY installations\.
.
.TP
\fBrm\fR, \fBremove\fR, \fBuninstall [\-\-force]\fR \fIformula\fR
Uninstall \fIformula\fR\.
.
.IP
If \fB\-\-force\fR is passed, and there are multiple versions of \fIformula\fR installed, delete all installed versions\.
.
.TP
\fBsearch\fR, \fB\-S\fR \fItext\fR|/\fItext\fR/
Perform a substring search of formula names for \fItext\fR\. If \fItext\fR is surrounded with slashes, then it is interpreted as a regular expression\. If no search term is given, all available formula are displayed\.
.
.TP
\fBsearch \-\-macports\fR|\fB\-\-fink\fR \fItext\fR
Search for \fItext\fR on the MacPorts or Fink package search page\.
.
.TP
\fBtap\fR [\fItap\fR]
Tap a new formula repository from GitHub, or list existing taps\.
.
.IP
\fItap\fR is of the form \fIuser\fR/\fIrepo\fR, e\.g\. \fBbrew tap homebrew/dupes\fR\.
.
.TP
\fBtap \-\-repair\fR:
.
.IP
Ensures all tapped formula are symlinked into Library/Formula and prunes dead formula from Library/Formula\.
.
.TP
\fBtest\fR \fIformula\fR
A few formulae provide a test method\. \fBbrew test <formula>\fR runs this test method\. There is no standard output or return code, but it should generally indicate to the user if something is wrong with the installed formula\.
.
.IP
Example: \fBbrew install jruby && brew test jruby\fR
.
.TP
\fBunlink\fR \fIformula\fR
Unsymlink \fIformula\fR from the Homebrew prefix\. This can be useful for temporarily disabling a formula: \fBbrew unlink foo && commands && brew link foo\fR\.
.
.TP
\fBuntap\fR \fItap\fR
Remove a tapped repository\.
.
.TP
\fBupdate [\-\-rebase]\fR
Fetch the newest version of Homebrew and all formulae from GitHub using \fBgit\fR(1)\.
.
.IP
If \fB\-\-rebase\fR is specified then \fBgit pull \-\-rebase\fR is used\.
.
.TP
\fBupgrade\fR [\fIformulae\fR]
Upgrade outdated brews\.
.
.IP
If \fIformulae\fR are given, upgrade only the specified brews\.
.
.TP
\fBuses [\-\-installed] [\-\-recursive]\fR \fIformula\fR
Show the formulas that specify \fIformula\fR as a dependency\.
.
.IP
Use \fB\-\-recursive\fR to resolve more than one level of dependencies\.
.
.IP
If \fB\-\-installed\fR is passed, only list installed formulae\.
.
.TP
\fBversions [\-\-compact]\fR \fIformulae\fR
List previous versions of \fIformulae\fR, along with a command to checkout each version\.
.
.IP
If \fB\-\-compact\fR is passed, show all options on a single line separated by spaces\.
.
.TP
\fB\-\-cache\fR
Display Homebrew\'s download cache\. \fIDefault:\fR \fB~/Library/Caches/Homebrew\fR
.
.TP
\fB\-\-cache\fR \fIformula\fR
Display the file or directory used to cache \fIformula\fR\.
.
.TP
\fB\-\-cellar\fR
Display Homebrew\'s Cellar path\. \fIDefault:\fR \fB/usr/local/Cellar\fR
.
.TP
\fB\-\-cellar\fR \fIformula\fR
Display the location in the cellar where \fIformula\fR would be installed, without any sort of versioned directory as the last path\.
.
.TP
\fB\-\-config\fR
Show Homebrew and system configuration useful for debugging\. If you file a bug report, you will likely be asked for this information if you do not provide it\.
.
.TP
\fB\-\-prefix\fR
Display Homebrew\'s install path\. \fIDefault:\fR \fB/usr/local\fR
.
.TP
\fB\-\-prefix\fR \fIformula\fR
Display the location in the cellar where \fIformula\fR is or would be installed\.
.
.TP
\fB\-\-repository\fR
Display where Homebrew\'s \fB\.git\fR directory is located\. For standard installs, the \fBprefix\fR and \fBrepository\fR are the same directory\.
.
.TP
\fB\-\-version\fR
Print the version number of brew to standard error and exit\.
.
.SH "EXTERNAL COMMANDS"
Homebrew, like \fBgit\fR(1), supports external commands\. These are executable scripts that reside somewhere in the PATH, named \fBbrew\-<cmdname>\fR or \fBbrew\-<cmdname>\.rb\fR, which can be invoked like \fBbrew cmdname\fR\. This allows you to create your own commands without modifying Homebrew\'s internals\.
.
.P
A number of (useful, but unsupported) external commands are included and enabled by default:
.
.IP "" 4
.
.nf
$ ls `brew \-\-repository`/Library/Contributions/cmds
.
.fi
.
.IP "" 0
.
.P
Documentation for the included external commands as well as instructions for creating your own can be found on the wiki: \fIhttp://wiki\.github\.com/mxcl/homebrew/External\-Commands\fR
.
.SH "SPECIFYING FORMULAE"
Many Homebrew commands accept one or more \fIformula\fR arguments\. These arguments can take several different forms:
.
.TP
The name of a formula
e\.g\. \fBgit\fR, \fBnode\fR, \fBwget\fR\.
.
.TP
The fully\-qualified name of a tapped formula
Sometimes a formula from a tapped repository may conflict with one in mxcl/master\. You can still access these formulae by using a special syntax, e\.g\. \fBhomebrew/dupes/vim\fR or \fBhomebrew/versions/node4\fR\.
.
.TP
An arbitrary URL
Homebrew can install formulae via URL, e\.g\. \fBhttps://raw\.github\.com/mxcl/homebrew/master/Library/Formula/git\.rb\fR\. The formula file will be cached for later use\.
.
.SH "ENVIRONMENT"
.
.TP
GIT
When using Git, Homebrew will use \fBGIT\fR if set, a Homebrew\-built Git if installed, or the system\-provided binary\.
.
.IP
Set this to force Homebrew to use a particular git binary\.
.
.TP
EDITOR
If set, and \fBHOMEBREW_EDITOR\fR is not, use \fBEDITOR\fR as the text editor\.
.
.TP
HOMEBREW_BUILD_FROM_SOURCE
If set, instructs Homebrew to compile from source even when a formula provides a bottle\.
.
.TP
HOMEBREW_CACHE
If set, instructs Homebrew to use the give directory as the download cache\. Otherwise, \fB~/Library/Caches/Homebrew\fR is used\.
.
.IP
This can be used to keep downloads out of your home directory, if you have it mounted on an SSD or are using FileVault for instance\.
.
.TP
HOMEBREW_CURL_VERBOSE
If set, Homebrew will pass \fB\-\-verbose\fR when invoking \fBcurl\fR(1)\.
.
.TP
HOMEBREW_DEBUG
If set, instructs Homebrew to always assume \fB\-\-debug\fR when running commands\.
.
.TP
HOMEBREW_DEBUG_INSTALL
When \fBbrew install \-d\fR or \fBbrew install \-i\fR drops into a shell, \fBHOMEBREW_DEBUG_INSTALL\fR will be set to the name of the formula being brewed\.
.
.TP
HOMEBREW_DEBUG_PREFIX
When \fBbrew install \-d\fR or \fBbrew install \-i\fR drops into a shell, \fBHOMEBREW_DEBUG_PREFIX\fR will be set to the target prefix in the Cellar of the formula being brewed\.
.
.TP
HOMEBREW_EDITOR
If set, Homebrew will use this editor when editing a single formula, or several formulae in the same directory\.
.
.IP
\fINOTE\fR: \fBbrew edit\fR will open all of Homebrew as discontinuous files and directories\. TextMate can handle this correctly in project mode, but many editors will do strange things in this case\.
.
.TP
HOMEBREW_KEEP_INFO
If set, Homebrew will not remove files from \fBshare/info\fR, allowing them to be linked from the Cellar\. To access these info files, prepend \fBshare/info\fR to your \fBINFOPATH\fR environment variable\.
.
.IP
\fIExample:\fR \fBexport INFOPATH=\'/usr/local/share/info:/usr/share/info\'\fR
.
.TP
HOMEBREW_MAKE_JOBS
If set, instructs Homebrew to use the value of \fBHOMEBREW_MAKE_JOBS\fR as the number of parallel jobs to run when building with \fBmake\fR(1)\.
.
.IP
\fIDefault:\fR the number of available CPU cores\.
.
.TP
HOMEBREW_SVN
When exporting from Subversion, Homebrew will use \fBHOMEBREW_SVN\fR if set, a Homebrew\-built Subversion if installed, or the system\-provided binary\.
.
.IP
Set this to force Homebrew to use a particular svn binary\.
.
.TP
HOMEBREW_TEMP
If set, instructs Homebrew to use \fBHOMEBREW_TEMP\fR as the temporary directory for building packages\. This may be needed if your system temp directory and Homebrew Prefix are on different volumes, as OS X has trouble moving symlinks across volumes when the target does not yet exist\.
.
.IP
This issue typically occurs when using FileVault or custom SSD configurations\.
.
.TP
HOMEBREW_USE_CLANG
If set, instructs Homebrew to compile using clang\.
.
.TP
HOMEBREW_USE_GCC
If set, instructs Homebrew to compile using gcc\.
.
.TP
HOMEBREW_USE_LLVM
If set, instructs Homebrew to compile using LLVM\.
.
.IP
\fINOTE\fR: Not all formulae build correctly with LLVM\.
.
.TP
HOMEBREW_VERBOSE
If set, instructs Homebrew to always assume \fB\-\-verbose\fR when running commands\.
.
.SH "USING HOMEBREW BEHIND A PROXY"
Homebrew uses several commands for downloading files (e\.g\. curl, git, svn)\. Many of these tools can download via a proxy\. It\'s common for these tools to read proxy parameters from environment variables\.
.
.P
For the majority of cases setting \fBhttp_proxy\fR is enough\. You can set this in your shell profile, or you can use it before a brew command:
.
.IP "" 4
.
.nf
http_proxy=http://<host>:<port> brew install foo
.
.fi
.
.IP "" 0
.
.P
If your proxy requires authentication:
.
.IP "" 4
.
.nf
http_proxy=http://<user>:<password>@<host>:<port> brew install foo
.
.fi
.
.IP "" 0
.
.SH "SEE ALSO"
Homebrew Wiki: \fIhttp://wiki\.github\.com/mxcl/homebrew/\fR
.
.P
\fBgit\fR(1), \fBgit\-log\fR(1)
.
.SH "AUTHORS"
Max Howell, a splendid chap\.
.
.SH "BUGS"
See Issues on GitHub: \fIhttp://github\.com/mxcl/homebrew/issues\fR
Jump to Line
Something went wrong with that request. Please try again.