brew/docs/Manpage.md

1451 lines
58 KiB
Markdown
Raw Normal View History

brew(1) -- The Missing Package Manager for macOS
================================================
## SYNOPSIS
`brew` `--version`<br>
`brew` *`command`* [`--verbose`|`-v`] [*`options`*] [*`formula`*] ...
## DESCRIPTION
Homebrew is the easiest and most flexible way to install the UNIX tools Apple
didn't include with macOS.
## ESSENTIAL COMMANDS
2017-05-07 00:45:02 +01:00
For the full command list, see the [COMMANDS](#commands) section.
2019-08-20 02:14:09 -04:00
With `--verbose` or `--debug`, many commands print extra debugging information. Note that
these options should only appear after a command.
2019-01-30 21:35:32 +00:00
### `install` *`formula`*:
2019-01-30 21:35:32 +00:00
Install *`formula`*.
2019-08-20 02:14:09 -04:00
*`formula`* is usually the name of the formula to install, but it has other syntaxes which
are listed in the [SPECIFYING FORMULAE](#specifying-formulae) section.
2019-01-30 21:35:32 +00:00
### `uninstall` *`formula`*:
2019-01-30 21:35:32 +00:00
Uninstall *`formula`*.
2019-01-30 21:35:32 +00:00
### `list`:
2019-01-30 21:35:32 +00:00
List all installed formulae.
2019-01-30 21:35:32 +00:00
### `search` (*`text`*|`/`*`text`*`/`):
2019-08-20 02:14:09 -04:00
2019-01-30 21:35:32 +00:00
Perform a substring search of cask tokens and formula names for *`text`*. If *`text`*
2019-08-20 02:14:09 -04:00
is flanked by slashes, it is interpreted as a regular expression.
2019-01-30 21:35:32 +00:00
The search for *`text`* is extended online to `homebrew/core` and `homebrew/cask`.
2019-08-20 02:14:09 -04:00
If no search term is provided, all locally available formulae are listed.
2019-01-30 21:35:32 +00:00
## COMMANDS
2019-08-20 02:14:09 -04:00
### `analytics` [*`subcommand`*]
2020-04-20 08:27:28 +01:00
Control Homebrew's anonymous aggregate user behaviour analytics. Read more at
<https://docs.brew.sh/Analytics>.
2020-04-20 08:27:28 +01:00
`brew analytics` [`state`]:
Display the current state of Homebrew's analytics.
2020-04-20 08:27:28 +01:00
`brew analytics` [`on`|`off`]:
Turn Homebrew's analytics on or off respectively.
`brew analytics regenerate-uuid`:
Regenerate the UUID used for Homebrew's analytics.
2019-01-30 21:35:32 +00:00
### `cleanup` [*`options`*] [*`formula`*|*`cask`*]
2019-08-20 02:14:09 -04:00
Remove stale lock files and outdated downloads for all formulae and casks, and
remove old versions of installed formulae. If arguments are specified, only do
2019-08-20 02:14:09 -04:00
this for the given formulae and casks.
2019-01-30 21:35:32 +00:00
* `--prune`:
Remove all cache files older than specified *`days`*.
* `-n`, `--dry-run`:
Show what would be removed, but do not actually remove anything.
* `-s`:
2019-12-12 19:04:01 -05:00
Scrub the cache, including downloads for even the latest versions. Note downloads for any installed formulae or casks will still not be deleted. If you want to delete those too: `rm -rf "$(brew --cache)"`
* `--prune-prefix`:
Only prune the symlinks and directories from the prefix and remove no other files.
2019-01-30 21:35:32 +00:00
### `commands` [*`options`*]
2019-08-20 02:14:09 -04:00
Show lists of built-in and external commands.
2019-01-30 21:35:32 +00:00
* `-q`, `--quiet`:
List only the names of commands without category headers.
2019-01-30 21:35:32 +00:00
* `--include-aliases`:
2019-08-20 02:14:09 -04:00
Include aliases of internal commands.
2019-01-30 21:35:32 +00:00
### `config`
2019-08-20 02:14:09 -04:00
Show Homebrew and system configuration info useful for debugging. If you file a
bug report, you will be required to provide this information.
2019-01-30 21:35:32 +00:00
2019-08-20 02:14:09 -04:00
### `deps` [*`options`*] [*`formula`*]
2019-01-30 21:35:32 +00:00
Show dependencies for *`formula`*. Additional options specific to *`formula`* may be
appended to the command. When given multiple formula arguments, show the
intersection of dependencies for each formula.
2019-01-30 21:35:32 +00:00
* `-n`:
2019-08-20 02:14:09 -04:00
Sort dependencies in topological order.
* `--1`:
Only show dependencies one level down, instead of recursing.
2019-01-30 21:35:32 +00:00
* `--union`:
Show the union of dependencies for multiple *`formula`*, instead of the intersection.
2019-01-30 21:35:32 +00:00
* `--full-name`:
List dependencies by their full name.
* `--include-build`:
Include `:build` dependencies for *`formula`*.
2019-01-30 21:35:32 +00:00
* `--include-optional`:
Include `:optional` dependencies for *`formula`*.
2019-01-30 21:35:32 +00:00
* `--include-test`:
Include `:test` dependencies for *`formula`* (non-recursive).
2019-01-30 21:35:32 +00:00
* `--skip-recommended`:
Skip `:recommended` dependencies for *`formula`*.
2019-01-30 21:35:32 +00:00
* `--include-requirements`:
Include requirements in addition to dependencies for *`formula`*.
* `--tree`:
Show dependencies as a tree. When given multiple formula arguments, show individual trees for each formula.
2019-03-06 23:44:46 -05:00
* `--annotate`:
Mark any build, test, optional, or recommended dependencies as such in the output.
* `--installed`:
List dependencies for formulae that are currently installed. If *`formula`* is specified, list only its dependencies that are currently installed.
* `--all`:
List dependencies for all available formulae.
2019-01-30 21:35:32 +00:00
* `--for-each`:
2019-08-20 02:14:09 -04:00
Switch into the mode used by the `--all` option, but only list dependencies for each provided *`formula`*, one formula per line. This is used for debugging the `--installed`/`--all` display mode.
2019-01-30 21:35:32 +00:00
### `desc` [*`options`*] (*`text`*|`/`*`text`*`/`|*`formula`*)
Display *`formula`*'s name and one-line description. Formula descriptions are
cached; the cache is created on the first search, making that search slower than
subsequent ones.
2019-01-30 21:35:32 +00:00
* `-s`, `--search`:
2019-08-20 02:14:09 -04:00
Search both names and descriptions for *`text`*. If *`text`* is flanked by slashes, it is interpreted as a regular expression.
2019-01-30 21:35:32 +00:00
* `-n`, `--name`:
2019-08-20 02:14:09 -04:00
Search just names for *`text`*. If *`text`* is flanked by slashes, it is interpreted as a regular expression.
2019-01-30 21:35:32 +00:00
* `-d`, `--description`:
2019-08-20 02:14:09 -04:00
Search just descriptions for *`text`*. If *`text`* is flanked by slashes, it is interpreted as a regular expression.
2019-01-30 21:35:32 +00:00
### `doctor` [*`options`*]
2019-08-20 02:14:09 -04:00
Check your system for potential problems. Will exit with a non-zero status if
any potential problems are found. Please note that these warnings are just used
to help the Homebrew maintainers with debugging if you file an issue. If
everything you use Homebrew for is working fine: please don't worry or file an
issue; just ignore this.
2019-01-30 21:35:32 +00:00
* `--list-checks`:
2019-12-12 19:04:01 -05:00
List all audit methods, which can be run individually if provided as arguments.
2019-01-30 21:35:32 +00:00
* `-D`, `--audit-debug`:
Enable debugging and profiling of audit methods.
2019-01-30 21:35:32 +00:00
### `fetch` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Download a bottle (if available) or source packages for *`formula`*. For tarballs,
also print SHA-256 checksums.
2019-01-30 21:35:32 +00:00
* `--HEAD`:
Fetch HEAD version instead of stable version.
* `--devel`:
Fetch development version instead of stable version.
* `-f`, `--force`:
Remove a previously cached version and re-fetch.
* `-v`, `--verbose`:
Do a verbose VCS checkout, if the URL represents a VCS. This is useful for seeing if an existing VCS cache has been updated.
2019-01-30 21:35:32 +00:00
* `--retry`:
2019-08-20 02:14:09 -04:00
Retry if downloading fails or re-download if the checksum of a previously cached version no longer matches.
2019-01-30 21:35:32 +00:00
* `--deps`:
2019-08-20 02:14:09 -04:00
Also download dependencies for any listed *`formula`*.
2019-01-30 21:35:32 +00:00
* `-s`, `--build-from-source`:
2019-08-20 02:14:09 -04:00
Download source packages rather than a bottle.
2019-01-30 21:35:32 +00:00
* `--build-bottle`:
2019-08-20 02:14:09 -04:00
Download source packages (for eventual bottling) rather than a bottle.
2019-01-30 21:35:32 +00:00
* `--force-bottle`:
Download a bottle if it exists for the current or newest version of macOS, even if it would not be used during installation.
### `gist-logs` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Upload logs for a failed build of *`formula`* to a new Gist. Presents an error
message if no logs are found.
2019-01-30 21:35:32 +00:00
* `--with-hostname`:
Include the hostname in the Gist.
* `-n`, `--new-issue`:
2019-08-20 02:14:09 -04:00
Automatically create a new issue in the appropriate GitHub repository after creating the Gist.
2019-01-30 21:35:32 +00:00
* `-p`, `--private`:
2019-08-20 02:14:09 -04:00
The Gist will be marked private and will not appear in listings but will be accessible with its link.
2019-01-30 21:35:32 +00:00
### `home` [*`formula`*]
2019-08-20 02:14:09 -04:00
Open *`formula`*'s homepage in a browser, or open Homebrew's own homepage if no
formula is provided.
2019-01-30 21:35:32 +00:00
2019-03-11 12:59:39 -04:00
### `info` [*`options`*] [*`formula`*]
2019-01-30 21:35:32 +00:00
Display brief statistics for your Homebrew installation.
2019-08-20 02:14:09 -04:00
If *`formula`* is provided, show summary of information about *`formula`*.
2019-03-11 12:59:39 -04:00
2019-01-30 21:35:32 +00:00
* `--analytics`:
2019-08-20 02:14:09 -04:00
List global Homebrew analytics data or, if specified, installation and build error data for *`formula`* (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set).
2019-01-30 21:35:32 +00:00
* `--days`:
How many days of analytics data to retrieve. The value for *`days`* must be `30`, `90` or `365`. The default is `30`.
2019-01-30 21:35:32 +00:00
* `--category`:
Which type of analytics data to retrieve. The value for *`category`* must be `install`, `install-on-request` or `build-error`; `cask-install` or `os-version` may be specified if *`formula`* is not. The default is `install`.
2019-01-30 21:35:32 +00:00
* `--github`:
2019-08-20 02:14:09 -04:00
Open the GitHub source page for *`formula`* in a browser. To view formula history locally: `brew log -p` *`formula`*
2019-01-30 21:35:32 +00:00
* `--json`:
Print a JSON representation of *`formula`*. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
* `--installed`:
2019-03-11 12:59:39 -04:00
Print JSON of formulae that are currently installed.
* `--all`:
Print JSON of all available formulae.
* `-v`, `--verbose`:
Show more verbose analytics data for *`formula`*.
2019-01-30 21:35:32 +00:00
### `install` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Install *`formula`*. Additional options specific to *`formula`* may be appended to
the command.
2019-01-30 21:35:32 +00:00
2019-08-20 02:14:09 -04:00
Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will then be run for
the installed formulae or, every 30 days, for all formulae.
* `-d`, `--debug`:
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
2019-01-30 21:35:32 +00:00
* `--env`:
2019-08-20 02:14:09 -04:00
If `std` is passed, use the standard build environment instead of superenv. If `super` is passed, use superenv even if the formula specifies the standard build environment.
2019-01-30 21:35:32 +00:00
* `--ignore-dependencies`:
An unsupported Homebrew development flag to skip installing any dependencies of any kind. If the dependencies are not already present, the formula will have issues. If you're not developing Homebrew, consider adjusting your PATH rather than using this flag.
2019-01-30 21:35:32 +00:00
* `--only-dependencies`:
2019-08-20 02:14:09 -04:00
Install the dependencies with specified options but do not install the formula itself.
2019-01-30 21:35:32 +00:00
* `--cc`:
2019-08-20 02:14:09 -04:00
Attempt to compile using the specified *`compiler`*, which should be the name of the compiler's executable, e.g. `gcc-7` for GCC 7. In order to use LLVM's clang, specify `llvm_clang`. To use the Apple-provided clang, specify `clang`. This option will only accept compilers that are provided by Homebrew or bundled with macOS. Please do not file issues if you encounter errors while using this option.
2019-01-30 21:35:32 +00:00
* `-s`, `--build-from-source`:
2019-08-20 02:14:09 -04:00
Compile *`formula`* from source even if a bottle is provided. Dependencies will still be installed from bottles if they are available.
2019-01-30 21:35:32 +00:00
* `--force-bottle`:
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.
* `--include-test`:
2019-08-20 02:14:09 -04:00
Install testing dependencies required to run `brew test` *`formula`*.
2019-01-30 21:35:32 +00:00
* `--devel`:
If *`formula`* defines it, install the development version.
* `--HEAD`:
If *`formula`* defines it, install the HEAD version, aka. master, trunk, unstable.
* `--fetch-HEAD`:
2019-08-20 02:14:09 -04:00
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.
2019-01-30 21:35:32 +00:00
* `--keep-tmp`:
2019-08-20 02:14:09 -04:00
Retain the temporary files created during installation.
2019-01-30 21:35:32 +00:00
* `--build-bottle`:
2019-08-20 02:14:09 -04:00
Prepare the formula for eventual bottling during installation, skipping any post-install steps.
* `--bottle-arch`:
2019-08-20 02:14:09 -04:00
Optimise bottles for the specified architecture rather than the oldest architecture supported by the version of macOS the bottles are built on.
* `-f`, `--force`:
Install without checking for previously installed keg-only or non-migrated versions.
* `-v`, `--verbose`:
Print the verification and postinstall steps.
2019-01-30 21:35:32 +00:00
* `--display-times`:
Print install times for each formula at the end of the run.
* `-i`, `--interactive`:
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 package.
* `-g`, `--git`:
Create a Git repository, useful for creating patches to the software.
2019-01-30 21:35:32 +00:00
### `leaves`
2019-08-20 02:14:09 -04:00
List installed formulae that are not dependencies of another installed formula.
2019-08-20 02:14:09 -04:00
### `link`, `ln` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Symlink all of *`formula`*'s installed files into Homebrew's prefix. This is done
automatically when you install formulae but can be useful for DIY installations.
2019-01-30 21:35:32 +00:00
* `--overwrite`:
2019-08-20 02:14:09 -04:00
Delete files that already exist in the prefix while linking.
2019-01-30 21:35:32 +00:00
* `-n`, `--dry-run`:
2019-08-20 02:14:09 -04:00
List files which would be linked or deleted by `brew link --overwrite` without actually linking or deleting any files.
* `-f`, `--force`:
Allow keg-only formulae to be linked.
2019-08-20 02:14:09 -04:00
### `list`, `ls` [*`options`*] [*`formula`*]
2019-01-30 21:35:32 +00:00
List all installed formulae.
If *`formula`* is provided, summarise the paths within its current keg.
2019-08-20 02:14:09 -04:00
2019-01-30 21:35:32 +00:00
* `--full-name`:
2019-08-20 02:14:09 -04:00
Print formulae with fully-qualified names. If `--full-name` is not passed, other options (i.e. `-1`, `-l`, `-r` and `-t`) are passed to `ls`(1) which produces the actual output.
2019-01-30 21:35:32 +00:00
* `--unbrewed`:
2019-08-20 02:14:09 -04:00
List files in Homebrew's prefix not installed by Homebrew.
2019-01-30 21:35:32 +00:00
* `--versions`:
2019-08-20 02:14:09 -04:00
Show the version number for installed formulae, or only the specified formulae if *`formula`* are provided.
2019-01-30 21:35:32 +00:00
* `--multiple`:
Only show formulae with multiple versions installed.
* `--pinned`:
2019-08-20 02:14:09 -04:00
Show the versions of pinned formulae, or only the specified (pinned) formulae if *`formula`* are provided. See also `pin`, `unpin`.
2019-01-30 21:35:32 +00:00
* `-1`:
Force output to be one entry per line. This is the default when output is not to a terminal.
* `-l`:
2019-08-20 02:14:09 -04:00
List in long format. If the output is to a terminal, a total sum for all the file sizes is printed before the long listing.
2019-01-30 21:35:32 +00:00
* `-r`:
2019-08-20 02:14:09 -04:00
Reverse the order of the sort to list the oldest entries first.
2019-01-30 21:35:32 +00:00
* `-t`:
2019-08-20 02:14:09 -04:00
Sort by time modified, listing most recently modified first.
2019-08-20 02:14:09 -04:00
### `log` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
Show the `git log` for *`formula`*, or show the log for the Homebrew repository if
no formula is provided.
2019-01-30 21:35:32 +00:00
* `-p`, `--patch`:
2019-08-20 02:14:09 -04:00
Also print patch from commit.
2019-01-30 21:35:32 +00:00
* `--stat`:
2019-08-20 02:14:09 -04:00
Also print diffstat from commit.
2019-01-30 21:35:32 +00:00
* `--oneline`:
2019-08-20 02:14:09 -04:00
Print only one line per commit.
2019-01-30 21:35:32 +00:00
* `-1`, `--max-count`:
2019-08-20 02:14:09 -04:00
Print only one or a specified number of commits.
2019-01-30 21:35:32 +00:00
### `migrate` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Migrate renamed packages to new names, where *`formula`* are old names of
packages.
* `-f`, `--force`:
Treat installed *`formula`* and provided *`formula`* as if they are from the same taps and migrate them anyway.
2019-08-20 02:14:09 -04:00
### `missing` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
Check the given *`formula`* kegs for missing dependencies. If no *`formula`* are
provided, check all kegs. Will exit with a non-zero status if any kegs are found
to be missing dependencies.
2019-01-30 21:35:32 +00:00
* `--hide`:
2019-08-20 02:14:09 -04:00
Act as if none of the specified *`hidden`* are installed. *`hidden`* should be a comma-separated list of formulae.
2019-08-20 02:14:09 -04:00
### `options` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
Show install options specific to *`formula`*.
2019-01-30 21:35:32 +00:00
* `--compact`:
Show all options on a single line separated by spaces.
* `--installed`:
2019-08-20 02:14:09 -04:00
Show options for formulae that are currently installed.
* `--all`:
Show options for all available formulae.
2019-12-12 19:04:01 -05:00
### `outdated` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
List installed formulae that have an updated version available. By default,
version information is displayed in interactive shells, and suppressed
otherwise.
* `-q`, `--quiet`:
List only the names of outdated kegs (takes precedence over `--verbose`).
* `-v`, `--verbose`:
Include detailed version information.
2019-01-30 21:35:32 +00:00
* `--json`:
Print output in JSON format. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
2019-01-30 21:35:32 +00:00
* `--fetch-HEAD`:
2019-08-20 02:14:09 -04:00
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.
2019-01-30 21:35:32 +00:00
### `pin` *`formula`*
Pin the specified *`formula`*, preventing them from being upgraded when issuing
the `brew upgrade` *`formula`* command. See also `unpin`.
2019-01-30 21:35:32 +00:00
### `postinstall` *`formula`*
2018-06-23 01:31:16 +02:00
2019-01-30 21:35:32 +00:00
Rerun the post-install steps for *`formula`*.
2019-01-30 21:35:32 +00:00
### `readall` [*`options`*] [*`tap`*]
2019-08-20 02:14:09 -04:00
Import all formulae from the specified *`tap`*, or from all installed taps if none
is provided. This can be useful for debugging issues across all formulae when
making significant changes to `formula.rb`, testing the performance of loading
2019-12-12 19:04:01 -05:00
all formulae or checking if any current formulae have Ruby issues.
2019-01-30 21:35:32 +00:00
* `--aliases`:
Verify any alias symlinks in each tap.
* `--syntax`:
Syntax-check all of Homebrew's Ruby files.
2019-01-30 21:35:32 +00:00
### `reinstall` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Uninstall and then install *`formula`* using the same options it was originally
installed with, plus any appended brew formula options.
2019-08-20 02:14:09 -04:00
Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will then be run for
the reinstalled formulae or, every 30 days, for all formulae.
* `-d`, `--debug`:
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
2019-01-30 21:35:32 +00:00
* `-s`, `--build-from-source`:
Compile *`formula`* from source even if a bottle is available.
2020-02-05 10:21:17 +11:00
* `-i`, `--interactive`:
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 package.
2019-01-30 21:35:32 +00:00
* `--force-bottle`:
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.
* `--keep-tmp`:
2019-08-20 02:14:09 -04:00
Retain the temporary files created during installation.
* `-f`, `--force`:
Install without checking for previously installed keg-only or non-migrated versions.
* `-v`, `--verbose`:
Print the verification and postinstall steps.
2019-01-30 21:35:32 +00:00
* `--display-times`:
Print install times for each formula at the end of the run.
2019-01-30 21:35:32 +00:00
### `search` [*`options`*] [*`text`*|`/`*`text`*`/`]
Perform a substring search of cask tokens and formula names for *`text`*. If
2019-08-20 02:14:09 -04:00
*`text`* is flanked by slashes, it is interpreted as a regular expression. The
search for *`text`* is extended online to `homebrew/core` and `homebrew/cask`.
2019-08-20 02:14:09 -04:00
If no *`text`* is provided, list all locally available formulae (including tapped
ones). No online search is performed.
2020-03-04 17:56:29 +05:30
* `--formulae`:
2020-03-04 13:14:39 +00:00
Without *`text`*, list all locally available formulae (no online search is performed). With *`text`*, search online and locally for formulae.
2019-01-30 21:35:32 +00:00
* `--casks`:
2020-03-04 13:14:39 +00:00
Without *`text`*, list all locally available casks (including tapped ones, no online search is performed). With *`text`*, search online and locally for casks.
2019-01-30 21:35:32 +00:00
* `--desc`:
2019-08-20 02:14:09 -04:00
Search for formulae with a description matching *`text`* and casks with a name matching *`text`*.
2019-01-30 21:35:32 +00:00
* `--macports`:
Search for *`text`* in the given package manager's list.
* `--fink`:
Search for *`text`* in the given package manager's list.
* `--opensuse`:
Search for *`text`* in the given package manager's list.
* `--fedora`:
Search for *`text`* in the given package manager's list.
* `--debian`:
Search for *`text`* in the given package manager's list.
* `--ubuntu`:
Search for *`text`* in the given package manager's list.
2019-01-30 21:35:32 +00:00
### `shellenv`
2019-08-20 02:14:09 -04:00
Print export statements. When run in a shell, this installation of Homebrew will be added to your `PATH`, `MANPATH`, and `INFOPATH`.
2019-08-20 02:14:09 -04:00
The variables `HOMEBREW_PREFIX`, `HOMEBREW_CELLAR` and `HOMEBREW_REPOSITORY` are also exported to avoid querying them multiple times.
Consider adding evaluation of this command's output to your dotfiles (e.g. `~/.profile` or `~/.zprofile`) with: `eval $(brew shellenv)`
2019-01-30 21:35:32 +00:00
### `switch` *`formula`* *`version`*
2019-08-20 02:14:09 -04:00
Symlink all of the specified *`version`* of *`formula`*'s installation into
Homebrew's prefix.
2020-04-20 08:27:28 +01:00
### `tap` [*`options`*] [*`user`*`/`*`repo`*] [*`URL`*]
2019-01-30 21:35:32 +00:00
Tap a formula repository.
2019-08-20 02:14:09 -04:00
If no arguments are provided, list all installed taps.
2019-08-20 02:14:09 -04:00
With *`URL`* unspecified, tap a formula repository from GitHub using HTTPS. Since
so many taps are hosted on GitHub, this command is a shortcut for `brew tap`
*`user`*`/`*`repo`* `https://github.com/`*`user`*`/homebrew-`*`repo`*.
2019-08-20 02:14:09 -04:00
With *`URL`* specified, tap a formula repository from anywhere, using any
transport protocol that `git`(1) handles. The one-argument form of `tap`
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.
2019-01-30 21:35:32 +00:00
* `--full`:
2020-04-11 12:35:17 +10:00
Convert a shallow clone to a full clone without untapping. Taps are only cloned as shallow clones on continuous integration, or if `--shallow` was originally passed.
* `--shallow`:
Fetch tap as a shallow clone rather than a full clone. Useful for continuous integration.
2019-01-30 21:35:32 +00:00
* `--force-auto-update`:
Auto-update tap even if it is not hosted on GitHub. By default, only taps hosted on GitHub are auto-updated (for performance reasons).
* `--repair`:
Migrate tapped formulae from symlink-based to directory-based structure.
* `--list-pinned`:
List all pinned taps.
2019-01-30 21:35:32 +00:00
### `tap-info` [*`options`*] [*`tap`*]
2019-08-20 02:14:09 -04:00
Show detailed information about one or more *`tap`*s.
If no *`tap`* names are provided, display brief statistics for all installed taps.
2019-01-30 21:35:32 +00:00
* `--installed`:
2019-08-20 02:14:09 -04:00
Show information on each installed tap.
2019-01-30 21:35:32 +00:00
* `--json`:
2019-08-20 02:14:09 -04:00
Print a JSON representation of *`tap`*. Currently the default and only accepted value for *`version`* is `v1`. See the docs for examples of using the JSON output: <https://docs.brew.sh/Querying-Brew>
2019-01-30 21:35:32 +00:00
### `uninstall`, `rm`, `remove` [*`options`*] *`formula`*
2019-01-30 21:35:32 +00:00
Uninstall *`formula`*.
* `-f`, `--force`:
Delete all installed versions of *`formula`*.
2019-01-30 21:35:32 +00:00
* `--ignore-dependencies`:
Don't fail uninstall, even if *`formula`* is a dependency of any installed formulae.
2019-01-30 21:35:32 +00:00
### `unlink` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Remove symlinks for *`formula`* from Homebrew's prefix. This can be useful for
temporarily disabling a formula: `brew unlink` *`formula`* `&&` *`commands`* `&&
brew link` *`formula`*
2019-01-30 21:35:32 +00:00
* `-n`, `--dry-run`:
2019-08-20 02:14:09 -04:00
List files which would be unlinked without actually unlinking or deleting any files.
2019-01-30 21:35:32 +00:00
### `unpin` *`formula`*
Unpin *`formula`*, allowing them to be upgraded by `brew upgrade` *`formula`*. See
also `pin`.
2019-01-30 21:35:32 +00:00
### `untap` *`tap`*
2019-08-20 02:14:09 -04:00
Remove a tapped formula repository.
2019-08-20 02:14:09 -04:00
### `update`, `up` [*`options`*]
2019-01-30 21:35:32 +00:00
Fetch the newest version of Homebrew and all formulae from GitHub using `git`(1) and perform any necessary migrations.
2019-01-30 21:35:32 +00:00
* `--merge`:
2019-08-20 02:14:09 -04:00
Use `git merge` to apply updates (rather than `git rebase`).
2019-01-30 21:35:32 +00:00
### `update-reset` [*`repository`*]
2019-08-20 02:14:09 -04:00
Fetch and reset Homebrew and all tap repositories (or any specified *`repository`*) using `git`(1) to their latest `origin/master`.
2019-08-20 02:14:09 -04:00
*Note:* this will destroy all your uncommitted or committed changes.
2019-08-20 02:14:09 -04:00
### `upgrade` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
Upgrade outdated, unpinned formulae using the same options they were originally
installed with, plus any appended brew formula options. If *`formula`* are
specified, upgrade only the given *`formula`* kegs (unless they are pinned; see
`pin`, `unpin`).
2019-08-20 02:14:09 -04:00
Unless `HOMEBREW_NO_INSTALL_CLEANUP` is set, `brew cleanup` will then be run for
the upgraded formulae or, every 30 days, for all formulae.
* `-d`, `--debug`:
If brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.
2019-01-30 21:35:32 +00:00
* `-s`, `--build-from-source`:
Compile *`formula`* from source even if a bottle is available.
2020-02-06 09:58:10 +11:00
* `-i`, `--interactive`:
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 package.
2019-01-30 21:35:32 +00:00
* `--force-bottle`:
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.
* `--fetch-HEAD`:
2019-08-20 02:14:09 -04:00
Fetch the upstream repository to detect if the HEAD installation of the formula is outdated. Otherwise, the repository's HEAD will only be checked for updates when a new stable or development version has been released.
2019-01-30 21:35:32 +00:00
* `--ignore-pinned`:
2019-08-20 02:14:09 -04:00
Set a successful exit status even if pinned formulae are not upgraded.
2019-01-30 21:35:32 +00:00
* `--keep-tmp`:
2019-08-20 02:14:09 -04:00
Retain the temporary files created during installation.
* `-f`, `--force`:
Install without checking for previously installed keg-only or non-migrated versions.
* `-v`, `--verbose`:
Print the verification and postinstall steps.
2019-01-30 21:35:32 +00:00
* `--display-times`:
Print install times for each formula at the end of the run.
* `-n`, `--dry-run`:
2019-07-26 22:55:16 -07:00
Show what would be upgraded, but do not actually upgrade anything.
2019-01-30 21:35:32 +00:00
### `uses` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Show formulae that specify *`formula`* as a dependency. When given multiple
formula arguments, show the intersection of formulae that use *`formula`*. By
default, `uses` shows all formulae that specify *`formula`* as a required or
recommended dependency for their stable builds.
2019-01-30 21:35:32 +00:00
* `--recursive`:
Resolve more than one level of dependencies.
* `--installed`:
2019-08-20 02:14:09 -04:00
Only list formulae that are currently installed.
2019-01-30 21:35:32 +00:00
* `--include-build`:
Include all formulae that specify *`formula`* as `:build` type dependency.
* `--include-test`:
Include all formulae that specify *`formula`* as `:test` type dependency.
* `--include-optional`:
Include all formulae that specify *`formula`* as `:optional` type dependency.
* `--skip-recommended`:
Skip all formulae that specify *`formula`* as `:recommended` type dependency.
* `--devel`:
2019-08-20 02:14:09 -04:00
Show usage of *`formula`* by development builds.
2019-01-30 21:35:32 +00:00
* `--HEAD`:
2019-08-20 02:14:09 -04:00
Show usage of *`formula`* by HEAD builds.
2019-01-30 21:35:32 +00:00
### `--cache` [*`options`*] [*`formula`*]
2019-01-30 21:35:32 +00:00
Display Homebrew's download cache. See also `HOMEBREW_CACHE`.
2019-01-30 21:35:32 +00:00
If *`formula`* is provided, display the file or directory used to cache *`formula`*.
2019-01-30 21:35:32 +00:00
* `-s`, `--build-from-source`:
Show the cache file used when building from source.
* `--force-bottle`:
Show the cache file used when pouring a bottle.
### `--cellar` [*`formula`*]
Display Homebrew's Cellar path. *Default:* `$(brew --prefix)/Cellar`, or if that
directory doesn't exist, `$(brew --repository)/Cellar`.
2020-04-20 08:27:28 +01:00
If *`formula`* is provided, display the location in the Cellar where *`formula`*
2019-01-30 21:35:32 +00:00
would be installed, without any sort of versioned directory as the last path.
2019-12-12 19:04:01 -05:00
### `--env` [*`options`*] [*`formula`*]
2018-10-03 19:52:26 +05:30
Summarise Homebrew's build environment as a plain list.
2018-10-03 19:52:26 +05:30
If the command's output is sent through a pipe and no shell is specified, the
list is formatted for export to `bash`(1) unless `--plain` is passed.
2018-10-03 19:52:26 +05:30
2019-01-30 21:35:32 +00:00
* `--shell`:
Generate a list of environment variables for the specified shell, or `--shell=auto` to detect the current shell.
* `--plain`:
2019-08-20 02:14:09 -04:00
Generate plain output even when piped.
2019-01-30 21:35:32 +00:00
### `--prefix` [*`formula`*]
2019-01-30 21:35:32 +00:00
Display Homebrew's install path. *Default:* `/usr/local` on macOS and
`/home/linuxbrew/.linuxbrew` on Linux.
2020-04-20 08:27:28 +01:00
If *`formula`* is provided, display the location in the Cellar where *`formula`* is
or would be installed.
2019-08-20 02:14:09 -04:00
### `--repository`, `--repo` [*`user`*`/`*`repo`*]
2019-01-30 21:35:32 +00:00
Display where Homebrew's `.git` directory is located.
If *`user`*`/`*`repo`* are provided, display where tap *`user`*`/`*`repo`*'s directory
is located.
2019-01-30 21:35:32 +00:00
### `--version`
2019-08-20 02:14:09 -04:00
Print the version numbers of Homebrew, Homebrew/homebrew-core and
Homebrew/homebrew-cask (if tapped) to standard output.
## DEVELOPER COMMANDS
2019-08-20 02:14:09 -04:00
### `audit` [*`options`*] [*`formula`*]
2018-07-30 18:26:09 +05:30
2019-01-30 21:35:32 +00:00
Check *`formula`* for Homebrew coding style violations. This should be run before
2019-08-20 02:14:09 -04:00
submitting a new formula. If no *`formula`* are provided, check all locally
available formulae. Will exit with a non-zero status if any errors are found,
which can be useful for implementing pre-commit hooks.
2018-07-30 18:26:09 +05:30
* `--strict`:
Run additional, stricter style checks.
* `--online`:
Run additional, slower style checks that require a network connection.
* `--new-formula`:
Run various additional style checks to determine if a new formula is eligible for Homebrew. This should be used when creating new formula and implies `--strict` and `--online`.
* `--fix`:
Fix style violations automatically using RuboCop's auto-correct feature.
* `--display-cop-names`:
Include the RuboCop cop name for each violation in the output.
* `--display-filename`:
2019-08-20 02:14:09 -04:00
Prefix every line of output with the file or formula name being audited, to make output easy to grep.
* `--skip-style`:
Skip running non-RuboCop style checks. Useful if you plan on running `brew style` separately.
* `-D`, `--audit-debug`:
Enable debugging and profiling of audit methods.
* `--only`:
Specify a comma-separated *`method`* list to only run the methods named `audit_`*`method`*.
* `--except`:
Specify a comma-separated *`method`* list to skip running the methods named `audit_`*`method`*.
* `--only-cops`:
Specify a comma-separated *`cops`* list to check for violations of only the listed RuboCop cops.
* `--except-cops`:
Specify a comma-separated *`cops`* list to skip checking for violations of the listed RuboCop cops.
2019-01-30 21:35:32 +00:00
### `bottle` [*`options`*] *`formula`*
Generate a bottle (binary package) from a formula that was installed with
`--build-bottle`. If the formula specifies a rebuild version, it will be
incremented in the generated DSL. Passing `--keep-old` will attempt to keep it
at its original value, while `--no-rebuild` will remove it.
* `--skip-relocation`:
Do not check if the bottle can be marked as relocatable.
* `--force-core-tap`:
Build a bottle even if *`formula`* is not in `homebrew/core` or any installed taps.
* `--no-rebuild`:
If the formula specifies a rebuild version, remove it from the generated DSL.
* `--keep-old`:
If the formula specifies a rebuild version, attempt to preserve its value in the generated DSL.
* `--json`:
2019-08-20 02:14:09 -04:00
Write bottle information to a JSON file, which can be used as the value for `--merge`.
* `--merge`:
2019-08-20 02:14:09 -04:00
Generate an updated bottle block for a formula and optionally merge it into the formula file. Instead of a formula name, requires the path to a JSON file generated with `brew bottle --json` *`formula`*.
* `--write`:
2019-08-20 02:14:09 -04:00
Write changes to the formula file. A new commit will be generated unless `--no-commit` is passed.
* `--no-commit`:
When passed with `--write`, a new commit will not generated after writing changes to the formula file.
* `--root-url`:
Use the specified *`URL`* as the root of the bottle's URL instead of Homebrew's default.
### `bump-formula-pr` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
Create a pull request to update *`formula`* with a new URL or a new tag.
If a *`URL`* is specified, the *`SHA-256`* checksum of the new download should also
be specified. A best effort to determine the *`SHA-256`* and *`formula`* name will
be made if either or both values are not supplied by the user.
If a *`tag`* is specified, the Git commit *`revision`* corresponding to that tag
must also be specified.
*Note:* this command cannot be used to transition a formula from a
URL-and-SHA-256 style specification into a tag-and-revision style specification,
2019-08-20 02:14:09 -04:00
nor vice versa. It must use whichever style specification the formula already
uses.
* `--devel`:
Bump the development rather than stable version. The development spec must already exist.
* `-n`, `--dry-run`:
Print what would be done rather than doing it.
* `--write`:
When passed along with `--dry-run`, perform a not-so-dry run by making the expected file modifications but not taking any Git actions.
2018-10-28 01:13:50 +10:00
* `--no-audit`:
Don't run `brew audit` before opening the PR.
* `--strict`:
Run `brew audit --strict` before opening the PR.
* `--no-browse`:
Print the pull request URL instead of opening in a browser.
2019-11-11 19:49:59 +00:00
* `--no-fork`:
Don't try to fork the repository.
* `--mirror`:
Use the specified *`URL`* as a mirror URL. If *`URL`* is a comma-separated list of URLs, multiple mirrors will be added.
* `--version`:
2019-08-20 02:14:09 -04:00
Use the specified *`version`* to override the value parsed from the URL or tag. Note that `--version=0` can be used to delete an existing version override from a formula if it has become redundant.
* `--message`:
2019-08-20 02:14:09 -04:00
Append *`message`* to the default pull request message.
* `--url`:
Specify the *`URL`* for the new download. If a *`URL`* is specified, the *`SHA-256`* checksum of the new download should also be specified.
* `--sha256`:
Specify the *`SHA-256`* checksum of the new download.
* `--tag`:
Specify the new git commit *`tag`* for the formula.
* `--revision`:
2019-08-20 02:14:09 -04:00
Specify the new git commit *`revision`* corresponding to the specified *`tag`*.
2019-08-20 02:14:09 -04:00
### `bump-revision` [*`options`*] *`formula`*
2019-08-20 02:14:09 -04:00
Create a commit to increment the revision of *`formula`*. If no revision is
present, "revision 1" will be added.
* `-n`, `--dry-run`:
Print what would be done rather than doing it.
* `--message`:
2019-08-20 02:14:09 -04:00
Append *`message`* to the default commit message.
### `cat` *`formula`*
Display the source of *`formula`*.
### `command` *`cmd`*
Display the path to the file being used when invoking `brew` *`cmd`*.
### `create` [*`options`*] *`URL`*
2018-09-28 21:39:52 +05:30
Generate a formula for the downloadable file at *`URL`* 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 `wget` formula serves as
a simple example. For the complete API, see:
<http://www.rubydoc.info/github/Homebrew/brew/master/Formula>
2018-09-28 21:39:52 +05:30
* `--autotools`:
Create a basic template for an Autotools-style build.
* `--cmake`:
Create a basic template for a CMake-style build.
2019-09-24 16:49:27 +02:00
* `--go`:
Create a basic template for a Go build.
* `--meson`:
Create a basic template for a Meson-style build.
2019-09-25 21:52:16 +02:00
* `--perl`:
Create a basic template for a Perl build.
2019-09-24 19:34:34 +02:00
* `--python`:
Create a basic template for a Python build.
2020-03-21 15:32:52 +01:00
* `--ruby`:
Create a basic template for a Ruby build.
2019-09-25 14:29:09 +02:00
* `--rust`:
Create a basic template for a Rust build.
* `--no-fetch`:
2019-08-20 02:14:09 -04:00
Homebrew will not download *`URL`* to the cache and will thus not add its SHA-256 to the formula for you, nor will it check the GitHub API for GitHub projects (to fill out its description and homepage).
* `--HEAD`:
Indicate that *`URL`* points to the package's repository rather than a file.
* `--set-name`:
2019-08-20 02:14:09 -04:00
Explicitly set the *`name`* of the new formula.
* `--set-version`:
2019-08-20 02:14:09 -04:00
Explicitly set the *`version`* of the new formula.
* `--tap`:
2019-08-20 02:14:09 -04:00
Generate the new formula within the given tap, specified as *`user`*`/`*`repo`*.
### `diy` [*`options`*]
Automatically determine the installation prefix for non-Homebrew software. Using
the output from this command, you can install your own software into the Cellar
and then link it into Homebrew's prefix with `brew link`.
* `--name`:
Explicitly set the *`name`* of the package being installed.
* `--version`:
Explicitly set the *`version`* of the package being installed.
2019-01-30 21:35:32 +00:00
### `edit` [*`formula`*]
2019-08-20 02:14:09 -04:00
Open *`formula`* in the editor set by `EDITOR` or `HOMEBREW_EDITOR`, or open the
Homebrew repository for editing if no formula is provided.
### `extract` [*`options`*] *`formula`* *`tap`*
2018-10-03 19:52:26 +05:30
Look through repository history to find the most recent version of *`formula`* and
create a copy in *`tap`*`/Formula/`*`formula`*`@`*`version`*`.rb`. If the tap is not
2019-03-19 14:07:50 +08:00
installed yet, attempt to install/clone the tap before continuing. To extract a
2019-08-20 02:14:09 -04:00
formula from a tap that is not `homebrew/core` use its fully-qualified form of
*`user`*`/`*`repo`*`/`*`formula`*.
2018-10-03 19:52:26 +05:30
* `--version`:
2019-08-20 02:14:09 -04:00
Extract the specified *`version`* of *`formula`* instead of the most recent.
2019-01-30 21:35:32 +00:00
### `formula` *`formula`*
2019-08-20 02:14:09 -04:00
Display the path where *`formula`* is located.
### `install-bundler-gems`
Install Homebrew's Bundler gems.
### `irb` [*`options`*]
2018-07-29 20:53:14 -04:00
Enter the interactive Homebrew Ruby shell.
* `--examples`:
Show several examples.
* `--pry`:
Use Pry instead of IRB. Implied if `HOMEBREW_PRY` is set.
2019-01-30 21:35:32 +00:00
### `linkage` [*`options`*] [*`formula`*]
2019-08-20 02:14:09 -04:00
Check the library links from the given *`formula`* kegs. If no *`formula`* are
provided, check all kegs. Raises an error if run on uninstalled formulae.
* `--test`:
2019-08-20 02:14:09 -04:00
Show only missing libraries and exit with a non-zero status if any missing libraries are found.
* `--reverse`:
For every library that a keg references, print its dylib path followed by the binaries that link to it.
* `--cached`:
Print the cached linkage values stored in `HOMEBREW_CACHE`, set by a previous `brew linkage` run.
### `man` [*`options`*]
2018-09-28 21:39:52 +05:30
Generate Homebrew's manpages.
* `--fail-if-changed`:
2019-08-20 02:14:09 -04:00
Return a failing status code if changes are detected in the manpage outputs. This can be used to notify CI 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).
* `--link`:
This is now done automatically by `brew update`.
### `pr-automerge` [*`options`*]
2020-04-20 08:27:28 +01:00
Find pull requests that can be automatically merged using `brew pr-publish`.
* `--tap`:
2020-04-20 08:27:28 +01:00
Target tap repository (default: `homebrew/core`).
* `--with-label`:
2020-04-20 08:27:28 +01:00
Pull requests must have this label (default: `ready to merge`).
* `--without-labels`:
2020-04-20 08:27:28 +01:00
Pull requests must not have these labels (default: `do not merge`, `new formula`).
* `--publish`:
Run `brew pr-publish` on matching pull requests.
* `--ignore-failures`:
Include pull requests that have failing status checks.
### `pr-publish` [*`options`*] *`pull_request`* [*`pull_request`* ...]
2020-03-22 13:34:48 +11:00
2020-04-20 08:27:28 +01:00
Publish bottles for a pull request with GitHub Actions. Requires write access to
the `homebrew/core` repository.
2020-03-22 13:34:48 +11:00
### `pr-pull` [*`options`*] *`pull_request`* [*`pull_request`* ...]
Download and publish bottles, and apply the bottle commit from a pull request
2020-04-20 08:27:28 +01:00
with artifacts generated by GitHub Actions. Requires write access to the
repository.
* `--no-publish`:
2020-04-20 08:27:28 +01:00
Download the bottles, apply the bottle commit and upload the bottles to Bintray, but don't publish them.
* `--no-upload`:
Download the bottles and apply the bottle commit, but don't upload to Bintray.
* `-n`, `--dry-run`:
Print what would be done rather than doing it.
* `--clean`:
Do not amend the commits from pull requests.
* `--branch-okay`:
Do not warn if pulling to a branch besides master (useful for testing).
* `--resolve`:
When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.
* `--workflow`:
Retrieve artifacts from the specified workflow (default: tests.yml).
* `--artifact`:
Download artifacts with the specified name (default: bottles).
* `--bintray-org`:
2020-03-31 11:24:10 +02:00
Upload to the specified Bintray organisation (default: homebrew).
* `--tap`:
2020-04-20 08:27:28 +01:00
Target tap repository (default: homebrew/core).
2019-01-30 21:35:32 +00:00
### `prof` *`command`*
2019-08-20 02:14:09 -04:00
Run Homebrew with the Ruby profiler, e.g. `brew prof readall`.
2019-01-30 21:35:32 +00:00
### `pull` [*`options`*] *`patch`*
2018-09-28 21:39:52 +05:30
Get a patch from a GitHub commit or pull request and apply it to Homebrew.
2019-08-20 02:14:09 -04:00
Optionally, publish updated bottles for any formulae changed by the patch.
2018-09-28 21:39:52 +05:30
2020-04-20 08:27:28 +01:00
Each *`patch`* may be the number of a pull request in `homebrew/core` or the URL
of any pull request or commit on GitHub.
2018-09-28 21:39:52 +05:30
* `--bump`:
For one-formula PRs, automatically reword commit message to our preferred format.
* `--clean`:
Do not rewrite or otherwise modify the commits found in the pulled PR.
* `--ignore-whitespace`:
Silently ignore whitespace discrepancies when applying diffs.
* `--resolve`:
When a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.
* `--branch-okay`:
Do not warn if pulling to a branch besides master (useful for testing).
* `--no-pbcopy`:
Do not copy anything to the system clipboard.
### `release-notes` [*`options`*] [*`previous_tag`*] [*`end_ref`*]
Print the merged pull requests on Homebrew/brew between two Git refs. If no
*`previous_tag`* is provided it defaults to the latest tag. If no *`end_ref`* is
provided it defaults to `origin/master`.
* `--markdown`:
Print as a Markdown list.
2019-08-20 02:14:09 -04:00
### `ruby` (`-e` *`text`*|*`file`*)
2018-10-02 19:54:22 +05:30
2019-08-20 02:14:09 -04:00
Run a Ruby instance with Homebrew's libraries loaded, e.g. `brew ruby -e "puts
:gcc.f.deps"` or `brew ruby script.rb`.
2018-09-28 21:39:52 +05:30
2019-09-13 19:17:41 +02:00
* `-r`:
Load a library using `require`.
* `-e`:
2019-08-20 02:14:09 -04:00
Execute the given text string as a script.
### `sh` [*`options`*]
Start a Homebrew build environment shell. Uses our years-battle-hardened
Homebrew build logic to help your `./configure && make && make install` or even
your `gem install` succeed. Especially handy if you run Homebrew in an
Xcode-only configuration since it adds tools like `make` to your `PATH` which
build systems would not find otherwise.
* `--env`:
Use the standard `PATH` instead of superenv's when `std` is passed.
### `style` [*`options`*] [*`file`*|*`tap`*|*`formula`*]
Check formulae or files for conformance to Homebrew style guidelines.
Lists of *`file`*, *`tap`* and *`formula`* may not be combined. If none are provided,
`style` will run style checks on the whole Homebrew library, including core code
and all formulae.
* `--fix`:
Fix style violations automatically using RuboCop's auto-correct feature.
* `--display-cop-names`:
Include the RuboCop cop name for each violation in the output.
* `--only-cops`:
Specify a comma-separated *`cops`* list to check for violations of only the listed RuboCop cops.
* `--except-cops`:
Specify a comma-separated *`cops`* list to skip checking for violations of the listed RuboCop cops.
### `tap-new` *`user`*`/`*`repo`*
Generate the template files for a new tap.
2019-01-30 21:35:32 +00:00
### `test` [*`options`*] *`formula`*
Run the test method provided by an installed formula. There is no standard
output or return code, but generally it should notify the user if something is
wrong with the installed formula.
*Example:* `brew install jruby && brew test jruby`
* `--devel`:
Test the development version of a formula.
* `--HEAD`:
Test the head version of a formula.
* `--keep-tmp`:
2019-08-20 02:14:09 -04:00
Retain the temporary files created for the test.
### `tests` [*`options`*]
Run Homebrew's unit and integration tests.
* `--coverage`:
Generate code coverage reports.
* `--generic`:
Run only OS-agnostic tests.
* `--no-compat`:
Do not load the compatibility layer when running tests.
* `--online`:
Include tests that use the GitHub API and tests that use any of the taps for official external commands.
* `--only`:
Run only *`test_script`*`_spec.rb`. Appending `:`*`line_number`* will start at a specific line.
* `--seed`:
2019-08-20 02:14:09 -04:00
Randomise tests with the specified *`value`* instead of a random seed.
### `unpack` [*`options`*] *`formula`*
Unpack the source files for *`formula`* into subdirectories of the current working
directory.
* `--destdir`:
Create subdirectories in the directory named by *`path`* instead.
* `--patch`:
Patches for *`formula`* will be applied to the unpacked source.
* `-g`, `--git`:
Initialise a Git repository in the unpacked source. This is useful for creating patches for the software.
### `update-test` [*`options`*]
2019-08-20 02:14:09 -04:00
Run a test of `brew update` with a new repository clone. If no options are
passed, use `origin/master` as the start commit.
* `--to-tag`:
Set `HOMEBREW_UPDATE_TO_TAG` to test updating between tags.
* `--keep-tmp`:
Retain the temporary directory containing the new repository clone.
* `--commit`:
2019-08-20 02:14:09 -04:00
Use the specified *`commit`* as the start commit.
* `--before`:
2019-08-20 02:14:09 -04:00
Use the commit at the specified *`date`* as the start commit.
2019-01-30 21:35:32 +00:00
### `vendor-gems`
Install and commit Homebrew's vendored gems.
## GLOBAL OPTIONS
These options are applicable across multiple subcommands.
* `-q`, `--quiet`:
Suppress any warnings.
* `-v`, `--verbose`:
Make some output more verbose.
* `-d`, `--debug`:
Display any debugging information.
* `-f`, `--force`:
Override warnings and enable potentially unsafe operations.
## OFFICIAL EXTERNAL COMMANDS
2020-04-20 08:27:28 +01:00
### `cask` *`subcommand`*
2019-08-20 02:14:09 -04:00
Install macOS applications distributed as binaries. See `brew-cask`(1).
2019-01-30 21:35:32 +00:00
**Homebrew/homebrew-cask**: <https://github.com/Homebrew/homebrew-cask>
2020-04-20 08:27:28 +01:00
### `bundle` [*`subcommand`*]
Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask, Mac App Store
and Whalebrew.
2020-04-20 08:27:28 +01:00
`brew bundle` [`install`]:
Install or upgrade all dependencies in a `Brewfile`.
2020-04-20 08:27:28 +01:00
`brew bundle dump`:
Write all installed casks/formulae/images/taps into a `Brewfile`.
2020-04-20 08:27:28 +01:00
`brew bundle cleanup`:
Uninstall all dependencies not listed in a `Brewfile`.
2020-04-20 08:27:28 +01:00
`brew bundle check`:
Check if all dependencies are installed in a `Brewfile`.
2020-04-20 08:27:28 +01:00
`brew bundle exec` *`command`*:
Run an external command in an isolated build environment.
2020-04-20 08:27:28 +01:00
`brew bundle list`:
List all dependencies present in a `Brewfile`. By default, only Homebrew
dependencies are listed.
* `--file`:
2020-04-20 08:27:28 +01:00
Read the `Brewfile` from this location. Use `--file=-` to pipe to stdin/stdout.
* `--global`:
Read the `Brewfile` from `~/.Brewfile`.
* `-v`, `--verbose`:
2020-04-20 08:27:28 +01:00
`install` prints output from commands as they are run. `check` lists all missing dependencies.
* `--no-upgrade`:
`install` won't run `brew upgrade` on outdated dependencies. Note they may still be upgraded by `brew install` if needed.
* `-f`, `--force`:
2020-04-20 08:27:28 +01:00
`dump` overwrites an existing `Brewfile`. `cleanup` actually performs its cleanup operations.
* `--no-lock`:
`install` won't output a `Brewfile.lock.json`.
* `--all`:
`list` all dependencies.
* `--brews`:
`list` Homebrew dependencies.
* `--casks`:
`list` Homebrew Cask dependencies.
* `--taps`:
`list` tap dependencies.
* `--mas`:
`list` Mac App Store dependencies.
* `--whalebrew`:
`list` Whalebrew dependencies.
* `--describe`:
2020-04-20 08:27:28 +01:00
`dump` adds a description comment above each line, unless the dependency does not have a description.
* `--no-restart`:
`dump` does not add `restart_service` to formula lines.
* `--zap`:
`cleanup` casks using the `zap` command instead of `uninstall`.
2020-04-20 08:27:28 +01:00
### `services` [*`subcommand`*]
2019-08-20 02:14:09 -04:00
Manage background services with macOS' `launchctl`(1) daemon manager.
If `sudo` is passed, operate on `/Library/LaunchDaemons` (started at boot).
Otherwise, operate on `~/Library/LaunchAgents` (started at login).
2020-04-20 08:27:28 +01:00
[`sudo`] `brew services` [`list`]:
List all running services for the current user (or root).
2020-04-20 08:27:28 +01:00
[`sudo`] `brew services run` (*`formula`*|`--all`):
Run the service *`formula`* without registering to launch at login (or boot).
2020-04-20 08:27:28 +01:00
[`sudo`] `brew services start` (*`formula`*|`--all`):
Start the service *`formula`* immediately and register it to launch at login
(or boot).
2020-04-20 08:27:28 +01:00
[`sudo`] `brew services stop` (*`formula`*|`--all`):
Stop the service *`formula`* immediately and unregister it from launching at
login (or boot).
2020-04-20 08:27:28 +01:00
[`sudo`] `brew services restart` (*`formula`*|`--all`):
Stop (if necessary) and start the service *`formula`* immediately and register
it to launch at login (or boot).
2020-04-20 08:27:28 +01:00
[`sudo`] `brew services cleanup`:
Remove all unused services.
* `--all`:
Run *`subcommand`* on all services.
## CUSTOM EXTERNAL COMMANDS
Homebrew, like `git`(1), supports external commands. These are executable
scripts that reside somewhere in the `PATH`, named `brew-`*`cmdname`* or
`brew-`*`cmdname`*`.rb`, which can be invoked like `brew` *`cmdname`*. This allows you
to create your own commands without modifying Homebrew's internals.
Instructions for creating your own commands can be found in the docs:
<https://docs.brew.sh/External-Commands>
## SPECIFYING FORMULAE
Many Homebrew commands accept one or more *`formula`* arguments. These arguments
can take several different forms:
* The name of a formula:
e.g. `git`, `node`, `wget`.
* The fully-qualified name of a tapped formula:
Sometimes a formula from a tapped repository may conflict with one in
`homebrew/core`.
You can still access these formulae by using a special syntax, e.g.
`homebrew/dupes/vim` or `homebrew/versions/node4`.
* An arbitrary file or URL:
Homebrew can install formulae via URL, e.g.
2018-12-03 21:23:06 -05:00
`https://raw.githubusercontent.com/Homebrew/homebrew-core/master/Formula/git.rb`,
2019-08-20 02:14:09 -04:00
or from a local path. It can point to either a formula file or a bottle.
In the case of a URL, the downloaded file will be cached for later use.
## ENVIRONMENT
2019-08-20 02:14:09 -04:00
Note that environment variables must have a value set to be detected. For example, run
2018-12-03 21:23:06 -05:00
`export HOMEBREW_NO_INSECURE_REDIRECT=1` rather than just
`export HOMEBREW_NO_INSECURE_REDIRECT`.
2019-05-07 10:31:54 +09:00
* `HOMEBREW_ARCH`:
Linux only: Pass the set value to a type name representing the compiler's `-march` option.
*Default:* `native`.
2019-05-07 10:31:54 +09:00
* `HOMEBREW_ARTIFACT_DOMAIN`:
Prefix all download URLs, including those for bottles, with this variable. For example, `HOMEBREW_ARTIFACT_DOMAIN=http://localhost:8080` will cause a formula with the URL `https://example.com/foo.tar.gz` to instead download from `http://localhost:8080/example.com/foo.tar.gz`.
* `HOMEBREW_AUTO_UPDATE_SECS`:
Automatically check for updates once per this seconds interval.
*Default:* `300`.
2019-09-30 15:40:20 +02:00
* `HOMEBREW_BAT`:
If set, use `bat` for the `brew cat` command.
* `HOMEBREW_BINTRAY_KEY`:
Use this API key when accessing the Bintray API (where bottles are stored).
* `HOMEBREW_BINTRAY_USER`:
Use this username when accessing the Bintray API (where bottles are stored).
2019-09-30 15:40:20 +02:00
* `HOMEBREW_BOTTLE_DOMAIN`:
Use the specified URL as the download mirror for bottles. For example, `HOMEBREW_BOTTLE_DOMAIN=http://localhost:8080` will cause all bottles to download from the prefix `http://localhost:8080/`.
*Default:* macOS: `https://homebrew.bintray.com/`, Linux: `https://linuxbrew.bintray.com/`.
* `HOMEBREW_BREW_GIT_REMOTE`:
Use the specified URL as the Homebrew/brew `git`(1) remote.
*Default:* `https://github.com/Homebrew/brew`.
* `HOMEBREW_BROWSER`:
Use this as the browser when opening project homepages.
*Default:* `$BROWSER` or the OS's default browser.
* `HOMEBREW_CACHE`:
Use the specified directory as the download cache.
*Default:* macOS: `$HOME/Library/Caches/Homebrew`, Linux: `$XDG_CACHE_HOME/Homebrew` or `$HOME/.cache/Homebrew`.
* `HOMEBREW_COLOR`:
If set, force colour output on non-TTY outputs.
* `HOMEBREW_CORE_GIT_REMOTE`:
Use the specified URL as the Homebrew/homebrew-core `git`(1) remote.
*Default:* macOS: `https://github.com/Homebrew/homebrew-core`, Linux: `https://github.com/Homebrew/linuxbrew-core`.
2018-04-08 15:51:58 -07:00
* `HOMEBREW_CURLRC`:
If set, do not pass `--disable` when invoking `curl`(1), which disables the use of `curlrc`.
2019-05-17 10:14:54 +01:00
* `HOMEBREW_CURL_RETRIES`:
Pass the given retry count to `--retry` when invoking `curl`(1).
*Default:* `3`.
2019-05-17 10:14:54 +01:00
* `HOMEBREW_CURL_VERBOSE`:
If set, pass `--verbose` when invoking `curl`(1).
* `HOMEBREW_DEVELOPER`:
If set, tweak behaviour to be more relevant for Homebrew developers (active or budding) by e.g. turning warnings into errors.
* `HOMEBREW_DISABLE_LOAD_FORMULA`:
If set, refuse to load formulae. This is useful when formulae are not trusted (such as in pull requests).
* `HOMEBREW_DISPLAY`:
Use this X11 display when opening a page in a browser, for example with `brew home`. Primarily useful on Linux.
*Default:* `$DISPLAY`.
* `HOMEBREW_DISPLAY_INSTALL_TIMES`:
If set, print install times for each formula at the end of the run.
* `HOMEBREW_EDITOR`:
Use this editor when editing a single formula, or several formulae in the same directory.
*Note:* `brew edit` will open all of Homebrew as discontinuous files and directories. Visual Studio Code can handle this correctly in project mode, but many editors will do strange things in this case.
*Default:* `$EDITOR` or `$VISUAL`.
* `HOMEBREW_FAIL_LOG_LINES`:
Output this many lines of output on formula `system` failures.
*Default:* `15`.
* `HOMEBREW_FORCE_BREWED_CURL`:
If set, always use a Homebrew-installed `curl`(1) rather than the system version. Automatically set if the system version of `curl` is too old.
* `HOMEBREW_FORCE_BREWED_GIT`:
If set, always use a Homebrew-installed `git`(1) rather than the system version. Automatically set if the system version of `git` is too old.
* `HOMEBREW_FORCE_HOMEBREW_ON_LINUX`:
If set, running Homebrew on Linux will use URLs for macOS. This is useful when merging pull requests for macOS while on Linux.
* `HOMEBREW_FORCE_VENDOR_RUBY`:
If set, always use Homebrew's vendored, relocatable Ruby version even if the system version of Ruby is new enough.
* `HOMEBREW_GITHUB_API_PASSWORD`:
Use this password for authentication with the GitHub API, for features such as `brew search`. We strongly recommend using `HOMEBREW_GITHUB_API_TOKEN` instead.
* `HOMEBREW_GITHUB_API_TOKEN`:
Use this personal access token for the GitHub API, for features such as `brew search`. You can create one at <https://github.com/settings/tokens>. If set, GitHub will allow you a greater number of API requests. For more information, see: <https://developer.github.com/v3/#rate-limiting>
*Note:* Homebrew doesn't require permissions for any of the scopes, but some developer commands may require additional permissions.
* `HOMEBREW_GITHUB_API_USERNAME`:
Use this username for authentication with the GitHub API, for features such as `brew search`. We strongly recommend using `HOMEBREW_GITHUB_API_TOKEN` instead.
* `HOMEBREW_GIT_EMAIL`:
Set the Git author and committer name to this value.
* `HOMEBREW_GIT_NAME`:
Set the Git author and committer email to this value.
* `HOMEBREW_INSTALL_BADGE`:
Print this text before the installation summary of each successful build.
2018-12-03 21:23:06 -05:00
*Default:* The "Beer Mug" emoji.
* `HOMEBREW_LOGS`:
Use the specified directory to store log files.
*Default:* macOS: `$HOME/Library/Logs/Homebrew`, Linux: `$XDG_CACHE_HOME/Homebrew/Logs` or `$HOME/.cache/Homebrew/Logs`.
* `HOMEBREW_MAKE_JOBS`:
Use this value as the number of parallel jobs to run when building with `make`(1).
*Default:* The number of available CPU cores.
* `HOMEBREW_NO_ANALYTICS`:
If set, do not send analytics. See: <https://docs.brew.sh/Analytics>.
* `HOMEBREW_NO_AUTO_UPDATE`:
If set, do not automatically update before running `brew install`, `brew upgrade` or `brew tap`.
* `HOMEBREW_NO_BOTTLE_SOURCE_FALLBACK`:
If set, fail on the failure of installation from a bottle rather than falling back to building from source.
* `HOMEBREW_NO_COLOR`:
If set, do not print text with colour added.
*Default:* `$NO_COLOR`.
* `HOMEBREW_NO_COMPAT`:
If set, disable all use of legacy compatibility code.
* `HOMEBREW_NO_EMOJI`:
If set, do not print `HOMEBREW_INSTALL_BADGE` on a successful build.
*Note:* Only tries to print emoji on OS X Lion or newer.
* `HOMEBREW_NO_GITHUB_API`:
If set, do not use the GitHub API, e.g. for searches or fetching relevant issues on a failed install.
* `HOMEBREW_NO_INSECURE_REDIRECT`:
If set, forbid redirects from secure HTTPS to insecure HTTP.
*Note:* While ensuring your downloads are fully secure, this is likely to cause from-source SourceForge, some GNU & GNOME based formulae to fail to download.
* `HOMEBREW_NO_INSTALL_CLEANUP`:
If set, `brew install`, `brew upgrade` and `brew reinstall` will never automatically cleanup installed/upgraded/reinstalled formulae or all formulae every 30 days.
* `HOMEBREW_PRY`:
If set, use Pry for the `brew irb` command.
* `HOMEBREW_SKIP_OR_LATER_BOTTLES`:
If set with `HOMEBREW_DEVELOPER`, do not use bottles from older versions of macOS. This is useful in development on new macOS versions.
* `HOMEBREW_SVN`:
Use this as the `svn`(1) binary.
*Default:* A Homebrew-built Subversion (if installed), or the system-provided binary.
* `HOMEBREW_TEMP`:
Use this path as the temporary directory for building packages. Changing this may be needed if your system temporary directory and Homebrew prefix are on different volumes, as macOS has trouble moving symlinks across volumes when the target does not yet exist. This issue typically occurs when using FileVault or custom SSD configurations.
*Default:* macOS: `/private/tmp`, Linux: `/tmp`.
* `HOMEBREW_UPDATE_TO_TAG`:
If set, always use the latest stable tag (even if developer commands have been run).
* `HOMEBREW_VERBOSE`:
If set, always assume `--verbose` when running commands.
* `HOMEBREW_VERBOSE_USING_DOTS`:
If set, verbose output will print a `.` no more than once a minute. This can be useful to avoid long-running Homebrew commands being killed due to no output.
2018-02-01 18:11:29 +08:00
* `all_proxy`:
Use this SOCKS5 proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.
2018-02-01 18:11:29 +08:00
* `ftp_proxy`:
Use this FTP proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.
* `http_proxy`:
Use this HTTP proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.
* `https_proxy`:
Use this HTTPS proxy for `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.
2017-12-19 10:59:04 +02:00
* `no_proxy`:
A comma-separated list of hostnames and domain names excluded from proxying by `curl`(1), `git`(1) and `svn`(1) when downloading through Homebrew.
2017-12-19 10:59:04 +02:00
## USING HOMEBREW BEHIND A PROXY
2017-12-19 10:59:04 +02:00
2018-12-03 21:23:06 -05:00
Set the `http_proxy`, `https_proxy`, `all_proxy`, `ftp_proxy` and/or `no_proxy`
environment variables documented above.
For example, to use an unauthenticated HTTP or SOCKS5 proxy:
export http_proxy=http://$HOST:$PORT
export all_proxy=socks5://$HOST:$PORT
2018-02-01 18:11:29 +08:00
And for an authenticated HTTP proxy:
export http_proxy=http://$USER:$PASSWORD@$HOST:$PORT
## SEE ALSO
Homebrew Documentation: <https://docs.brew.sh>
2019-08-20 02:14:09 -04:00
Homebrew API: <https://rubydoc.brew.sh>
`brew-cask`(1), `git`(1), `git-log`(1)
## AUTHORS
2019-02-15 10:54:30 +00:00
Homebrew's Project Leader is Mike McQuaid.
Homebrew's Project Leadership Committee is Misty De Meo, Shaun Jackman, Jonathan Chang, Sean Molenaar and Markus Reiter.
2019-02-15 10:54:30 +00:00
Homebrew's Technical Steering Committee is Michka Popoff, FX Coudert, Markus Reiter, Misty De Meo and Mike McQuaid.
Homebrew/brew's Linux maintainers are Michka Popoff, Shaun Jackman, Dawid Dziurla and Issy Long.
2018-01-18 15:45:51 +00:00
Homebrew's other current maintainers are Claudia Pellegrino, Zach Auten, Rui Chen, Vitor Galvao, Caleb Xu, Gautham Goli, Steven Peters, Bo Anderson, William Woodruff, Igor Kapkov, Sam Ford, Alexander Bayandin, Izaak Beekman, Eric Knibbe, Viktor Szakats, Thierry Moisan, Steven Peters, Tom Schoonjans and Issy Long.
Former maintainers with significant contributions include Jan Viljanen, JCount, commitay, Dominyk Tiller, Tim Smith, Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg, Andrew Janke, Alex Dunn, neutric, Tomasz Pajor, Uladzislau Shablinski, Alyssa Ross, ilovezfs, Chongyu Zhu and Homebrew's creator: Max Howell.
## BUGS
See our issues on GitHub:
* **Homebrew/brew**:
<https://github.com/Homebrew/brew/issues>
* **Homebrew/homebrew-core**:
<https://github.com/Homebrew/homebrew-core/issues>
[SYNOPSIS]: #SYNOPSIS "SYNOPSIS"
[DESCRIPTION]: #DESCRIPTION "DESCRIPTION"
[ESSENTIAL COMMANDS]: #ESSENTIAL-COMMANDS "ESSENTIAL COMMANDS"
[COMMANDS]: #COMMANDS "COMMANDS"
[DEVELOPER COMMANDS]: #DEVELOPER-COMMANDS "DEVELOPER COMMANDS"
[GLOBAL OPTIONS]: #GLOBAL-OPTIONS "GLOBAL OPTIONS"
[OFFICIAL EXTERNAL COMMANDS]: #OFFICIAL-EXTERNAL-COMMANDS "OFFICIAL EXTERNAL COMMANDS"
[CUSTOM EXTERNAL COMMANDS]: #CUSTOM-EXTERNAL-COMMANDS "CUSTOM EXTERNAL COMMANDS"
[SPECIFYING FORMULAE]: #SPECIFYING-FORMULAE "SPECIFYING FORMULAE"
[ENVIRONMENT]: #ENVIRONMENT "ENVIRONMENT"
[USING HOMEBREW BEHIND A PROXY]: #USING-HOMEBREW-BEHIND-A-PROXY "USING HOMEBREW BEHIND A PROXY"
[SEE ALSO]: #SEE-ALSO "SEE ALSO"
[AUTHORS]: #AUTHORS "AUTHORS"
[BUGS]: #BUGS "BUGS"
[-]: -.html