2010-06-15 11:53:46 -07:00
|
|
|
brew(1) -- The missing package manager for OS X
|
|
|
|
===============================================
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
## SYNOPSIS
|
|
|
|
|
|
|
|
`brew` [--verbose|-v] command [options] [formula] ...
|
2010-08-11 21:10:51 -07:00
|
|
|
`brew` [--version|-v]
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
## DESCRIPTION
|
|
|
|
|
|
|
|
Homebrew is the easiest and most flexible way to install the UNIX tools Apple
|
|
|
|
didn't include with OS X.
|
|
|
|
|
|
|
|
## OPTIONS
|
|
|
|
* `-v`, `--verbose` command [options] [formula] ...:
|
|
|
|
Prints extra, comand-specific debugging information.
|
|
|
|
Note that `brew -v` by itself is the same as `brew --version`.
|
|
|
|
|
|
|
|
## COMMANDS
|
|
|
|
|
|
|
|
* `-v`, `--version`:
|
2010-11-06 14:18:15 -07:00
|
|
|
Print the version number of brew to standard error and exit.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-09-16 09:56:59 -07:00
|
|
|
* `install [--force] [--debug] [--use-llvm] [--ignore-dependencies] [--HEAD]` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Install <formula>.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-10-30 12:30:22 -07:00
|
|
|
<formula> is usually the name of the formula to install, but may also be
|
|
|
|
the URL for an arbitrary formula.
|
|
|
|
|
2010-09-16 09:56:59 -07:00
|
|
|
If `--force` is passed, will install <formula> even if it is already
|
2010-09-16 11:27:56 -07:00
|
|
|
installed. This can be used to re-install a formula without removing
|
|
|
|
it first.
|
2010-09-16 09:56:59 -07:00
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
If `--debug` is passed and brewing fails, open a shell inside the
|
2010-06-03 22:29:20 -07:00
|
|
|
temporary folder used for compiling.
|
|
|
|
|
2010-08-11 21:10:51 -07:00
|
|
|
If `--use-llvm` is passed, attempt to compile using the LLVM front-end to GCC.
|
2010-07-29 09:20:26 -07:00
|
|
|
*NOTE*: Not all formulae will build with LLVM.
|
2010-06-15 11:53:46 -07:00
|
|
|
|
|
|
|
If `--ignore-dependencies` is passed, skip installing any dependencies of
|
2010-08-11 21:10:51 -07:00
|
|
|
any kind. If they are not already present, the formula will probably fail
|
|
|
|
to install.
|
2010-06-15 11:53:46 -07:00
|
|
|
|
2010-07-09 12:13:17 -07:00
|
|
|
If `--HEAD` is passed, and <formula> defines it, install the HEAD version,
|
|
|
|
aka master, trunk, unstable, dev.
|
|
|
|
|
2010-10-13 06:43:04 -07:00
|
|
|
To install a newer version of HEAD use
|
|
|
|
`brew rm <foo> && brew install --HEAD <foo>`
|
|
|
|
or `brew --force --HEAD <foo>`.
|
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
* `install --interactive [--git]` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Download and patch <formula>, then open a shell. This allows the user to
|
|
|
|
run `./configure --help` and otherwise determine how to turn the software
|
|
|
|
package into a Homebrew formula.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
If `--git` is passed, Homebrew will create a Git repository, useful for
|
|
|
|
creating patches to the software.
|
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
* `-S`, `search` <text>|/<text>/:
|
|
|
|
Perform a substring search of formula names for <text>. If <text> is
|
|
|
|
surrounded with slashes, then it is interpreted as a regular expression.
|
|
|
|
If no search term is given, all available formula are displayed.
|
|
|
|
|
|
|
|
* `-S --macports`|`--fink` <text>:
|
|
|
|
Search for <text> on the MacPorts or Fink package search page.
|
|
|
|
|
|
|
|
* `update`:
|
2010-11-07 07:36:34 -08:00
|
|
|
Fetch the newest version of Homebrew from GitHub using `git`(1).
|
2010-11-06 14:18:15 -07:00
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
* `list`:
|
2010-11-06 14:18:15 -07:00
|
|
|
List all installed formulae.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `list` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
List the installed files for <formula>.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `info` <formula>:
|
2010-11-07 07:36:34 -08:00
|
|
|
Display information about <formula>.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `info --github` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Open a browser to the GitHub History page for formula <formula>.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-11-07 07:36:34 -08:00
|
|
|
To view formula history locally: `brew log -p <formula>`.
|
|
|
|
|
2010-07-29 09:03:08 -07:00
|
|
|
* `info` <URL>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Print the name and version that will be detected for <URL>.
|
2010-07-29 09:03:08 -07:00
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
* `home`:
|
2010-11-06 14:18:15 -07:00
|
|
|
Open Homebrew's own homepage in a browser.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `home` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Open <formula>'s homepage in a browser.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
* `rm`, `remove`, `uninstall [--force]` <formula>:
|
|
|
|
Uninstall <formula>.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-10-17 17:52:10 -07:00
|
|
|
If `--force` is passed, and there are multiple versions of <formula>
|
2010-11-07 07:36:34 -08:00
|
|
|
installed, delete all installed versions.
|
2010-10-17 17:52:10 -07:00
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
* `create [--cache]` <URL>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Generate a formula for the downloadable file at <URL> and opens it in
|
2010-06-03 22:29:20 -07:00
|
|
|
$EDITOR. Homebrew will attempt to automatically derive the formula name
|
|
|
|
and version, if it fails, you'll have to make your own template. I suggest
|
|
|
|
copying wget's.
|
|
|
|
|
|
|
|
If `--cache` is passed, Homebrew will download the <URL> to the cache and
|
|
|
|
add the MD5 to the formula for you.
|
|
|
|
|
|
|
|
* `edit` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Open <formula> in $EDITOR.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `edit`:
|
2010-11-06 14:18:15 -07:00
|
|
|
Open all of Homebrew for editing in TextMate.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-10-17 17:52:21 -07:00
|
|
|
* `ln`, `link` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Symlink all of <formula>'s installed files into the Homebrew prefix. This
|
2010-06-03 22:29:20 -07:00
|
|
|
is done automatically when you install formula. It is useful for DIY
|
|
|
|
installation, or in cases where you want to swap out different versions of
|
|
|
|
the same package that you have installed at the same time.
|
|
|
|
|
|
|
|
* `unlink` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Unsymlink <formula> from the Homebrew prefix. This can be useful for
|
|
|
|
temporarily disabling a formula: `brew unlink foo && commands && brew link foo`.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `prune`:
|
2010-11-06 14:18:15 -07:00
|
|
|
Remove dead symlinks from the Homebrew prefix. This is generally not
|
|
|
|
needed, but can be useful when doing DIY installations.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `outdated`:
|
2010-11-06 14:18:15 -07:00
|
|
|
Show formula that have an updated version available.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-08-11 20:51:33 -07:00
|
|
|
* `deps [--1]` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Show <formula>'s dependencies.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-08-11 20:51:33 -07:00
|
|
|
If `--1` is passed, only show dependencies one level down, instead of
|
|
|
|
recursing.
|
|
|
|
|
|
|
|
* `uses [--installed]` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Show the formulas that specify <formula> as a dependency. The list is
|
2010-08-11 20:51:33 -07:00
|
|
|
not recursive; only one level of dependencies is resolved.
|
|
|
|
|
2010-09-27 09:57:25 -07:00
|
|
|
If `--installed` is passed, only lists installed formulae.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `doctor`:
|
2010-11-06 14:18:15 -07:00
|
|
|
Check your system for potential problems.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `cat` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Display the source to <formula>.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* `cleanup` [<formula>]:
|
|
|
|
For all installed or specific formulae, remove any older versions from the
|
|
|
|
cellar.
|
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
* `log [git-log-options]` <formula> ...:
|
|
|
|
Show the git log for the given formulae. Options that `git-log`(1)
|
2010-10-04 17:12:34 -07:00
|
|
|
recognizes can be passed before the formula list.
|
|
|
|
|
2010-10-13 07:15:23 -07:00
|
|
|
* `fetch [--force] [-v] [--HEAD]` <formula>:
|
2010-11-06 14:18:15 -07:00
|
|
|
Download the source package for the given <formula>. For tarballs, also
|
|
|
|
prints MD5 and SHA1 checksums.
|
2010-10-13 06:48:38 -07:00
|
|
|
|
|
|
|
If `--HEAD` is passed, download the HEAD version of <formula> instead. `-v`
|
|
|
|
may also be passed to make the VCS checkout verbose, useful for seeing if
|
|
|
|
an existing HEAD cache has been updated.
|
|
|
|
|
2010-10-13 07:15:23 -07:00
|
|
|
If `--force` is passed, remove a previously cached version and re-fetch.
|
|
|
|
|
2010-11-07 07:36:34 -08:00
|
|
|
* `audit [--warn]`:
|
|
|
|
Check formulae for Homebrew coding style violations. This should be
|
|
|
|
run before submitting a new formula for inclusion.
|
|
|
|
|
|
|
|
If `--warn` is passed, perform additional stricter checks that may not need
|
|
|
|
to be fixed before submitting.
|
|
|
|
|
|
|
|
* `options` <formula>:
|
|
|
|
Display install options specific to <formula>.
|
|
|
|
|
|
|
|
* `missing`:
|
|
|
|
Check all installed formuale for missing dependencies.
|
|
|
|
|
|
|
|
* `server`:
|
|
|
|
Start a local web app that lets you browse available formulae, similar
|
|
|
|
to `gem server`. Requires [`sinatra`][sinatra].
|
|
|
|
|
|
|
|
* `test` <formula>:
|
|
|
|
A few formulae provide a test method. `brew test <formula>` 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.
|
|
|
|
|
|
|
|
Example: `brew install jruby && brew test jruby`
|
|
|
|
|
|
|
|
* `man`:
|
|
|
|
Regenerate this man page using [`ronn`][ronn]. See `man brew-man` for details.
|
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
* `--config`:
|
|
|
|
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.
|
|
|
|
|
|
|
|
* `--prefix`:
|
|
|
|
Display Homebrew's install path. *Default:* `/usr/local`
|
|
|
|
|
|
|
|
* `--prefix` <formula>:
|
|
|
|
Display the location in the cellar where <formula> is or would be installed.
|
|
|
|
|
|
|
|
* `--cellar`:
|
|
|
|
Display Homebrew's Cellar path. *Default:* `/usr/local/Cellar`
|
|
|
|
|
|
|
|
* `--cellar`:
|
|
|
|
Display the location in the cellar where <formula> would be installed,
|
|
|
|
without any sort of versioned folder as the last path.
|
|
|
|
|
|
|
|
* `--cache`:
|
|
|
|
Display Homebrew's download cache. *Default:* `~/Library/Cache/Homebrew`
|
|
|
|
|
|
|
|
* `--cache` <formula>:
|
|
|
|
Display the file or folder used to cache <formula>.
|
|
|
|
|
|
|
|
* `--repository`:
|
|
|
|
Display where Homebrew's `.git` folder is located. For standard installs,
|
|
|
|
the `prefix` and `repository` are the same folder.
|
|
|
|
|
2010-07-29 09:24:38 -07:00
|
|
|
## EXTERNAL COMMANDS
|
|
|
|
|
|
|
|
Homebrew allows external commands to be defined by putting a +x file named
|
|
|
|
`brew-<cmdname>` or `brew-<cmdname>.rb` on the PATH. This will cause Homebrew
|
|
|
|
to recognize `brew cmdname`.
|
|
|
|
|
2010-11-07 07:36:34 -08:00
|
|
|
Some sample commands ship with Homebrew and are enabled by default.
|
2010-09-08 05:27:09 -07:00
|
|
|
|
2010-11-07 07:36:34 -08:00
|
|
|
$ ls `brew --repository`/Lirary/Contributes/examples
|
2010-08-20 10:18:03 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
## ENVIRONMENT
|
|
|
|
|
|
|
|
* HOMEBREW\_DEBUG:
|
2010-08-11 21:10:51 -07:00
|
|
|
If set, instructs Homebrew to always assume `--debug` when running
|
|
|
|
commands.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
2010-08-16 09:22:14 -07:00
|
|
|
* HOMEBREW\_DEBUG\_INSTALL:
|
2010-08-20 10:06:06 -07:00
|
|
|
When `brew install -d` or `brew install -i` drops into a shell,
|
2010-08-16 09:22:14 -07:00
|
|
|
`HOMEBREW_DEBUG_INSTALL` will be set to the name of the formula being
|
2010-08-20 10:06:06 -07:00
|
|
|
brewed.
|
|
|
|
|
|
|
|
* HOMEBREW\_DEBUG\_PREFIX:
|
|
|
|
When `brew install -d` or `brew install -i` drops into a shell,
|
2010-11-06 14:18:15 -07:00
|
|
|
`HOMEBREW_DEBUG_PREFIX` will be set to the target prefix in the Cellar
|
2010-08-20 10:06:06 -07:00
|
|
|
of the formula being brewed.
|
2010-08-16 09:22:14 -07:00
|
|
|
|
2010-07-25 10:56:32 -07:00
|
|
|
* HOMEBREW\_EDITOR:
|
|
|
|
If set, Homebrew will use this editor when editing a single formula, or
|
|
|
|
several formulae in the same folder.
|
|
|
|
|
|
|
|
*NOTE*: `brew edit` will open all of Homebrew as discontinuous files and
|
|
|
|
folders. TextMate can handle this correctly in project mode, but many
|
|
|
|
editors will do strange things in this case.
|
|
|
|
|
2010-08-21 11:24:58 -07:00
|
|
|
* HOMEBREW\_KEEP\_INFO:
|
2010-11-06 14:18:15 -07:00
|
|
|
If set, Homebrew will not remove files from `share/info`, allowing them
|
|
|
|
to be linked from the Cellar.
|
2010-08-21 11:24:58 -07:00
|
|
|
|
2010-07-09 12:13:17 -07:00
|
|
|
* HOMEBREW\_SVN:
|
|
|
|
When exporting from Subversion, Homebrew will use `HOMEBREW_SVN` if set,
|
|
|
|
a Homebrew-built Subversion if installed, or the system-provided binary.
|
|
|
|
|
|
|
|
Set this to force Homebrew to use a particular svn binary.
|
|
|
|
|
2010-05-01 14:06:23 -07:00
|
|
|
* HOMEBREW\_TEMP:
|
|
|
|
If set, instructs Homebrew to use `HOMEBREW_TEMP` as the temporary folder
|
|
|
|
for building packages. This may be needed if your system temp folder and
|
|
|
|
Homebrew Prefix are on different volumes, as OS X has trouble moving
|
|
|
|
symlinks across volumes when the target does not yet exist.
|
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
This issue typically occurs when using FileVault or custom SSD
|
|
|
|
configurations.
|
2010-05-01 14:06:23 -07:00
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
* HOMEBREW\_USE\_LLVM:
|
2010-08-11 21:10:51 -07:00
|
|
|
If set, instructs Homebrew to use the LLVM front-ends to the GCC
|
|
|
|
compilers.
|
2010-07-25 10:56:32 -07:00
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
*NOTE*: Not all formulae build correctly with LLVM.
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
* HOMEBREW\_VERBOSE:
|
|
|
|
If set, instructs Homebrew to always assume `--verbose` when running
|
|
|
|
commands.
|
|
|
|
|
2010-11-01 10:24:57 -07:00
|
|
|
## 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.
|
|
|
|
|
|
|
|
For the majority of cases setting `http_proxy` is enough. You can set this in
|
|
|
|
your shell profile, or you can use it before a brew command:
|
|
|
|
|
|
|
|
http_proxy=http://<host>:<port> brew install foo
|
|
|
|
|
|
|
|
If your proxy requires authentication:
|
|
|
|
|
|
|
|
http_proxy=http://<user>:<password>@<host>:<port> brew install foo
|
|
|
|
|
2010-06-03 22:29:20 -07:00
|
|
|
## SEE ALSO
|
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
Homebrew Wiki: <http://wiki.github.com/mxcl/homebrew/>
|
|
|
|
|
|
|
|
`git`(1), `git-log`(1)
|
2010-06-03 22:29:20 -07:00
|
|
|
|
|
|
|
## AUTHORS
|
|
|
|
|
|
|
|
Max Howell, a splendid chap.
|
|
|
|
|
|
|
|
## BUGS
|
|
|
|
|
2010-11-06 14:18:15 -07:00
|
|
|
See Issues on GitHub: <http://github.com/mxcl/homebrew/issues>
|
2010-11-07 07:36:34 -08:00
|
|
|
|
|
|
|
|
|
|
|
[ronn]: http://rtomayko.github.com/ronn/
|
|
|
|
"Ronn"
|
|
|
|
|
|
|
|
[sinatra]: http://www.sinatrarb.com/
|
|
|
|
"Sinatra"
|