Homebrewのインストール方については、前記事 MacにHomebrewをインストール を参考してください。


コマンド 説明
$ brew config Homebrewの情報を表示。
$ brew help Homebrewのコマンドの使い方を表示。
$ brew list インストールされているパッケージを表示。
$ brew search 配布されているパッケージを確認。
$ brew install パッケージをインストール。
$ brew install -vd -vd をつけることで、詳細を表示しながらパッケージをインストール。
$ brew update パッケージとHomebrewをアップデート。
$ brew upgrade パッケージをアップグレード。
$ brew uninstall パッケージをアンインストール。
$ brew create パッケージを作成。
$ brew edit パッケージの内容を書き換え。
$ brew home Homebrewや、そのパッケージのページ表示。

brew config


$ brew config
HEAD: 664d0c67d5947605c914c4c56ebcfaa80cb6eca0
Last commit: 3 months ago
Core tap ORIGIN:
Core tap HEAD: f36e920aba81770f0459de60a399c2a7bd9a9c1c
Core tap last commit: 9 weeks ago
HOMEBREW_REPOSITORY: /usr/local/Homebrew
HOMEBREW_CELLAR: /usr/local/Cellar
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.0.0-p481
Clang: 7.0 build 700
Git: 2.11.1 => /usr/local/bin/git
Perl: /usr/bin/perl
Python: /usr/bin/python
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.7.0_71
macOS: 10.10.5-x86_64
Xcode: 7.2.1
X11: N/A

brew help


$ brew help
Example usage:
  brew search [TEXT|/REGEX/]
  brew (info|home|options) [FORMULA...]
  brew install FORMULA...
  brew update
  brew upgrade [FORMULA...]
  brew uninstall FORMULA...
  brew list [FORMULA...]

  brew config
  brew doctor
  brew install -vd FORMULA

  brew create [URL [--no-fetch]]
  brew edit [FORMULA...]

Further help:
  man brew
  brew help [COMMAND]
  brew home


$ brew help install
brew install [--debug] [--env=std|super] [--ignore-dependencies] [--only-dependencies] [--cc=compiler] [--build-from-source] [--devel|--HEAD] [--keep-tmp] formula:
    Install formula.

    formula is usually the name of the formula to install, but it can be specified
    in several different ways. See [SPECIFYING FORMULAE][].

    If --debug is passed and brewing fails, open an interactive debugging
    session with access to IRB or a shell inside the temporary build directory.

    If --env=std is passed, use the standard build environment instead of superenv.

    If --env=super is passed, use superenv even if the formula specifies the
    standard build environment.

    If --ignore-dependencies is passed, skip installing any dependencies of
    any kind. If they are not already present, the formula will probably fail
    to install.

    If --only-dependencies is passed, install the dependencies with specified
    options but do not install the specified formula.

    If --cc=compiler is passed, attempt to compile using compiler.
    compiler should be the name of the compiler's executable, for instance
    gcc-4.2 for Apple's GCC 4.2, or gcc-4.9 for a Homebrew-provided GCC

    If --build-from-source or -s is passed, compile the specified formula from
    source even if a bottle is provided. Dependencies will still be installed
    from bottles if they are available.

    If HOMEBREW_BUILD_FROM_SOURCE is set, regardless of whether --build-from-source was
    passed, then both formula and the dependencies installed as part of this process
    are built from source even if bottles are available.

    If --force-bottle is passed, install from a bottle if it exists for the
    current or newest version of macOS, even if it would not normally be used
    for installation.

    If --devel is passed, and formula defines it, install the development version.

    If --HEAD is passed, and formula defines it, install the HEAD version,
    aka master, trunk, unstable.

    If --keep-tmp is passed, the temporary files created during installation
    are not deleted.

brew install --interactive [--git] formula:
    Download and patch formula, then open a shell. This allows the user to
    run ./configure --help and otherwise determine how to turn the software
    package into a Homebrew formula.

    If --git is passed, Homebrew will create a Git repository, useful for
    creating patches to the software.

brew list


$ brew list


$ brew list node

brew search


$ brew search vim

brew install


$ brew install node

brew update


$ brew update

brew upgrade


$ brew upgrade node

brew uninstall


$ brew uninstall node