45 KiB
brew(1) -- The missing package manager for macOS
SYNOPSIS
brew --version
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
For the full command list, see the COMMANDS section.
With --verbose or -v, many commands print extra debugging information. Note that these flags should only appear after a command.
-
installformula: Installformula. -
uninstallformula: Uninstallformula. -
update: Fetch the newest version of Homebrew from GitHub usinggit(1). -
list: List all installed formulae. -
search(text|/``text``/): Perform a substring search of formula names fortext. Iftextis surrounded with slashes, then it is interpreted as a regular expression. The search fortextis extended online to some popular taps. If no search term is given, all locally available formulae are listed.
COMMANDS
-
analytics[state]: Display anonymous user behaviour analytics state. Read more at https://docs.brew.sh/Analytics.html. -
analytics(on|off): Turn on/off Homebrew's analytics. -
analyticsregenerate-uuid: Regenerate UUID used in Homebrew's analytics. -
catformula: Display the source toformula. -
cleanup[--prune=``days] [--dry-run] [-s] [formulae]: For all installed or specific formulae, remove any older versions from the cellar. In addition, old downloads from the Homebrew download-cache are deleted.If
--prune=``daysis specified, remove all cache files older thandays.If
--dry-runor-nis passed, show what would be removed, but do not actually remove anything.If
-sis passed, scrub 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:rm -rf $(brew --cache) -
commandcmd: Display the path to the file which is used when invokingbrewcmd. -
commands[--quiet[--include-aliases]]: Show a list of built-in and external commands.If
--quietis passed, list only the names of commands without the header. With--include-aliases, the aliases of internal commands will be included. -
config: Show Homebrew and system configuration useful for debugging. If you file a bug report, you will likely be asked for this information if you do not provide it. -
deps[--1] [-n] [--union] [--full-name] [--installed] [--include-build] [--include-optional] [--skip-recommended]formulae: Show dependencies forformulae. When given multiple formula arguments, show the intersection of dependencies forformulae.If
--1is passed, only show dependencies one level down, instead of recursing.If
-nis passed, show dependencies in topological order.If
--unionis passed, show the union of dependencies forformulae, instead of the intersection.If
--full-nameis passed, list dependencies by their full name.If
--installedis passed, only list those dependencies that are currently installed.By default,
depsshows required and recommended dependencies forformulae. To include the:buildtype dependencies, pass--include-build. Similarly, pass--include-optionalto include:optionaldependencies. To skip:recommendedtype dependencies, pass--skip-recommended. -
deps--tree[filters] (formulae|--installed): Show dependencies as a tree. When given multiple formula arguments, output individual trees for every formula.If
--installedis passed, output a tree for every installed formula.The
filtersplaceholder is any combination of options--include-build,--include-optional, and--skip-recommendedas documented above. -
deps[filters] (--installed|--all): 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.The
filtersplaceholder is any combination of options--include-build,--include-optional, and--skip-recommendedas documented above. -
descformula: Displayformula's name and one-line description. -
desc[-s|-n|-d] (text|/``text``/): Search both name and description (-s), just the names (-n), or just the descriptions (-d) fortext. Iftextis flanked by slashes, it is interpreted as a regular expression. Formula descriptions are cached; the cache is created on the first search, making that search slower than subsequent ones. -
diy[--name=``name] [--version=``version]: 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.The options
--name=``nameand--version=``versioneach take an argument and allow you to explicitly set the name and version of the package you are installing. -
doctor: Check your system for potential problems. Doctor exits with a non-zero status if any problems are found. -
fetch[--force] [--retry] [-v] [--devel|--HEAD] [--deps] [--build-from-source|--force-bottle]formulae: Download the source packages for the givenformulae. For tarballs, also print SHA-256 checksums.If
--HEADor--develis passed, fetch that version instead of the stable version.If
-vis 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.If
--force(or-f) is passed, remove a previously cached version and re-fetch.If
--retryis passed, retry if a download fails or re-download if the checksum of a previously cached version no longer matches.If
--depsis passed, also download dependencies for any listedformulae.If
--build-from-source(or-s) is passed, download the source rather than a bottle.If
--force-bottleis passed, 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[--new-issue|-n]formula: Upload logs for a failed build offormulato a new Gist.formulais usually the name of the formula to install, but it can be specified in several different ways. See SPECIFYING FORMULAE.If
--new-issueis passed, automatically create a new issue in the appropriate GitHub repository as well as creating the Gist.If no logs are found, an error message is presented.
-
home: Open Homebrew's own homepage in a browser. -
homeformula: Openformula's homepage in a browser. -
infoformula: Display information aboutformula. -
info--githubformula: Open a browser to the GitHub History page for formulaformula.To view formula history locally:
brew log -pformula`` -
info--json=``version(--all|--installed|formulae): Print a JSON representation offormulae. Currently the only accepted value forversionisv1.Pass
--allto get information on all formulae, or--installedto get information on all installed formulae.See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew.html
-
install[--debug] [--env=(std|super)] [--ignore-dependencies|--only-dependencies] [--cc=``compiler] [--build-from-source|--force-bottle] [--devel|--HEAD] [--keep-tmp] [--build-bottle]formula[options...]: Installformula.formulais usually the name of the formula to install, but it can be specified in several different ways. See SPECIFYING FORMULAE.If
--debug(or-d) is passed and brewing fails, open an interactive debugging session with access to IRB or a shell inside the temporary build directory.If
--env=stdis passed, use the standard build environment instead of superenv.If
--env=superis passed, use superenv even if the formula specifies the standard build environment.If
--ignore-dependenciesis passed, skip installing any dependencies of any kind. If they are not already present, the formula will probably fail to install.If
--only-dependenciesis passed, install the dependencies with specified options but do not install the specified formula.If
--cc=``compileris passed, attempt to compile usingcompiler.compilershould be the name of the compiler's executable, for instancegcc-4.2for Apple's GCC 4.2, orgcc-4.9for a Homebrew-provided GCC 4.9.If
--build-from-source(or-s) is passed, compile the specifiedformulafrom source even if a bottle is provided. Dependencies will still be installed from bottles if they are available.If
HOMEBREW_BUILD_FROM_SOURCEis set, regardless of whether--build-from-sourcewas passed, then bothformulaand the dependencies installed as part of this process are built from source even if bottles are available.If
--force-bottleis 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.If
--develis passed, andformuladefines it, install the development version.If
--HEADis passed, andformuladefines it, install the HEAD version, aka master, trunk, unstable.If
--keep-tmpis passed, the temporary files created during installation are not deleted.If
--build-bottleis passed, prepare the formula for eventual bottling during installation.Installation options specific to
formulamay be appended to the command, and can be listed withbrew optionsformula. -
install--interactive[--git]formula: If--interactive(or-i) is passed, download and patchformula, then open a shell. This allows the user to run./configure --helpand otherwise determine how to turn the software package into a Homebrew formula.If
--git(or-g) is passed, Homebrew will create a Git repository, useful for creating patches to the software. -
irb[--examples]: Enter the interactive Homebrew Ruby shell.If
--examplesis passed, several examples will be shown. -
leaves: Show installed formulae that are not dependencies of another installed formula. -
ln,link[--overwrite] [--dry-run] [--force]formula: Symlink all offormula's installed files into the Homebrew prefix. This is done automatically when you install formulae but can be useful for DIY installations.If
--overwriteis passed, Homebrew will delete files which already exist in the prefix while linking.If
--dry-runor-nis passed, Homebrew will list all files which would be linked or which would be deleted bybrew link --overwrite, but will not actually link or delete any files.If
--force(or-f) is passed, Homebrew will allow keg-only formulae to be linked. -
linkapps[--local] [formulae]: Find installed formulae that provide.app-style macOS apps and symlink them into/Applications, allowing for easier access (deprecated).Unfortunately
brew linkappscannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper".appbundles that can be relocated. Instead, please consider usingbrew caskand migrate formulae using.apps to casks.If no
formulaeare provided, all of them will have their apps symlinked.If provided,
--localwill symlink them into the user's~/Applicationsdirectory instead of the system directory. -
list,ls[--full-name]: List all installed formulae. If--full-nameis passed, print formulae with fully-qualified names. If--full-nameis not passed, any other options (e.g.-t) are passed tolswhich produces the actual output. -
list,ls--unbrewed: List all files in the Homebrew prefix not installed by Homebrew. -
list,ls[--versions[--multiple]] [--pinned] [formulae]: List the installed files forformulae. Combined with--verbose, recursively list the contents of all subdirectories in eachformula's keg.If
--versionsis passed, show the version number for installed formulae, or only the specified formulae ifformulaeare given. With--multiple, only show formulae with multiple versions installed.If
--pinnedis passed, show the versions of pinned formulae, or only the specified (pinned) formulae ifformulaeare given. See alsopin,unpin. -
log[git-log-options]formula...: Show the git log for the given formulae. Options thatgit-log(1) recognizes can be passed before the formula list. -
migrate[--force]formulae: Migrate renamed packages to new name, whereformulaeare old names of packages.If
--force(or-f) is passed, then treat installedformulaeand passedformulaelike if they are from same taps and migrate them anyway. -
missing[--hide=``hidden] [formulae]: Check the givenformulaefor missing dependencies. If noformulaeare given, check all installed brews.If
--hide=``hiddenis passed, act as if none ofhiddenare installed.hiddenshould be a comma-separated list of formulae. -
options[--compact] (--all|--installed|formulae): Display install options specific toformulae.If
--compactis passed, show all options on a single line separated by spaces.If
--allis passed, show options for all formulae.If
--installedis passed, show options for all installed formulae. -
outdated[--quiet|--verbose|--json=``version] [--fetch-HEAD]: Show formulae that have an updated version available.By default, version information is displayed in interactive shells, and suppressed otherwise.
If
--quietis passed, list only the names of outdated brews (takes precedence over--verbose).If
--verbose(or-v) is passed, display detailed version information.If
--json=``versionis passed, the output will be in JSON format. The only valid version isv1.If
--fetch-HEADis 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. -
pinformulae: Pin the specifiedformulae, preventing them from being upgraded when issuing thebrew upgradecommand. See alsounpin. -
postinstallformula: Rerun the post-install steps forformula. -
prune[--dry-run]: 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/Applicationsand~/Applicationsthat were previously created bybrew linkapps.If
--dry-runor-nis passed, show what would be removed, but do not actually remove anything. -
reinstallformula: Uninstall and then installformula. -
search,-S: Display all locally available formulae for brewing (including tapped ones). No online search is performed if called without arguments. -
search[--desc] (text|/``text``/): Perform a substring search of formula names fortext. Iftextis surrounded with slashes, then it is interpreted as a regular expression. The search fortextis extended online to some popular taps.If
--descis passed, browse available packages matchingtextincluding a description for each. -
search(--debian|--fedora|--fink|--macports|--opensuse|--ubuntu)text: Search fortextin the given package manager's list. -
sh[--env=std]: Start a Homebrew build environment shell. Uses our years-battle-hardened Homebrew build logic to help your./configure && make && make installor even yourgem installsucceed. Especially handy if you run Homebrew in an Xcode-only configuration since it adds tools likemaketo yourPATHwhich otherwise build systems would not find.If
--env=stdis passed, use the standardPATHinstead of superenv's. -
style[--fix] [--display-cop-names] [--only-cops=[COP1,COP2..]|--except-cops=[COP1,COP2..]] [files|taps|formulae]: Check formulae or files for conformance to Homebrew style guidelines.formulaeandfilesmay not be combined. If both are omitted, style will run style checks on the whole HomebrewLibrary, including core code and all formulae.If
--fixis passed, style violations will be automatically fixed using RuboCop's--auto-correctfeature.If
--display-cop-namesis passed, the RuboCop cop name for each violation is included in the output.If
--only-copsis passed, only the given Rubocop cop(s)' violations would be checked.If
--except-copsis passed, the given Rubocop cop(s)' checks would be skipped.Exits with a non-zero status if any style violations are found.
-
switchnameversion: Symlink all of the specificversionofname's install to Homebrew prefix. -
tap: List all installed taps. -
tap[--full]user``/``repo[URL]: Tap a formula repository.With
URLunspecified, taps a formula repository from GitHub using HTTPS. Since so many taps are hosted on GitHub, this command is a shortcut fortapuser/repohttps://github.com/user/homebrew-repo``.With
URLspecified, taps a formula repository from anywhere, using any transport protocol thatgithandles. The one-argument form oftapsimplifies 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.By default, the repository is cloned as a shallow copy (
--depth=1), but if--fullis passed, a full clone will be used. To convert a shallow copy to a full copy, you can retap passing--fullwithout first untapping.tapis re-runnable and exits successfully if there's nothing to do. However, retapping with a differentURLwill cause an exception, so firstuntapif you need to modify theURL. -
tap--repair: Migrate tapped formulae from symlink-based to directory-based structure. -
tap--list-official: List all official taps. -
tap--list-pinned: List all pinned taps. -
tap-info: Display a brief summary of all installed taps. -
tap-info(--installed|taps): Display detailed information about one or moretaps.Pass
--installedto display information on all installed taps. -
tap-info--json=``version(--installed|taps): Print a JSON representation oftaps. Currently the only accepted value forversionisv1.Pass
--installedto get information on installed taps.See the docs for examples of using the JSON output: https://docs.brew.sh/Querying-Brew.html
-
tap-pintap: Pintap, prioritizing its formulae over core when formula names are supplied by the user. See alsotap-unpin. -
tap-unpintap: Unpintapso its formulae are no longer prioritized. See alsotap-pin. -
uninstall,rm,remove[--force] [--ignore-dependencies]formula: Uninstallformula.If
--force(or-f) is passed, and there are multiple versions offormulainstalled, delete all installed versions.If
--ignore-dependenciesis passed, uninstalling won't fail, even if formulae depending onformulawould still be installed. -
unlink[--dry-run]formula: Remove symlinks forformulafrom the Homebrew prefix. This can be useful for temporarily disabling a formula:brew unlinkformula&&commands&& brew linkformula``If
--dry-runor-nis passed, Homebrew will list all files which would be unlinked, but will not actually unlink or delete any files. -
unlinkapps[--local] [--dry-run] [formulae]: Remove symlinks created bybrew linkappsfrom/Applications(deprecated).Unfortunately
brew linkappscannot behave nicely with e.g. Spotlight using either aliases or symlinks and Homebrew formulae do not build "proper".appbundles that can be relocated. Instead, please consider usingbrew caskand migrate formulae using.apps to casks.If no
formulaeare provided, all linked apps will be removed.If provided,
--localwill remove symlinks from the user's~/Applicationsdirectory instead of the system directory.If
--dry-runor-nis passed, Homebrew will list all symlinks which would be removed, but will not actually delete any files. -
unpack[--git|--patch] [--destdir=``path]formulae: Unpack the source files forformulaeinto subdirectories of the current working directory. If--destdir=``pathis given, the subdirectories will be created in the directory named bypathinstead.If
--patchis passed, patches forformulaewill be applied to the unpacked source.If
--git(or-g) is passed, a Git repository will be initialized in the unpacked source. This is useful for creating patches for the software. -
unpinformulae: Unpinformulae, allowing them to be upgraded bybrew upgrade. See alsopin. -
untaptap: Remove a tapped repository. -
update[--merge] [--force]: Fetch the newest version of Homebrew and all formulae from GitHub usinggit(1) and perform any necessary migrations.If
--mergeis specified thengit mergeis used to include updates (rather thangit rebase).If
--force(or-f) is specified then always do a slower, full update check even if unnecessary. -
upgrade[install-options] [--cleanup] [--fetch-HEAD] [formulae]: Upgrade outdated, unpinned brews.Options for the
installcommand are also valid here.If
--cleanupis specified then remove previously installedformulaversion(s).If
--fetch-HEADis 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.If
formulaeare given, upgrade only the specified brews (but do so even if they are pinned; seepin,unpin). -
uses[--installed] [--recursive] [--include-build] [--include-optional] [--skip-recommended] [--devel|--HEAD]formulae: Show the formulae that specifyformulaeas a dependency. When given multiple formula arguments, show the intersection of formulae that useformulae.Use
--recursiveto resolve more than one level of dependencies.If
--installedis passed, only list installed formulae.By default,
usesshows all formulae that specifyformulaeas a required or recommended dependency. To include the:buildtype dependencies, pass--include-build. Similarly, pass--include-optionalto include:optionaldependencies. To skip:recommendedtype dependencies, pass--skip-recommended.By default,
usesshows usages offormulaeby stable builds. To find cases whereformulaeis used by development or HEAD build, pass--develor--HEAD. -
--cache: Display Homebrew's download cache. See alsoHOMEBREW_CACHE. -
--cacheformula: Display the file or directory used to cacheformula. -
--cellar: Display Homebrew's Cellar path. Default:$(brew --prefix)/Cellar, or if that directory doesn't exist,$(brew --repository)/Cellar. -
--cellarformula: Display the location in the cellar whereformulawould be installed, without any sort of versioned directory as the last path. -
--env: Show a summary of the Homebrew build environment. -
--prefix: Display Homebrew's install path. Default:/usr/local -
--prefixformula: Display the location in the cellar whereformulais or would be installed. -
--repository: Display where Homebrew's.gitdirectory is located. -
--repositoryuser``/``repo: Display where tapuser``/``repo's directory is located. -
--version: Print the version number of Homebrew to standard output and exit.
DEVELOPER COMMANDS
-
audit[--strict] [--fix] [--online] [--new-formula] [--display-cop-names] [--display-filename] [--only=``method|--except=``method] [--only-cops=[COP1,COP2..]|--except-cops=[COP1,COP2..]] [formulae]: Checkformulaefor Homebrew coding style violations. This should be run before submitting a new formula.If no
formulaeare provided, all of them are checked.If
--strictis passed, additional checks are run, including RuboCop style checks.If
--fixis passed, style violations will be automatically fixed using RuboCop's--auto-correctfeature.If
--onlineis passed, additional slower checks that require a network connection are run.If
--new-formulais 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--strictand--online.If
--display-cop-namesis passed, the RuboCop cop name for each violation is included in the output.If
--display-filenameis passed, every line of output is prefixed with the name of the file or formula being audited, to make the output easy to grep.If
--onlyis passed, only the methods namedaudit_method`` will be run.If
--exceptis passed, the methods namedaudit_method`` will not be run.If
--only-copsis passed, only the given Rubocop cop(s)' violations would be checked.If
--except-copsis passed, the given Rubocop cop(s)' checks would be skipped.auditexits with a non-zero status if any errors are found. This is useful, for instance, for implementing pre-commit hooks. -
bottle[--verbose] [--no-rebuild|--keep-old] [--skip-relocation] [--root-url=``URL] [--force-core-tap]formulae: Generate a bottle (binary package) from a formula installed with--build-bottle.If the formula specifies a rebuild version, it will be incremented in the generated DSL. Passing
--keep-oldwill attempt to keep it at its original value, while--no-rebuildwill remove it.If
--verbose(or-v) is passed, print the bottling commands and any warnings encountered.If
--skip-relocationis passed, do not check if the bottle can be marked as relocatable.If
--root-urlis passed, use the specifiedURLas the root of the bottle's URL instead of Homebrew's default.If
--force-core-tapis passed, build a bottle even ifformulais not in homebrew/core or any installed taps. -
bottle--merge[--keep-old] [--write[--no-commit]]formulae: Generate a bottle from a formula and print the new DSL merged into the existing formula.If
--writeis passed, write the changes to the formula file. A new commit will then be generated unless--no-commitis passed. -
bump-formula-pr[--devel] [--dry-run[--write]] [--audit|--strict] [--mirror=``URL] [--version=``version] [--message=``message] (--url=``URL--sha256=``sha-256|--tag=``tag--revision=``revision)formula: Creates a pull request to update the formula with a new URL or a new tag.If a
URLis specified, thesha-256checksum of the new download must also be specified. A best effort to determine thesha-256andformulaname will be made if either or both values are not supplied by the user.If a
tagis specified, the git commitrevisioncorresponding to that tag must also be specified.If
--develis passed, bump the development rather than stable version. The development spec must already exist.If
--dry-runis passed, print what would be done rather than doing it.If
--writeis passed along with--dry-run, perform a not-so-dry run making the expected file modifications but not taking any git actions.If
--auditis passed, runbrew auditbefore opening the PR.If
--strictis passed, runbrew audit --strictbefore opening the PR.If
--mirror=``URLis passed, use the value as a mirror URL.If
--version=``versionis passed, use the value to override the value parsed from the URL or tag. Note that--version=0can be used to delete an existingversionoverride from a formula if it has become redundant.If
--message=``messageis passed, appendmessageto the default PR message.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.
-
createURL[--autotools|--cmake|--meson] [--no-fetch] [--set-namename] [--set-versionversion] [--tapuser``/``repo]: Generate a formula for the downloadable file atURLand 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. Thewgetformula serves as a simple example. For the complete API have a look at http://www.rubydoc.info/github/Homebrew/brew/master/Formula.If
--autotoolsis passed, create a basic template for an Autotools-style build. If--cmakeis passed, create a basic template for a CMake-style build. If--mesonis passed, create a basic template for a Meson-style build.If
--no-fetchis passed, Homebrew will not downloadURLto the cache and will thus not add the SHA256 to the formula for you. It will also not check the GitHub API for GitHub projects (to fill out the description and homepage).The options
--set-nameand--set-versioneach take an argument and allow you to explicitly set the name and version of the package you are creating.The option
--taptakes a tap as its argument and generates the formula in the specified tap. -
edit: Open all of Homebrew for editing. -
editformula: Openformulain the editor. -
formulaformula: Display the path whereformulais located. -
linkage[--test] [--reverse]formula: Checks the library links of an installed formula.Only works on installed formulae. An error is raised if it is run on uninstalled formulae.
If
--testis passed, only display missing libraries and exit with a non-zero exit code if any missing libraries were found.If
--reverseis passed, print the dylib followed by the binaries which link to it for each library the keg references. -
man[--fail-if-changed]: Generate Homebrew's manpages.If
--fail-if-changedis 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). -
pull[--bottle] [--bump] [--clean] [--ignore-whitespace] [--resolve] [--branch-okay] [--no-pbcopy] [--no-publish] [--warn-on-publish-failure]patch-source[patch-source]: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-sourcemay 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 "https://jenkins.brew.sh/job/..." string specifying a testing job ID
If
--bottleis passed, handle bottles, pulling the bottle-update commit and publishing files on Bintray.If
--bumpis passed, for one-formula PRs, automatically reword commit message to our preferred format.If
--cleanis passed, do not rewrite or otherwise modify the commits found in the pulled PR.If
--ignore-whitespaceis passed, silently ignore whitespace discrepancies when applying diffs.If
--resolveis passed, when a patch fails to apply, leave in progress and allow user to resolve, instead of aborting.If
--branch-okayis passed, do not warn if pulling to a branch besides master (useful for testing).If
--no-pbcopyis passed, do not copy anything to the system clipboard.If
--no-publishis passed, do not publish bottles to Bintray.If
--warn-on-publish-failurewas passed, do not exit if there's a failure publishing bottles on Bintray. -
release-notes[--markdown] [previous_tag] [end_ref]: Output the merged pull requests on Homebrew/brew between two Git refs. If noprevious_tagis provided it defaults to the newest tag. If noend_refis provided it defaults toorigin/master.If
--markdownis passed, output as a Markdown list. -
tap-newuser``/``repo: Generate the template files for a new tap. -
test[--devel|--HEAD] [--debug] [--keep-tmp]formula: Most formulae provide a test method.brew testformularuns 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.To test the development or head version of a formula, use
--develor--HEAD.If
--debug(or-d) is passed and the test fails, an interactive debugger will be launched with access to IRB or a shell inside the temporary test directory.If
--keep-tmpis passed, the temporary files created for the test are not deleted.Example:
brew install jruby && brew test jruby -
tests[--verbose] [--coverage] [--generic] [--no-compat] [--only=``test_script[:``line_number]] [--seedseed] [--online] [--official-cmd-taps]: Run Homebrew's unit and integration tests. If provided,--only=``test_scriptruns onlytest_script_spec.rb, and--seedrandomizes tests with the provided value instead of a random seed.If
--verbose(or-v) is passed, print the command that runs the tests.If
--coverageis passed, also generate code coverage reports.If
--genericis passed, only run OS-agnostic tests.If
--no-compatis passed, do not load the compatibility layer when running tests.If
--onlineis passed, include tests that use the GitHub API and tests that use any of the taps for official external commands. -
update-test[--commit=``commit] [--before=``date] [--to-tag] [--keep-tmp]: Runs a test ofbrew updatewith a new repository clone.If no arguments are passed, use
origin/masteras the start commit.If
--commit=``commitis passed, usecommitas the start commit.If
--before=``dateis passed, use the commit atdateas the start commit.If
--to-tagis passed, setHOMEBREW_UPDATE_TO_TAGto test updating between tags.If
--keep-tmpis passed, retain the temporary directory containing the new repository clone.
OFFICIAL EXTERNAL COMMANDS
-
bundle: Bundler for non-Ruby dependencies from Homebrew: https://github.com/Homebrew/homebrew-bundle -
cask: Install macOS applications distributed as binaries: https://github.com/caskroom/homebrew-cask -
services: Integrates Homebrew formulae with macOS'slaunchctl(1) manager: https://github.com/Homebrew/homebrew-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.html
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/vimorhomebrew/versions/node4. -
An arbitrary URL: Homebrew can install formulae via URL, e.g.
https://raw.github.com/Homebrew/homebrew-core/master/Formula/git.rb. The formula file will be cached for later use.
ENVIRONMENT
-
HOMEBREW_ARTIFACT_DOMAIN: If set, instructs Homebrew to use the given URL as a download mirror for bottles and binaries. -
HOMEBREW_AUTO_UPDATE_SECS: If set, Homebrew will only check for autoupdates once per this seconds interval.Default:
60. -
HOMEBREW_AWS_ACCESS_KEY_ID,HOMEBREW_AWS_SECRET_ACCESS_KEY: When using theS3download strategy, Homebrew will look in these variables for access credentials (see https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-started.html#cli-environment to retrieve these access credentials from AWS). If they are not set, theS3download strategy will download with a public (unsigned) URL. -
HOMEBREW_BOTTLE_DOMAIN: If set, instructs Homebrew to use the given URL as a download mirror for bottles. -
HOMEBREW_BROWSER: If set, uses this setting as the browser when opening project homepages, instead of the OS default browser. -
HOMEBREW_BUILD_FROM_SOURCE: 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. -
HOMEBREW_CACHE: If set, instructs Homebrew to use the given directory as the download cache.Default:
~/Library/Caches/Homebrew. -
HOMEBREW_CURL_VERBOSE: If set, Homebrew will pass--verbosewhen invokingcurl(1). -
HOMEBREW_DEBUG: If set, any commands that can emit debugging information will do so. -
HOMEBREW_DEBUG_INSTALL: Whenbrew install -dorbrew install -idrops into a shell,HOMEBREW_DEBUG_INSTALLwill be set to the name of the formula being brewed. -
HOMEBREW_DEBUG_PREFIX: Whenbrew install -dorbrew install -idrops into a shell,HOMEBREW_DEBUG_PREFIXwill be set to the target prefix in the Cellar of the formula being brewed. -
HOMEBREW_DEVELOPER: If set, Homebrew will tweak behaviour to be more relevant for Homebrew developers (active or budding) e.g. turning warnings into errors. -
HOMEBREW_EDITOR: If set, Homebrew will use this editor when editing a single formula, or several formulae in the same directory.Note:
brew editwill 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. -
HOMEBREW_FORCE_VENDOR_RUBY: If set, Homebrew will always use its vendored, relocatable Ruby 2.0 version even if the system version of Ruby is >=2.0. -
HOMEBREW_GIT: When using Git, Homebrew will useGITif set, a Homebrew-built Git if installed, or the system-provided binary.Set this to force Homebrew to use a particular git binary.
-
HOMEBREW_GITHUB_API_TOKEN: A personal access token for the GitHub API, which you can create at https://github.com/settings/tokens. If set, GitHub will allow you a greater number of API requests. See https://developer.github.com/v3/#rate-limiting for more information. Homebrew uses the GitHub API for features such asbrew search.Note: Homebrew doesn't require permissions for any of the scopes.
-
HOMEBREW_LOGS: If set, Homebrew will use the given directory to store log files. -
HOMEBREW_MAKE_JOBS: If set, instructs Homebrew to use the value ofHOMEBREW_MAKE_JOBSas the number of parallel jobs to run when building withmake(1).Default: the number of available CPU cores.
-
HOMEBREW_NO_ANALYTICS: If set, Homebrew will not send analytics. See: https://docs.brew.sh/Analytics.html -
HOMEBREW_NO_AUTO_UPDATE: If set, Homebrew will not auto-update before runningbrew install,brew upgradeorbrew tap. -
HOMEBREW_NO_EMOJI: If set, Homebrew will not print theHOMEBREW_INSTALL_BADGEon a successful build.Note: Homebrew will only try to print emoji on Lion or newer.
-
HOMEBREW_NO_INSECURE_REDIRECT: If set, Homebrew will not permit redirects from secure HTTPS to insecure HTTP.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_GITHUB_API: If set, Homebrew will not use the GitHub API for e.g searches or fetching relevant issues on a failed install. -
HOMEBREW_INSTALL_BADGE: Text printed before the installation summary of each successful build. Defaults to the beer emoji. -
HOMEBREW_SVN: When exporting from Subversion, Homebrew will useHOMEBREW_SVNif set, a Homebrew-built Subversion if installed, or the system-provided binary.Set this to force Homebrew to use a particular
svnbinary. -
HOMEBREW_TEMP: If set, instructs Homebrew to useHOMEBREW_TEMPas 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.This issue typically occurs when using FileVault or custom SSD configurations.
-
HOMEBREW_VERBOSE: If set, Homebrew always assumes--verbosewhen running commands.
USING HOMEBREW BEHIND A PROXY
Homebrew uses several commands for downloading files (e.g. curl, git, svn).
Many of these tools can download via a proxy. It's common for these tools
to read proxy parameters from environment variables.
For the majority of cases setting http_proxy is enough. You can set this in
your shell profile, or you can use it before a brew command:
http_proxy=http://`host`:`port` brew install foo
If your proxy requires authentication:
http_proxy=http://`user`:`password`@`host`:`port` brew install foo
SEE ALSO
Homebrew Documentation: https://docs.brew.sh
brew-cask(1), git(1), git-log(1)
AUTHORS
Homebrew's lead maintainer is Mike McQuaid.
Homebrew/homebrew-core's lead maintainer is ilovezfs.
Homebrew's other current maintainers are Alyssa Ross, Andrew Janke, Alex Dunn, FX Coudert, Josh Hagins, JCount, Misty De Meo, neutric, Tomasz Pajor, Markus Reiter, Tim Smith, Tom Schoonjans, Uladzislau Shablinski and William Woodruff.
Former maintainers with significant contributions include Baptiste Fontaine, Xu Cheng, Martin Afanasjew, Dominyk Tiller, Brett Koonce, Charlie Sharpsteen, Jack Nagel, Adam Vandenberg 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