Homebrew Bundle
Homebrewでインストールするパッケージをファイルで管理する
Homebrew Bundleを使うと、Homebrew, Homebrew Cask, Mac App Store, Whaleblewから、パッケージやアプリケーションを1コマンドでインストールできます。
Macでの環境構築がめちゃくちゃ楽になります。
パッケージをインストールする
brew bundle
ターミナルにbrew bundle
と入力すると、カレントディレクトリにあるBrewfile
を読み込み、自動的にインストールが始まります。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tap "homebrew/cask-drivers" | |
brew "docker" | |
brew "hugo" | |
brew "git" | |
brew "mysql" | |
brew "python" | |
brew "tree" | |
cask "alfred" | |
cask "arduino" | |
cask "docker" | |
cask "fujitsu-scansnap-home" | |
cask "fritzing" | |
cask "google-chrome" | |
cask "tweeten" | |
cask "visual-studio-code" | |
cask "r" |
Brewfileのパスを指定する
brew bundle --file=<path>
~/.Brewfile
にあるBrewfileを使用する
brew bundle --global
インストールした全てのパッケージをBrewfileに書き出す
brew bundle dump
Brewfileを上書きする
brew bundle dump --force
Brewfileに載っていないパッケージをアンインストールする
brew bundle cleanup
Brewfileに載っているパッケージの更新を確認する
brew bundle check
Brewfileに載っているパッケージを一覧表示する
brew bundle list
オプションを付けなければ、Homebrewでインストールされたパッケージのみが表示されます
Homebrewでインストールされたパッケージを表示する
brew bundle list --brews
Homebrew Caskでインストールされたパッケージを表示する
brew bundle list --casks
brew tapでインストールされたパッケージを表示する
brew bundle list --taps
App Storeからインストールされたパッケージを表示する
brew bundle list --mas
全てのパッケージを表示する
brew bundle list --all
Homebrew外部のビルドコマンドを実行する
brew bundle exec -- bundle install
エラー
パッケージをインストール中に下記のエラーが出ました。
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
どうやら、gitのバッファが足りないことが原因らしいので、
git config --global http.postBuffer 2M
と設定したら、インストールできました
Homebrew Bundle complete! 10 Brewfile dependencies now installed.