mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00

When reproducing issues with software that hasn’t been bottled yet on your version of macOS it can sometimes be helpful to use `or_later` bottle functionality i.e. just use the bottle for the latest version of macOS available. This maps well to the existing `--force-bottle` argument so it will now act as if the latest bottle has a `or_later` ending.
798 lines
53 KiB
HTML
798 lines
53 KiB
HTML
<div class='mp'>
|
|
<h2 id="NAME">NAME</h2>
|
|
<p class="man-name">
|
|
<code>brew</code> - <span class="man-whatis">The missing package manager for macOS</span>
|
|
</p>
|
|
|
|
<h2 id="SYNOPSIS">SYNOPSIS</h2>
|
|
|
|
<p><code>brew</code> <code>--version</code><br />
|
|
<code>brew</code> <var>command</var> [<code>--verbose</code>|<code>-v</code>] [<var>options</var>] [<var>formula</var>] ...</p>
|
|
|
|
<h2 id="DESCRIPTION">DESCRIPTION</h2>
|
|
|
|
<p>Homebrew is the easiest and most flexible way to install the UNIX tools Apple
|
|
didn't include with macOS.</p>
|
|
|
|
<h2 id="ESSENTIAL-COMMANDS">ESSENTIAL COMMANDS</h2>
|
|
|
|
<p>For the full command list, see the <a href="#COMMANDS" title="COMMANDS" data-bare-link="true">COMMANDS</a> section.</p>
|
|
|
|
<p>With <code>--verbose</code> or <code>-v</code>, many commands print extra debugging information. Note that these flags should only appear after a command.</p>
|
|
|
|
<dl>
|
|
<dt><code>install</code> <var>formula</var></dt><dd><p>Install <var>formula</var>.</p></dd>
|
|
<dt><code>remove</code> <var>formula</var></dt><dd><p>Uninstall <var>formula</var>.</p></dd>
|
|
<dt class="flush"><code>update</code></dt><dd><p>Fetch the newest version of Homebrew from GitHub using <code>git</code>(1).</p></dd>
|
|
<dt class="flush"><code>list</code></dt><dd><p>List all installed formulae.</p></dd>
|
|
<dt><code>search</code> <var>text</var>|<code>/</code><var>text</var><code>/</code></dt><dd><p>Perform a substring search of formula names for <var>text</var>. If <var>text</var> is
|
|
surrounded with slashes, then it is interpreted as a regular expression.
|
|
The search for <var>text</var> is extended online to some popular taps.
|
|
If no search term is given, all locally available formulae are listed.</p></dd>
|
|
</dl>
|
|
|
|
|
|
<h2 id="COMMANDS">COMMANDS</h2>
|
|
|
|
<dl>
|
|
<dt><code>analytics</code> [<code>state</code>]</dt><dd><p>Display anonymous user behaviour analytics state.
|
|
Read more at <a href="https://git.io/brew-analytics" data-bare-link="true">https://git.io/brew-analytics</a>.</p></dd>
|
|
<dt><code>analytics</code> (<code>on</code>|<code>off</code>)</dt><dd><p>Turn on/off Homebrew's analytics.</p></dd>
|
|
<dt><code>analytics</code> <code>regenerate-uuid</code></dt><dd><p>Regenerate UUID used in Homebrew's analytics.</p></dd>
|
|
<dt><code>cat</code> <var>formula</var></dt><dd><p>Display the source to <var>formula</var>.</p></dd>
|
|
<dt><code>cleanup</code> [<code>--prune=</code><var>days</var>] [<code>--dry-run</code>] [<code>-s</code>] [<var>formulae</var>]</dt><dd><p>For all installed or specific formulae, remove any older versions from the
|
|
cellar. In addition, old downloads from the Homebrew download-cache are deleted.</p>
|
|
|
|
<p>If <code>--prune=</code><var>days</var> is specified, remove all cache files older than <var>days</var>.</p>
|
|
|
|
<p>If <code>--dry-run</code> or <code>-n</code> is passed, show what would be removed, but do not
|
|
actually remove anything.</p>
|
|
|
|
<p>If <code>-s</code> is passed, scrubs the cache, removing downloads for even the latest
|
|
versions of formulae. Note downloads for any installed formulae will still not be
|
|
deleted. If you want to delete those too: <code>rm -rf $(brew --cache)</code></p></dd>
|
|
<dt><code>command</code> <var>cmd</var></dt><dd><p>Display the path to the file which is used when invoking <code>brew</code> <var>cmd</var>.</p></dd>
|
|
<dt><code>commands</code> [<code>--quiet</code> [<code>--include-aliases</code>]]</dt><dd><p>Show a list of built-in and external commands.</p>
|
|
|
|
<p>If <code>--quiet</code> is passed, list only the names of commands without the header.
|
|
With <code>--include-aliases</code>, the aliases of internal commands will be included.</p></dd>
|
|
<dt class="flush"><code>config</code></dt><dd><p>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.</p></dd>
|
|
<dt><code>deps</code> [<code>--1</code>] [<code>-n</code>] [<code>--union</code>] [<code>--full-name</code>] [<code>--installed</code>] [<code>--include-build</code>] [<code>--include-optional</code>] [<code>--skip-recommended</code>] <var>formulae</var></dt><dd><p>Show dependencies for <var>formulae</var>. When given multiple formula arguments,
|
|
show the intersection of dependencies for <var>formulae</var>.</p>
|
|
|
|
<p>If <code>--1</code> is passed, only show dependencies one level down, instead of
|
|
recursing.</p>
|
|
|
|
<p>If <code>-n</code> is passed, show dependencies in topological order.</p>
|
|
|
|
<p>If <code>--union</code> is passed, show the union of dependencies for <var>formulae</var>,
|
|
instead of the intersection.</p>
|
|
|
|
<p>If <code>--full-name</code> is passed, list dependencies by their full name.</p>
|
|
|
|
<p>If <code>--installed</code> is passed, only list those dependencies that are
|
|
currently installed.</p>
|
|
|
|
<p>By default, <code>deps</code> shows required and recommended dependencies for
|
|
<var>formulae</var>. To include the <code>:build</code> type dependencies, pass <code>--include-build</code>.
|
|
Similarly, pass <code>--include-optional</code> to include <code>:optional</code> dependencies.
|
|
To skip <code>:recommended</code> type dependencies, pass <code>--skip-recommended</code>.</p></dd>
|
|
<dt><code>deps</code> <code>--tree</code> [<var>filters</var>] (<var>formulae</var>|<code>--installed</code>)</dt><dd><p>Show dependencies as a tree. When given multiple formula arguments, output
|
|
individual trees for every formula.</p>
|
|
|
|
<p>If <code>--installed</code> is passed, output a tree for every installed formula.</p>
|
|
|
|
<p>The <var>filters</var> placeholder is any combination of options <code>--include-build</code>,
|
|
<code>--include-optional</code>, and <code>--skip-recommended</code> as documented above.</p></dd>
|
|
<dt><code>deps</code> [<var>filters</var>] (<code>--installed</code>|<code>--all</code>)</dt><dd><p>Show dependencies for installed or all available formulae. Every line of
|
|
output starts with the formula name, followed by a colon and all direct
|
|
dependencies of that formula.</p>
|
|
|
|
<p>The <var>filters</var> placeholder is any combination of options <code>--include-build</code>,
|
|
<code>--include-optional</code>, and <code>--skip-recommended</code> as documented above.</p></dd>
|
|
<dt><code>desc</code> <var>formula</var></dt><dd><p>Display <var>formula</var>'s name and one-line description.</p></dd>
|
|
<dt><code>desc</code> [<code>-s</code>|<code>-n</code>|<code>-d</code>] <var>pattern</var></dt><dd><p>Search both name and description (<code>-s</code>), just the names (<code>-n</code>), or just the
|
|
descriptions (<code>-d</code>) for <code><pattern></code>. <code><pattern></code> is by default interpreted
|
|
as a literal string; if flanked by slashes, it is instead interpreted as a
|
|
regular expression. Formula descriptions are cached; the cache is created on
|
|
the first search, making that search slower than subsequent ones.</p></dd>
|
|
<dt><code>diy</code> [<code>--name=</code><var>name</var>] [<code>--version=</code><var>version</var>]</dt><dd><p>Automatically determine the installation prefix for non-Homebrew software.</p>
|
|
|
|
<p>Using the output from this command, you can install your own software into
|
|
the Cellar and then link it into Homebrew's prefix with <code>brew link</code>.</p>
|
|
|
|
<p>The options <code>--name=</code><var>name</var> and <code>--version=</code><var>version</var> each take an argument
|
|
and allow you to explicitly set the name and version of the package you are
|
|
installing.</p></dd>
|
|
<dt class="flush"><code>doctor</code></dt><dd><p>Check your system for potential problems. Doctor exits with a non-zero status
|
|
if any problems are found.</p></dd>
|
|
<dt><code>fetch</code> [<code>--force</code>] [<code>--retry</code>] [<code>-v</code>] [<code>--devel</code>|<code>--HEAD</code>] [<code>--deps</code>] [<code>--build-from-source</code>|<code>--force-bottle</code>] <var>formulae</var></dt><dd><p>Download the source packages for the given <var>formulae</var>.
|
|
For tarballs, also print SHA-256 checksums.</p>
|
|
|
|
<p>If <code>--HEAD</code> or <code>--devel</code> is passed, fetch that version instead of the
|
|
stable version.</p>
|
|
|
|
<p>If <code>-v</code> is passed, do a verbose VCS checkout, if the URL represents a VCS.
|
|
This is useful for seeing if an existing VCS cache has been updated.</p>
|
|
|
|
<p>If <code>--force</code> is passed, remove a previously cached version and re-fetch.</p>
|
|
|
|
<p>If <code>--retry</code> is passed, retry if a download fails or re-download if the
|
|
checksum of a previously cached version no longer matches.</p>
|
|
|
|
<p>If <code>--deps</code> is passed, also download dependencies for any listed <var>formulae</var>.</p>
|
|
|
|
<p>If <code>--build-from-source</code> is passed, download the source rather than a
|
|
bottle.</p>
|
|
|
|
<p>If <code>--force-bottle</code> is passed, download a bottle if it exists for the
|
|
current or newest version of macOS, even if it would not be used during
|
|
installation.</p></dd>
|
|
<dt><code>gist-logs</code> [<code>--new-issue</code>|<code>-n</code>] <var>formula</var></dt><dd><p>Upload logs for a failed build of <var>formula</var> to a new Gist.</p>
|
|
|
|
<p><var>formula</var> is usually the name of the formula to install, but it can be specified
|
|
in several different ways. See <a href="#SPECIFYING-FORMULAE" title="SPECIFYING FORMULAE" data-bare-link="true">SPECIFYING FORMULAE</a>.</p>
|
|
|
|
<p>If <code>--new-issue</code> is passed, automatically create a new issue in the appropriate
|
|
GitHub repository as well as creating the Gist.</p>
|
|
|
|
<p>If no logs are found, an error message is presented.</p></dd>
|
|
<dt class="flush"><code>home</code></dt><dd><p>Open Homebrew's own homepage in a browser.</p></dd>
|
|
<dt><code>home</code> <var>formula</var></dt><dd><p>Open <var>formula</var>'s homepage in a browser.</p></dd>
|
|
<dt><code>info</code> <var>formula</var></dt><dd><p>Display information about <var>formula</var>.</p></dd>
|
|
<dt><code>info</code> <code>--github</code> <var>formula</var></dt><dd><p>Open a browser to the GitHub History page for formula <var>formula</var>.</p>
|
|
|
|
<p>To view formula history locally: <code>brew log -p <formula></code>.</p></dd>
|
|
<dt><code>info</code> <code>--json=</code><var>version</var> (<code>--all</code>|<code>--installed</code>|<var>formulae</var>)</dt><dd><p>Print a JSON representation of <var>formulae</var>. Currently the only accepted value
|
|
for <var>version</var> is <code>v1</code>.</p>
|
|
|
|
<p>Pass <code>--all</code> to get information on all formulae, or <code>--installed</code> to get
|
|
information on all installed formulae.</p>
|
|
|
|
<p>See the docs for examples of using the JSON:
|
|
<a href="https://github.com/Homebrew/brew/blob/master/docs/Querying-Brew.md" data-bare-link="true">https://github.com/Homebrew/brew/blob/master/docs/Querying-Brew.md</a></p></dd>
|
|
<dt><code>install</code> [<code>--debug</code>] [<code>--env=</code><var>std</var>|<var>super</var>] [<code>--ignore-dependencies</code>] [<code>--only-dependencies</code>] [<code>--cc=</code><var>compiler</var>] [<code>--build-from-source</code>] [<code>--devel</code>|<code>--HEAD</code>] [<code>--keep-tmp</code>] <var>formula</var></dt><dd><p>Install <var>formula</var>.</p>
|
|
|
|
<p><var>formula</var> is usually the name of the formula to install, but it can be specified
|
|
in several different ways. See <a href="#SPECIFYING-FORMULAE" title="SPECIFYING FORMULAE" data-bare-link="true">SPECIFYING FORMULAE</a>.</p>
|
|
|
|
<p>If <code>--debug</code> is passed and brewing fails, open an interactive debugging
|
|
session with access to IRB or a shell inside the temporary build directory.</p>
|
|
|
|
<p>If <code>--env=std</code> is passed, use the standard build environment instead of superenv.</p>
|
|
|
|
<p>If <code>--env=super</code> is passed, use superenv even if the formula specifies the
|
|
standard build environment.</p>
|
|
|
|
<p>If <code>--ignore-dependencies</code> is passed, skip installing any dependencies of
|
|
any kind. If they are not already present, the formula will probably fail
|
|
to install.</p>
|
|
|
|
<p>If <code>--only-dependencies</code> is passed, install the dependencies with specified
|
|
options but do not install the specified formula.</p>
|
|
|
|
<p>If <code>--cc=</code><var>compiler</var> is passed, attempt to compile using <var>compiler</var>.
|
|
<var>compiler</var> should be the name of the compiler's executable, for instance
|
|
<code>gcc-4.2</code> for Apple's GCC 4.2, or <code>gcc-4.9</code> for a Homebrew-provided GCC
|
|
4.9.</p>
|
|
|
|
<p>If <code>--build-from-source</code> or <code>-s</code> is passed, compile the specified <var>formula</var> from
|
|
source even if a bottle is provided. Dependencies will still be installed
|
|
from bottles if they are available.</p>
|
|
|
|
<p>If <code>HOMEBREW_BUILD_FROM_SOURCE</code> is set, regardless of whether <code>--build-from-source</code> was
|
|
passed, then both <var>formula</var> and the dependencies installed as part of this process
|
|
are built from source even if bottles are available.</p>
|
|
|
|
<p>If <code>--force-bottle</code> is passed, install from a bottle if it exists for the
|
|
current or newest version of macOS, even if it would not normally be used
|
|
for installation.</p>
|
|
|
|
<p>If <code>--devel</code> is passed, and <var>formula</var> defines it, install the development version.</p>
|
|
|
|
<p>If <code>--HEAD</code> is passed, and <var>formula</var> defines it, install the HEAD version,
|
|
aka master, trunk, unstable.</p>
|
|
|
|
<p>If <code>--keep-tmp</code> is passed, the temporary files created during installation
|
|
are not deleted.</p>
|
|
|
|
<p>To install a newer version of HEAD use
|
|
<code>brew rm <foo> && brew install --HEAD <foo></code>.</p></dd>
|
|
<dt><code>install</code> <code>--interactive</code> [<code>--git</code>] <var>formula</var></dt><dd><p>Download and patch <var>formula</var>, then open a shell. This allows the user to
|
|
run <code>./configure --help</code> and otherwise determine how to turn the software
|
|
package into a Homebrew formula.</p>
|
|
|
|
<p>If <code>--git</code> is passed, Homebrew will create a Git repository, useful for
|
|
creating patches to the software.</p></dd>
|
|
<dt><code>irb</code> [<code>--examples</code>]</dt><dd><p>Enter the interactive Homebrew Ruby shell.</p>
|
|
|
|
<p>If <code>--examples</code> is passed, several examples will be shown.</p></dd>
|
|
<dt class="flush"><code>leaves</code></dt><dd><p>Show installed formulae that are not dependencies of another installed formula.</p></dd>
|
|
<dt><code>ln</code>, <code>link</code> [<code>--overwrite</code>] [<code>--dry-run</code>] [<code>--force</code>] <var>formula</var></dt><dd><p>Symlink all of <var>formula</var>'s installed files into the Homebrew prefix. This
|
|
is done automatically when you install formulae but can be useful for DIY
|
|
installations.</p>
|
|
|
|
<p>If <code>--overwrite</code> is passed, Homebrew will delete files which already exist in
|
|
the prefix while linking.</p>
|
|
|
|
<p>If <code>--dry-run</code> or <code>-n</code> is passed, Homebrew will list all files which would
|
|
be linked or which would be deleted by <code>brew link --overwrite</code>, but will not
|
|
actually link or delete any files.</p>
|
|
|
|
<p>If <code>--force</code> is passed, Homebrew will allow keg-only formulae to be linked.</p></dd>
|
|
<dt><code>linkapps</code> [<code>--local</code>] [<var>formulae</var>]</dt><dd><p>Find installed formulae that provide <code>.app</code>-style macOS apps and symlink them
|
|
into <code>/Applications</code>, allowing for easier access.</p>
|
|
|
|
<p>If no <var>formulae</var> are provided, all of them will have their apps symlinked.</p>
|
|
|
|
<p>If provided, <code>--local</code> will symlink them into the user's <code>~/Applications</code>
|
|
directory instead of the system directory.</p></dd>
|
|
<dt><code>list</code>, <code>ls</code> [<code>--full-name</code>]</dt><dd><p>List all installed formulae. If <code>--full-name</code> is passed, print formulae
|
|
with fully-qualified names. If <code>--full-name</code> is not passed, any other
|
|
options (e.g. <code>-t</code>) are passed to <code>ls</code> which produces the actual output.</p></dd>
|
|
<dt><code>list</code>, <code>ls</code> <code>--unbrewed</code></dt><dd><p>List all files in the Homebrew prefix not installed by Homebrew.</p></dd>
|
|
<dt><code>list</code>, <code>ls</code> [<code>--versions</code> [<code>--multiple</code>]] [<code>--pinned</code>] [<var>formulae</var>]</dt><dd><p>List the installed files for <var>formulae</var>. Combined with <code>--verbose</code>, recursively
|
|
list the contents of all subdirectories in each <var>formula</var>'s keg.</p>
|
|
|
|
<p>If <code>--versions</code> is passed, show the version number for installed formulae,
|
|
or only the specified formulae if <var>formulae</var> are given. With <code>--multiple</code>,
|
|
only show formulae with multiple versions installed.</p>
|
|
|
|
<p>If <code>--pinned</code> is passed, show the versions of pinned formulae, or only the
|
|
specified (pinned) formulae if <var>formulae</var> are given.
|
|
See also <code>pin</code>, <code>unpin</code>.</p></dd>
|
|
<dt><code>log</code> [<var>git-log-options</var>] <var>formula</var> ...</dt><dd><p>Show the git log for the given formulae. Options that <code>git-log</code>(1)
|
|
recognizes can be passed before the formula list.</p></dd>
|
|
<dt><code>migrate</code> [<code>--force</code>] <var>formulae</var></dt><dd><p>Migrate renamed packages to new name, where <var>formulae</var> are old names of
|
|
packages.</p>
|
|
|
|
<p>If <code>--force</code> is passed, then treat installed <var>formulae</var> and passed <var>formulae</var>
|
|
like if they are from same taps and migrate them anyway.</p></dd>
|
|
<dt><code>missing</code> [<code>--hide=</code><var>hidden</var>] [<var>formulae</var>]</dt><dd><p>Check the given <var>formulae</var> for missing dependencies. If no <var>formulae</var> are
|
|
given, check all installed brews.</p>
|
|
|
|
<p>If <code>--hide=</code><var>hidden</var> is passed, act as if none of <var>hidden</var> are installed.
|
|
<var>hidden</var> should be a comma-separated list of formulae.</p></dd>
|
|
<dt><code>options</code> [<code>--compact</code>] (<code>--all</code>|<code>--installed</code>|<var>formulae</var>)</dt><dd><p>Display install options specific to <var>formulae</var>.</p>
|
|
|
|
<p>If <code>--compact</code> is passed, show all options on a single line separated by
|
|
spaces.</p>
|
|
|
|
<p>If <code>--all</code> is passed, show options for all formulae.</p>
|
|
|
|
<p>If <code>--installed</code> is passed, show options for all installed formulae.</p></dd>
|
|
<dt><code>outdated</code> [<code>--quiet</code>|<code>--verbose</code>|<code>--json=v1</code>] [<code>--fetch-HEAD</code>]</dt><dd><p>Show formulae that have an updated version available.</p>
|
|
|
|
<p>By default, version information is displayed in interactive shells, and
|
|
suppressed otherwise.</p>
|
|
|
|
<p>If <code>--quiet</code> is passed, list only the names of outdated brews (takes
|
|
precedence over <code>--verbose</code>).</p>
|
|
|
|
<p>If <code>--verbose</code> is passed, display detailed version information.</p>
|
|
|
|
<p>If <code>--json=</code><var>version</var> is passed, the output will be in JSON format. The only
|
|
valid version is <code>v1</code>.</p>
|
|
|
|
<p>If <code>--fetch-HEAD</code> is passed, fetch the upstream repository to detect if
|
|
the HEAD installation of the formula is outdated. Otherwise, the
|
|
repository's HEAD will be checked for updates when a new stable or devel
|
|
version has been released.</p></dd>
|
|
<dt><code>pin</code> <var>formulae</var></dt><dd><p>Pin the specified <var>formulae</var>, preventing them from being upgraded when
|
|
issuing the <code>brew upgrade</code> command. See also <code>unpin</code>.</p></dd>
|
|
<dt><code>postinstall</code> <var>formula</var></dt><dd><p>Rerun the post-install steps for <var>formula</var>.</p></dd>
|
|
<dt><code>prune</code> [<code>--dry-run</code>]</dt><dd><p>Remove dead symlinks from the Homebrew prefix. This is generally not
|
|
needed, but can be useful when doing DIY installations. Also remove broken
|
|
app symlinks from <code>/Applications</code> and <code>~/Applications</code> that were previously
|
|
created by <code>brew linkapps</code>.</p>
|
|
|
|
<p>If <code>--dry-run</code> or <code>-n</code> is passed, show what would be removed, but do not
|
|
actually remove anything.</p></dd>
|
|
<dt><code>reinstall</code> <var>formula</var></dt><dd><p>Uninstall and then install <var>formula</var>.</p></dd>
|
|
<dt><code>search</code>, <code>-S</code></dt><dd><p>Display all locally available formulae for brewing (including tapped ones).
|
|
No online search is performed if called without arguments.</p></dd>
|
|
<dt><code>search</code> [<code>--desc</code>] <var>text</var>|<code>/</code><var>text</var><code>/</code></dt><dd><p>Perform a substring search of formula names for <var>text</var>. If <var>text</var> is
|
|
surrounded with slashes, then it is interpreted as a regular expression.
|
|
The search for <var>text</var> is extended online to some popular taps.</p>
|
|
|
|
<p>If <code>--desc</code> is passed, browse available packages matching <var>text</var> including a
|
|
description for each.</p></dd>
|
|
<dt><code>search</code> (<code>--debian</code>|<code>--fedora</code>|<code>--fink</code>|<code>--macports</code>|<code>--opensuse</code>|<code>--ubuntu</code>) <var>text</var></dt><dd><p>Search for <var>text</var> in the given package manager's list.</p></dd>
|
|
<dt><code>sh</code> [<code>--env=std</code>]</dt><dd><p>Instantiate a Homebrew build environment. Uses our years-battle-hardened
|
|
Homebrew build logic to help your <code>./configure && make && make install</code>
|
|
or even your <code>gem install</code> succeed. Especially handy if you run Homebrew
|
|
in an Xcode-only configuration since it adds tools like <code>make</code> to your <code>PATH</code>
|
|
which otherwise build-systems would not find.</p></dd>
|
|
<dt><code>style</code> [<code>--fix</code>] [<code>--display-cop-names</code>] [<var>files</var>|<var>taps</var>|<var>formulae</var>]</dt><dd><p>Check formulae or files for conformance to Homebrew style guidelines.</p>
|
|
|
|
<p><var>formulae</var> and <var>files</var> may not be combined. If both are omitted, style will run
|
|
style checks on the whole Homebrew <code>Library</code>, including core code and all
|
|
formulae.</p>
|
|
|
|
<p>If <code>--fix</code> is passed, style violations will be automatically fixed using
|
|
RuboCop's <code>--auto-correct</code> feature.</p>
|
|
|
|
<p>If <code>--display-cop-names</code> is passed, the RuboCop cop name for each violation
|
|
is included in the output.</p>
|
|
|
|
<p>Exits with a non-zero status if any style violations are found.</p></dd>
|
|
<dt><code>switch</code> <var>name</var> <var>version</var></dt><dd><p>Symlink all of the specific <var>version</var> of <var>name</var>'s install to Homebrew prefix.</p></dd>
|
|
<dt class="flush"><code>tap</code></dt><dd><p>List all installed taps.</p></dd>
|
|
<dt><code>tap</code> [<code>--full</code>] <var>user</var><code>/</code><var>repo</var> [<var>URL</var>]</dt><dd><p>Tap a formula repository.</p>
|
|
|
|
<p>With <var>URL</var> unspecified, taps a formula repository from GitHub using HTTPS.
|
|
Since so many taps are hosted on GitHub, this command is a shortcut for
|
|
<code>tap <user>/<repo> https://github.com/<user>/homebrew-<repo></code>.</p>
|
|
|
|
<p>With <var>URL</var> specified, taps a formula repository from anywhere, using
|
|
any transport protocol that <code>git</code> handles. The one-argument form of <code>tap</code>
|
|
simplifies but also limits. This two-argument command makes no
|
|
assumptions, so taps can be cloned from places other than GitHub and
|
|
using protocols other than HTTPS, e.g., SSH, GIT, HTTP, FTP(S), RSYNC.</p>
|
|
|
|
<p>By default, the repository is cloned as a shallow copy (<code>--depth=1</code>), but
|
|
if <code>--full</code> is passed, a full clone will be used. To convert a shallow copy
|
|
to a full copy, you can retap passing <code>--full</code> without first untapping.</p>
|
|
|
|
<p><code>tap</code> is re-runnable and exits successfully if there's nothing to do.
|
|
However, retapping with a different <var>URL</var> will cause an exception, so first
|
|
<code>untap</code> if you need to modify the <var>URL</var>.</p></dd>
|
|
<dt><code>tap</code> <code>--repair</code></dt><dd><p>Migrate tapped formulae from symlink-based to directory-based structure.</p></dd>
|
|
<dt><code>tap</code> <code>--list-official</code></dt><dd><p>List all official taps.</p></dd>
|
|
<dt><code>tap</code> <code>--list-pinned</code></dt><dd><p>List all pinned taps.</p></dd>
|
|
<dt><code>tap-info</code></dt><dd><p>Display a brief summary of all installed taps.</p></dd>
|
|
<dt><code>tap-info</code> (<code>--installed</code>|<var>taps</var>)</dt><dd><p>Display detailed information about one or more <var>taps</var>.</p>
|
|
|
|
<p>Pass <code>--installed</code> to display information on all installed taps.</p></dd>
|
|
<dt><code>tap-info</code> <code>--json=</code><var>version</var> (<code>--installed</code>|<var>taps</var>)</dt><dd><p>Print a JSON representation of <var>taps</var>. Currently the only accepted value
|
|
for <var>version</var> is <code>v1</code>.</p>
|
|
|
|
<p>Pass <code>--installed</code> to get information on installed taps.</p>
|
|
|
|
<p>See the docs for examples of using the JSON:
|
|
<a href="https://github.com/Homebrew/brew/blob/master/docs/Querying-Brew.md" data-bare-link="true">https://github.com/Homebrew/brew/blob/master/docs/Querying-Brew.md</a></p></dd>
|
|
<dt><code>tap-pin</code> <var>tap</var></dt><dd><p>Pin <var>tap</var>, prioritizing its formulae over core when formula names are supplied
|
|
by the user. See also <code>tap-unpin</code>.</p></dd>
|
|
<dt><code>tap-unpin</code> <var>tap</var></dt><dd><p>Unpin <var>tap</var> so its formulae are no longer prioritized. See also <code>tap-pin</code>.</p></dd>
|
|
<dt><code>uninstall</code>, <code>rm</code>, <code>remove</code> [<code>--force</code>] [<code>--ignore-dependencies</code>] <var>formula</var></dt><dd><p>Uninstall <var>formula</var>.</p>
|
|
|
|
<p>If <code>--force</code> is passed, and there are multiple versions of <var>formula</var>
|
|
installed, delete all installed versions.</p>
|
|
|
|
<p>If <code>--ignore-dependencies</code> is passed, uninstalling won't fail, even if
|
|
formulae depending on <var>formula</var> would still be installed.</p></dd>
|
|
<dt><code>unlink</code> [<code>--dry-run</code>] <var>formula</var></dt><dd><p>Remove symlinks for <var>formula</var> from the Homebrew prefix. This can be useful
|
|
for temporarily disabling a formula:
|
|
<code>brew unlink foo && commands && brew link foo</code>.</p>
|
|
|
|
<p>If <code>--dry-run</code> or <code>-n</code> is passed, Homebrew will list all files which would
|
|
be unlinked, but will not actually unlink or delete any files.</p></dd>
|
|
<dt><code>unlinkapps</code> [<code>--local</code>] [<code>--dry-run</code>] [<var>formulae</var>]</dt><dd><p>Remove symlinks created by <code>brew linkapps</code> from <code>/Applications</code>.</p>
|
|
|
|
<p>If no <var>formulae</var> are provided, all linked apps will be removed.</p>
|
|
|
|
<p>If provided, <code>--local</code> will remove symlinks from the user's <code>~/Applications</code>
|
|
directory instead of the system directory.</p>
|
|
|
|
<p>If <code>--dry-run</code> or <code>-n</code> is passed, Homebrew will list all symlinks which
|
|
would be removed, but will not actually delete any files.</p></dd>
|
|
<dt><code>unpack</code> [<code>--git</code>|<code>--patch</code>] [<code>--destdir=</code><var>path</var>] <var>formulae</var></dt><dd><p>Unpack the source files for <var>formulae</var> into subdirectories of the current
|
|
working directory. If <code>--destdir=</code><var>path</var> is given, the subdirectories will
|
|
be created in the directory named by <code><path></code> instead.</p>
|
|
|
|
<p>If <code>--patch</code> is passed, patches for <var>formulae</var> will be applied to the
|
|
unpacked source.</p>
|
|
|
|
<p>If <code>--git</code> is passed, a Git repository will be initialized in the unpacked
|
|
source. This is useful for creating patches for the software.</p></dd>
|
|
<dt><code>unpin</code> <var>formulae</var></dt><dd><p>Unpin <var>formulae</var>, allowing them to be upgraded by <code>brew upgrade</code>. See also
|
|
<code>pin</code>.</p></dd>
|
|
<dt><code>untap</code> <var>tap</var></dt><dd><p>Remove a tapped repository.</p></dd>
|
|
<dt><code>update</code> [<code>--merge</code>] [<code>--force</code>]</dt><dd><p>Fetch the newest version of Homebrew and all formulae from GitHub using
|
|
<code>git</code>(1).</p>
|
|
|
|
<p>If <code>--merge</code> is specified then <code>git merge</code> is used to include updates
|
|
(rather than <code>git rebase</code>).</p>
|
|
|
|
<p>If <code>--force</code> is specified then always do a slower, full update check even
|
|
if unnecessary.</p></dd>
|
|
<dt><code>upgrade</code> [<var>install-options</var>] [<code>--cleanup</code>] [<code>--fetch-HEAD</code>] [<var>formulae</var>]</dt><dd><p>Upgrade outdated, unpinned brews.</p>
|
|
|
|
<p>Options for the <code>install</code> command are also valid here.</p>
|
|
|
|
<p>If <code>--cleanup</code> is specified then remove previously installed <var>formula</var> version(s).</p>
|
|
|
|
<p>If <code>--fetch-HEAD</code> is passed, fetch the upstream repository to detect if
|
|
the HEAD installation of the formula is outdated. Otherwise, the
|
|
repository's HEAD will be checked for updates when a new stable or devel
|
|
version has been released.</p>
|
|
|
|
<p>If <var>formulae</var> are given, upgrade only the specified brews (but do so even
|
|
if they are pinned; see <code>pin</code>, <code>unpin</code>).</p></dd>
|
|
<dt><code>uses</code> [<code>--installed</code>] [<code>--recursive</code>] [<code>--include-build</code>] [<code>--include-optional</code>] [<code>--skip-recommended</code>] [<code>--devel</code>|<code>--HEAD</code>] <var>formulae</var></dt><dd><p>Show the formulae that specify <var>formulae</var> as a dependency. When given
|
|
multiple formula arguments, show the intersection of formulae that use
|
|
<var>formulae</var>.</p>
|
|
|
|
<p>Use <code>--recursive</code> to resolve more than one level of dependencies.</p>
|
|
|
|
<p>If <code>--installed</code> is passed, only list installed formulae.</p>
|
|
|
|
<p>By default, <code>uses</code> shows all formulae that specify <var>formulae</var> as a required
|
|
or recommended dependency. To include the <code>:build</code> type dependencies, pass
|
|
<code>--include-build</code>. Similarly, pass <code>--include-optional</code> to include <code>:optional</code>
|
|
dependencies. To skip <code>:recommended</code> type dependencies, pass <code>--skip-recommended</code>.</p>
|
|
|
|
<p>By default, <code>uses</code> shows usages of <code>formula</code> by stable builds. To find
|
|
cases where <code>formula</code> is used by development or HEAD build, pass
|
|
<code>--devel</code> or <code>--HEAD</code>.</p></dd>
|
|
<dt class="flush"><code>--cache</code></dt><dd><p>Display Homebrew's download cache. See also <code>HOMEBREW_CACHE</code>.</p></dd>
|
|
<dt><code>--cache</code> <var>formula</var></dt><dd><p>Display the file or directory used to cache <var>formula</var>.</p></dd>
|
|
<dt><code>--cellar</code></dt><dd><p>Display Homebrew's Cellar path. <em>Default:</em> <code>$(brew --prefix)/Cellar</code>, or if
|
|
that directory doesn't exist, <code>$(brew --repository)/Cellar</code>.</p></dd>
|
|
<dt><code>--cellar</code> <var>formula</var></dt><dd><p>Display the location in the cellar where <var>formula</var> would be installed,
|
|
without any sort of versioned directory as the last path.</p></dd>
|
|
<dt class="flush"><code>--env</code></dt><dd><p>Show a summary of the Homebrew build environment.</p></dd>
|
|
<dt><code>--prefix</code></dt><dd><p>Display Homebrew's install path. <em>Default:</em> <code>/usr/local</code></p></dd>
|
|
<dt><code>--prefix</code> <var>formula</var></dt><dd><p>Display the location in the cellar where <var>formula</var> is or would be installed.</p></dd>
|
|
<dt><code>--repository</code></dt><dd><p>Display where Homebrew's <code>.git</code> directory is located. For standard installs,
|
|
the <code>prefix</code> and <code>repository</code> are the same directory.</p></dd>
|
|
<dt><code>--repository</code> <var>user</var><code>/</code><var>repo</var></dt><dd><p>Display where tap <var>user</var><code>/</code><var>repo</var>'s directory is located.</p></dd>
|
|
<dt><code>--version</code></dt><dd><p>Print the version number of Homebrew to standard output and exit.</p></dd>
|
|
</dl>
|
|
|
|
|
|
<h2 id="DEVELOPER-COMMANDS">DEVELOPER COMMANDS</h2>
|
|
|
|
<dl>
|
|
<dt><code>audit</code> [<code>--strict</code>] [<code>--online</code>] [<code>--new-formula</code>] [<code>--display-cop-names</code>] [<code>--display-filename</code>] [<var>formulae</var>]</dt><dd><p>Check <var>formulae</var> for Homebrew coding style violations. This should be
|
|
run before submitting a new formula.</p>
|
|
|
|
<p>If no <var>formulae</var> are provided, all of them are checked.</p>
|
|
|
|
<p>If <code>--strict</code> is passed, additional checks are run, including RuboCop
|
|
style checks.</p>
|
|
|
|
<p>If <code>--online</code> is passed, additional slower checks that require a network
|
|
connection are run.</p>
|
|
|
|
<p>If <code>--new-formula</code> is passed, various additional checks are run that check
|
|
if a new formula is eligible for Homebrew. This should be used when creating
|
|
new formulae and implies <code>--strict</code> and <code>--online</code>.</p>
|
|
|
|
<p>If <code>--display-cop-names</code> is passed, the RuboCop cop name for each violation
|
|
is included in the output.</p>
|
|
|
|
<p>If <code>--display-filename</code> is passed, every line of output is prefixed with the
|
|
name of the file or formula being audited, to make the output easy to grep.</p>
|
|
|
|
<p><code>audit</code> exits with a non-zero status if any errors are found. This is useful,
|
|
for instance, for implementing pre-commit hooks.</p></dd>
|
|
<dt><code>bottle</code> [<code>--verbose</code>] [<code>--no-rebuild</code>] [<code>--keep-old</code>] [<code>--skip-relocation</code>] [<code>--root-url=<root_url></code>] [<code>--force-core-tap</code>]:</dt><dd><p></p></dd>
|
|
<dt><code>bottle</code> <code>--merge</code> [<code>--no-commit</code>] [<code>--keep-old</code>] [<code>--write</code>]:</dt><dd><p></p>
|
|
|
|
<p>Generate a bottle (binary package) from a formula installed with
|
|
<code>--build-bottle</code>.</p></dd>
|
|
<dt><code>bump-formula-pr</code> [<code>--devel</code>] [<code>--dry-run</code>] [<code>--audit</code>|<code>--strict</code>] [<code>--message=</code><var>message</var>] <code>--url=</code><var>url</var> <code>--sha256=</code><var>sha-256</var> <var>formula</var>:</dt><dd><p></p></dd>
|
|
<dt><code>bump-formula-pr</code> [<code>--devel</code>] [<code>--dry-run</code>] [<code>--audit</code>|<code>--strict</code>] [<code>--message=</code><var>message</var>] <code>--tag=</code><var>tag</var> <code>--revision=</code><var>revision</var> <var>formula</var></dt><dd><p>Creates a pull request to update the formula with a new url or a new tag.</p>
|
|
|
|
<p>If a <var>url</var> is specified, the <var>sha-256</var> checksum of the new download must
|
|
also be specified. A best effort to determine the <var>sha-256</var> and <var>formula</var>
|
|
name will be made if either or both values are not supplied by the user.</p>
|
|
|
|
<p>If a <var>tag</var> is specified, the git commit <var>revision</var> corresponding to that
|
|
tag must also be specified.</p>
|
|
|
|
<p>If <code>--devel</code> is passed, bump the development rather than stable version.
|
|
The development spec must already exist.</p>
|
|
|
|
<p>If <code>--dry-run</code> is passed, print what would be done rather than doing it.</p>
|
|
|
|
<p>If <code>--write</code> is passed along with <code>--dry-run</code>, perform a not-so-dry run
|
|
making the expected file modifications but not taking any git actions.</p>
|
|
|
|
<p>If <code>--audit</code> is passed, run <code>brew audit</code> before opening the PR.</p>
|
|
|
|
<p>If <code>--strict</code> is passed, run <code>brew audit --strict</code> before opening the PR.</p>
|
|
|
|
<p>If <code>--mirror=</code><var>url</var> is passed, use the value as a mirror url.</p>
|
|
|
|
<p>If <code>--version=</code><var>version</var> is passed, use the value to override the value
|
|
parsed from the url or tag. Note that <code>--version=0</code> can be used to delete
|
|
an existing <code>version</code> override from a formula if it has become redundant.</p>
|
|
|
|
<p>If <code>--message=</code><var>message</var> is passed, append <var>message</var> to the default PR
|
|
message.</p>
|
|
|
|
<p>Note that this command cannot be used to transition a formula from a
|
|
url-and-sha256 style specification into a tag-and-revision style
|
|
specification, nor vice versa. It must use whichever style specification
|
|
the preexisting formula already uses.</p></dd>
|
|
<dt><code>create</code> <var>URL</var> [<code>--autotools</code>|<code>--cmake</code>|<code>--meson</code>] [<code>--no-fetch</code>] [<code>--set-name</code> <var>name</var>] [<code>--set-version</code> <var>version</var>] [<code>--tap</code> <var>user</var><code>/</code><var>repo</var>]</dt><dd><p>Generate a formula for the downloadable file at <var>URL</var> and open it in the editor.
|
|
Homebrew will attempt to automatically derive the formula name
|
|
and version, but if it fails, you'll have to make your own template. The <code>wget</code>
|
|
formula serves as a simple example. For the complete API have a look at</p>
|
|
|
|
<p><a href="http://www.rubydoc.info/github/Homebrew/brew/master/Formula" data-bare-link="true">http://www.rubydoc.info/github/Homebrew/brew/master/Formula</a></p>
|
|
|
|
<p>If <code>--autotools</code> is passed, create a basic template for an Autotools-style build.
|
|
If <code>--cmake</code> is passed, create a basic template for a CMake-style build.
|
|
If <code>--meson</code> is passed, create a basic template for a Meson-style build.</p>
|
|
|
|
<p>If <code>--no-fetch</code> is passed, Homebrew will not download <var>URL</var> to the cache and
|
|
will thus not add the SHA256 to the formula for you.</p>
|
|
|
|
<p>The options <code>--set-name</code> and <code>--set-version</code> each take an argument and allow
|
|
you to explicitly set the name and version of the package you are creating.</p>
|
|
|
|
<p>The option <code>--tap</code> takes a tap as its argument and generates the formula in
|
|
the specified tap.</p></dd>
|
|
<dt class="flush"><code>edit</code></dt><dd><p>Open all of Homebrew for editing.</p></dd>
|
|
<dt><code>edit</code> <var>formula</var></dt><dd><p>Open <var>formula</var> in the editor.</p></dd>
|
|
<dt><code>linkage</code> [<code>--test</code>] [<code>--reverse</code>] <var>formula-name</var></dt><dd><p>Checks the library links of an installed formula.</p>
|
|
|
|
<p>Only works on installed formulae. An error is raised if it is run on
|
|
uninstalled formulae.</p>
|
|
|
|
<p>If <code>--test</code> is passed, only display missing libraries and exit with a
|
|
non-zero exit code if any missing libraries were found.</p>
|
|
|
|
<p>If <code>--reverse</code> is passed, print the dylib followed by the binaries
|
|
which link to it for each library the keg references.</p></dd>
|
|
<dt><code>man</code> [<code>--fail-if-changed</code>]</dt><dd><p>Generate Homebrew's manpages.</p>
|
|
|
|
<p>If <code>--fail-if-changed</code> is passed, the command will return a failing
|
|
status code if changes are detected in the manpage outputs.
|
|
This can be used for CI to be notified when the manpages are out of date.
|
|
Additionally, the date used in new manpages will match those in the existing
|
|
manpages (to allow comparison without factoring in the date).</p></dd>
|
|
</dl>
|
|
|
|
|
|
<p> <code>pull</code> [<code>--bottle</code>] [<code>--bump</code>] [<code>--clean</code>] [<code>--ignore-whitespace</code>] [<code>--resolve</code>] [<code>--branch-okay</code>] [<code>--no-pbcopy</code>] [<code>--no-publish</code>] <var>patch-source</var> [<var>patch-source</var>]</p>
|
|
|
|
<pre><code>Gets a patch from a GitHub commit or pull request and applies it to Homebrew.
|
|
Optionally, installs the formulae changed by the patch.
|
|
|
|
Each <patch-source> may be one of:
|
|
* The ID number of a PR (Pull Request) in the homebrew/core GitHub
|
|
repository
|
|
* The URL of a PR on GitHub, using either the web page or API URL
|
|
formats. In this form, the PR may be on Homebrew/brew,
|
|
Homebrew/homebrew-core or any tap.
|
|
* The URL of a commit on GitHub
|
|
* A "http://bot.brew.sh/job/..." string specifying a testing job ID
|
|
</code></pre>
|
|
|
|
<p> If <code>--bottle</code> was passed, handle bottles, pulling the bottle-update
|
|
commit and publishing files on Bintray.
|
|
If <code>--bump</code> was passed, for one-formula PRs, automatically reword
|
|
commit message to our preferred format.
|
|
If <code>--clean</code> was passed, do not rewrite or otherwise modify the
|
|
commits found in the pulled PR.
|
|
If <code>--ignore-whitespace</code> was passed, silently ignore whitespace
|
|
discrepancies when applying diffs.
|
|
If <code>--resolve</code> was passed, when a patch fails to apply, leave in
|
|
progress and allow user to
|
|
resolve, instead of aborting.
|
|
If <code>--branch-okay</code> was passed, do not warn if pulling to a branch
|
|
besides master (useful for testing).
|
|
If <code>--no-pbcopy</code> was passed, do not copy anything to the system
|
|
If <code>--no-publish</code> was passed, do not publish bottles to Bintray.</p>
|
|
|
|
<dl>
|
|
<dt><code>release-notes</code> [<var>previous_tag</var>] [<var>end_ref</var>]</dt><dd><p>Output the merged pull requests on Homebrew/brew between two Git refs.
|
|
If no <code>previous_tag</code> is provided it defaults to the newest tag.
|
|
If no <code>end_ref</code> is provided it defaults to <code>origin/master</code>.</p>
|
|
|
|
<p>If <code>--markdown</code> is passed, output as a Markdown list.</p></dd>
|
|
<dt><code>tap-new</code> <var>user</var><code>/</code><var>repo</var></dt><dd><p>Generate the template files for a new tap.</p></dd>
|
|
<dt><code>test</code> [<code>--devel</code>|<code>--HEAD</code>] [<code>--debug</code>] [<code>--keep-tmp</code>] <var>formula</var></dt><dd><p>Most formulae provide a test method. <code>brew test</code> <var>formula</var> 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.</p>
|
|
|
|
<p>To test the development or head version of a formula, use <code>--devel</code> or
|
|
<code>--HEAD</code>.</p>
|
|
|
|
<p>If <code>--debug</code> is passed and the test fails, an interactive debugger will be
|
|
launched with access to IRB or a shell inside the temporary test directory.</p>
|
|
|
|
<p>If <code>--keep-tmp</code> is passed, the temporary files created for the test are
|
|
not deleted.</p>
|
|
|
|
<p>Example: <code>brew install jruby && brew test jruby</code></p></dd>
|
|
<dt><code>tests</code> [<code>-v</code>] [<code>--coverage</code>] [<code>--generic</code>] [<code>--no-compat</code>] [<code>--only=</code><test_script/test_method>] [<code>--seed</code> <var>seed</var>] [<code>--trace</code>] [<code>--online</code>] [<code>--official-cmd-taps</code>]</dt><dd><p>Run Homebrew's unit and integration tests.</p></dd>
|
|
<dt><code>update-test</code> [<code>--commit=<commit></code>] [<code>--before=<date></code>] [<code>--keep-tmp</code>]</dt><dd><p>Runs a test of <code>brew update</code> with a new repository clone.</p>
|
|
|
|
<p>If no arguments are passed, use <code>origin/master</code> as the start commit.</p>
|
|
|
|
<p>If <code>--commit=<commit></code> is passed, use <code><commit></code> as the start commit.</p>
|
|
|
|
<p>If <code>--before=<date></code> is passed, use the commit at <code><date></code> as the
|
|
start commit.</p>
|
|
|
|
<p>If <code>--to-tag</code> is passed, set HOMEBREW_UPDATE_TO_TAG to test updating
|
|
between tags.</p>
|
|
|
|
<p>If <code>--keep-tmp</code> is passed, retain the temporary directory containing
|
|
the new repository clone.</p></dd>
|
|
</dl>
|
|
|
|
|
|
<h2 id="OFFICIAL-EXTERNAL-COMMANDS">OFFICIAL EXTERNAL COMMANDS</h2>
|
|
|
|
<dl>
|
|
<dt class="flush"><code>bundle</code></dt><dd><p>Bundler for non-Ruby dependencies from Homebrew:
|
|
<a href="https://github.com/Homebrew/homebrew-bundle" data-bare-link="true">https://github.com/Homebrew/homebrew-bundle</a></p></dd>
|
|
<dt class="flush"><code>cask</code></dt><dd><p>Install macOS applications distributed as binaries:
|
|
<a href="https://github.com/caskroom/homebrew-cask" data-bare-link="true">https://github.com/caskroom/homebrew-cask</a></p></dd>
|
|
<dt><code>services</code></dt><dd><p>Integrates Homebrew formulae with macOS's <code>launchctl</code> manager:
|
|
<a href="https://github.com/Homebrew/homebrew-services" data-bare-link="true">https://github.com/Homebrew/homebrew-services</a></p></dd>
|
|
</dl>
|
|
|
|
|
|
<h2 id="CUSTOM-EXTERNAL-COMMANDS">CUSTOM EXTERNAL COMMANDS</h2>
|
|
|
|
<p>Homebrew, like <code>git</code>(1), supports external commands. These are executable
|
|
scripts that reside somewhere in the <code>PATH</code>, named <code>brew-</code><var>cmdname</var> or
|
|
<code>brew-</code><var>cmdname</var><code>.rb</code>, which can be invoked like <code>brew</code> <var>cmdname</var>. This allows you
|
|
to create your own commands without modifying Homebrew's internals.</p>
|
|
|
|
<p>Instructions for creating your own commands can be found in the docs:
|
|
<a href="https://github.com/Homebrew/brew/blob/master/docs/External-Commands.md" data-bare-link="true">https://github.com/Homebrew/brew/blob/master/docs/External-Commands.md</a></p>
|
|
|
|
<h2 id="SPECIFYING-FORMULAE">SPECIFYING FORMULAE</h2>
|
|
|
|
<p>Many Homebrew commands accept one or more <var>formula</var> arguments. These arguments
|
|
can take several different forms:</p>
|
|
|
|
<dl>
|
|
<dt>The name of a formula</dt><dd><p>e.g. <code>git</code>, <code>node</code>, <code>wget</code>.</p></dd>
|
|
<dt>The fully-qualified name of a tapped formula</dt><dd><p>Sometimes a formula from a tapped repository may conflict with one in
|
|
<code>homebrew/core</code>.
|
|
You can still access these formulae by using a special syntax, e.g.
|
|
<code>homebrew/dupes/vim</code> or <code>homebrew/versions/node4</code>.</p></dd>
|
|
<dt>An arbitrary URL</dt><dd><p>Homebrew can install formulae via URL, e.g.
|
|
<code>https://raw.github.com/Homebrew/homebrew-core/master/Formula/git.rb</code>.
|
|
The formula file will be cached for later use.</p></dd>
|
|
</dl>
|
|
|
|
|
|
<h2 id="ENVIRONMENT">ENVIRONMENT</h2>
|
|
|
|
<dl>
|
|
<dt><code>AWS_ACCESS_KEY_ID</code>, <code>AWS_SECRET_ACCESS_KEY</code></dt><dd><p>When using the <code>S3</code> download strategy, Homebrew will look in
|
|
these variables for access credentials (see
|
|
<a href="https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment" data-bare-link="true">https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment</a>
|
|
to retrieve these access credentials from AWS). If they are not set,
|
|
the <code>S3</code> download strategy will download with a public
|
|
(unsigned) URL.</p></dd>
|
|
<dt class="flush"><code>BROWSER</code></dt><dd><p>If set, and <code>HOMEBREW_BROWSER</code> is not, use <code>BROWSER</code> as the web browser
|
|
when opening project homepages.</p></dd>
|
|
<dt class="flush"><code>EDITOR</code></dt><dd><p>If set, and <code>HOMEBREW_EDITOR</code> and <code>VISUAL</code> are not, use <code>EDITOR</code> as the text editor.</p></dd>
|
|
<dt class="flush"><code>GIT</code></dt><dd><p>When using Git, Homebrew will use <code>GIT</code> if set,
|
|
a Homebrew-built Git if installed, or the system-provided binary.</p>
|
|
|
|
<p>Set this to force Homebrew to use a particular git binary.</p></dd>
|
|
<dt><code>HOMEBREW_BOTTLE_DOMAIN</code></dt><dd><p>If set, instructs Homebrew to use the given URL as a download mirror for bottles.</p></dd>
|
|
<dt><code>HOMEBREW_ARTIFACT_DOMAIN</code></dt><dd><p>If set, instructs Homebrew to use the given URL as a download mirror for bottles and binaries.</p></dd>
|
|
<dt><code>HOMEBREW_AUTO_UPDATE_SECS</code></dt><dd><p>If set, Homebrew will only check for autoupdates once per this seconds interval.</p>
|
|
|
|
<p><em>Default:</em> <code>60</code>.</p></dd>
|
|
<dt><code>HOMEBREW_BROWSER</code></dt><dd><p>If set, uses this setting as the browser when opening project homepages,
|
|
instead of the OS default browser.</p></dd>
|
|
<dt><code>HOMEBREW_BUILD_FROM_SOURCE</code></dt><dd><p>If set, instructs Homebrew to compile from source even when a formula
|
|
provides a bottle. This environment variable is intended for use by
|
|
Homebrew developers. Please do not file issues if you encounter errors when
|
|
using this environment variable.</p></dd>
|
|
<dt><code>HOMEBREW_CACHE</code></dt><dd><p>If set, instructs Homebrew to use the given directory as the download cache.</p>
|
|
|
|
<p><em>Default:</em> <code>~/Library/Caches/Homebrew</code>.</p></dd>
|
|
<dt><code>HOMEBREW_CURL_VERBOSE</code></dt><dd><p>If set, Homebrew will pass <code>--verbose</code> when invoking <code>curl</code>(1).</p></dd>
|
|
<dt><code>HOMEBREW_DEBUG</code></dt><dd><p>If set, any commands that can emit debugging information will do so.</p></dd>
|
|
<dt><code>HOMEBREW_DEBUG_INSTALL</code></dt><dd><p>When <code>brew install -d</code> or <code>brew install -i</code> drops into a shell,
|
|
<code>HOMEBREW_DEBUG_INSTALL</code> will be set to the name of the formula being
|
|
brewed.</p></dd>
|
|
<dt><code>HOMEBREW_DEBUG_PREFIX</code></dt><dd><p>When <code>brew install -d</code> or <code>brew install -i</code> drops into a shell,
|
|
<code>HOMEBREW_DEBUG_PREFIX</code> will be set to the target prefix in the Cellar
|
|
of the formula being brewed.</p></dd>
|
|
<dt><code>HOMEBREW_DEVELOPER</code></dt><dd><p>If set, Homebrew will tweak behaviour to be more relevant for Homebrew
|
|
developers (active or budding) e.g. turning warnings into errors.</p></dd>
|
|
<dt><code>HOMEBREW_EDITOR</code></dt><dd><p>If set, Homebrew will use this editor when editing a single formula, or
|
|
several formulae in the same directory.</p>
|
|
|
|
<p><em>Note:</em> <code>brew edit</code> 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.</p></dd>
|
|
<dt><code>HOMEBREW_FORCE_VENDOR_RUBY</code></dt><dd><p>If set, Homebrew will always use its vendored, relocatable Ruby 2.0 version
|
|
even if the system version of Ruby is >=2.0.</p></dd>
|
|
<dt><code>HOMEBREW_GITHUB_API_TOKEN</code></dt><dd><p>A personal access token for the GitHub API, which you can create at
|
|
<a href="https://github.com/settings/tokens" data-bare-link="true">https://github.com/settings/tokens</a>. If set, GitHub will allow you a
|
|
greater number of API requests. See
|
|
<a href="https://developer.github.com/v3/#rate-limiting" data-bare-link="true">https://developer.github.com/v3/#rate-limiting</a> for more information.
|
|
Homebrew uses the GitHub API for features such as <code>brew search</code>.</p>
|
|
|
|
<p><em>Note:</em> Homebrew doesn't require permissions for any of the scopes.</p></dd>
|
|
<dt><code>HOMEBREW_LOGS</code></dt><dd><p>If set, Homebrew will use the given directory to store log files.</p></dd>
|
|
<dt><code>HOMEBREW_MAKE_JOBS</code></dt><dd><p>If set, instructs Homebrew to use the value of <code>HOMEBREW_MAKE_JOBS</code> as
|
|
the number of parallel jobs to run when building with <code>make</code>(1).</p>
|
|
|
|
<p><em>Default:</em> the number of available CPU cores.</p></dd>
|
|
<dt><code>HOMEBREW_NO_ANALYTICS</code></dt><dd><p>If set, Homebrew will not send analytics. See: <a href="https://github.com/Homebrew/brew/blob/master/docs/Analytics.md#analytics" data-bare-link="true">https://github.com/Homebrew/brew/blob/master/docs/Analytics.md#analytics</a></p></dd>
|
|
<dt><code>HOMEBREW_NO_AUTO_UPDATE</code></dt><dd><p>If set, Homebrew will not auto-update before running <code>brew install</code>,
|
|
<code>brew upgrade</code> or <code>brew tap</code>.</p></dd>
|
|
<dt><code>HOMEBREW_NO_EMOJI</code></dt><dd><p>If set, Homebrew will not print the <code>HOMEBREW_INSTALL_BADGE</code> on a
|
|
successful build.</p>
|
|
|
|
<p><em>Note:</em> Homebrew will only try to print emoji on Lion or newer.</p></dd>
|
|
<dt><code>HOMEBREW_NO_INSECURE_REDIRECT</code></dt><dd><p>If set, Homebrew will not permit redirects from secure HTTPS
|
|
to insecure HTTP.</p>
|
|
|
|
<p>While ensuring your downloads are fully secure, this is likely
|
|
to cause from-source Sourceforge, some GNU & GNOME based
|
|
formulae to fail to download.</p></dd>
|
|
<dt><code>HOMEBREW_NO_GITHUB_API</code></dt><dd><p>If set, Homebrew will not use the GitHub API for e.g searches or
|
|
fetching relevant issues on a failed install.</p></dd>
|
|
<dt><code>HOMEBREW_INSTALL_BADGE</code></dt><dd><p>Text printed before the installation summary of each successful build.
|
|
Defaults to the beer emoji.</p></dd>
|
|
<dt><code>HOMEBREW_SVN</code></dt><dd><p>When exporting from Subversion, Homebrew will use <code>HOMEBREW_SVN</code> if set,
|
|
a Homebrew-built Subversion if installed, or the system-provided binary.</p>
|
|
|
|
<p>Set this to force Homebrew to use a particular <code>svn</code> binary.</p></dd>
|
|
<dt><code>HOMEBREW_TEMP</code></dt><dd><p>If set, instructs Homebrew to use <code>HOMEBREW_TEMP</code> as the temporary directory
|
|
for building packages. This may be needed if your system temp directory and
|
|
Homebrew Prefix are on different volumes, as macOS has trouble moving
|
|
symlinks across volumes when the target does not yet exist.</p>
|
|
|
|
<p>This issue typically occurs when using FileVault or custom SSD
|
|
configurations.</p></dd>
|
|
<dt><code>HOMEBREW_VERBOSE</code></dt><dd><p>If set, Homebrew always assumes <code>--verbose</code> when running commands.</p></dd>
|
|
<dt class="flush"><code>VISUAL</code></dt><dd><p>If set, and <code>HOMEBREW_EDITOR</code> is not, use <code>VISUAL</code> as the text editor.</p></dd>
|
|
</dl>
|
|
|
|
|
|
<h2 id="USING-HOMEBREW-BEHIND-A-PROXY">USING HOMEBREW BEHIND A PROXY</h2>
|
|
|
|
<p>Homebrew uses several commands for downloading files (e.g. <code>curl</code>, <code>git</code>, <code>svn</code>).
|
|
Many of these tools can download via a proxy. It's common for these tools
|
|
to read proxy parameters from environment variables.</p>
|
|
|
|
<p>For the majority of cases setting <code>http_proxy</code> is enough. You can set this in
|
|
your shell profile, or you can use it before a brew command:</p>
|
|
|
|
<pre><code>http_proxy=http://<host>:<port> brew install foo
|
|
</code></pre>
|
|
|
|
<p>If your proxy requires authentication:</p>
|
|
|
|
<pre><code>http_proxy=http://<user>:<password>@<host>:<port> brew install foo
|
|
</code></pre>
|
|
|
|
<h2 id="SEE-ALSO">SEE ALSO</h2>
|
|
|
|
<p>Homebrew Documentation: <a href="https://github.com/Homebrew/brew/blob/master/docs/" data-bare-link="true">https://github.com/Homebrew/brew/blob/master/docs/</a></p>
|
|
|
|
<p><code>brew-cask</code>(1), <code>git</code>(1), <code>git-log</code>(1)</p>
|
|
|
|
<h2 id="AUTHORS">AUTHORS</h2>
|
|
|
|
<p>Homebrew's lead maintainer is Mike McQuaid.</p>
|
|
|
|
<p>Homebrew's current maintainers are Misty De Meo, Andrew Janke, Xu Cheng, Tomasz Pajor, Josh Hagins, Baptiste Fontaine, Markus Reiter, ilovezfs, Martin Afanasjew, Tom Schoonjans, Uladzislau Shablinski, Tim Smith and Alex Dunn.</p>
|
|
|
|
<p>Former maintainers with significant contributions include Dominyk Tiller, Brett Koonce, Jack Nagel, Adam Vandenberg and Homebrew's creator: Max Howell.</p>
|
|
|
|
<h2 id="BUGS">BUGS</h2>
|
|
|
|
<p>See our issues on GitHub:</p>
|
|
|
|
<ul>
|
|
<li><p>Homebrew/brew <a href="https://github.com/Homebrew/brew/issues" data-bare-link="true">https://github.com/Homebrew/brew/issues</a></p></li>
|
|
<li><p>Homebrew/homebrew-core <a href="https://github.com/Homebrew/homebrew-core/issues" data-bare-link="true">https://github.com/Homebrew/homebrew-core/issues</a></p></li>
|
|
</ul>
|
|
|
|
|
|
</div>
|