Skip to content

Instantly share code, notes, and snippets.

@yoshimana
Created October 29, 2019 07:23
Show Gist options
  • Star 40 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save yoshimana/43b9205ddedad0ad65f2dee00c6f4261 to your computer and use it in GitHub Desktop.
Save yoshimana/43b9205ddedad0ad65f2dee00c6f4261 to your computer and use it in GitHub Desktop.
Brew Bundleの使い方

Brew Bundle

インストール

$ brew tap Homebrew/bundle

コマンドオプション

brew bundle :リストファイルから一括インストール

$ touch Brewfile
$ brew bundle
  • --global ホームディレクトリのリストファイル~/.Brewfileを使用

  • --file 'path/filename' リストファイルを指定

dump :インストールリストファイル作成

$ brew bundle dump
  • 現在のディレクトリに Brewfile を作成しインストールリストを出力

    ap "homebrew/cask"
    tap "user/tap-repo", "https://user@bitbucket.org/user/homebrew-tap-repo.git"
    cask_args appdir: "/Applications"
    
    brew "imagemagick"
    brew "denji/nginx/nginx-full", args: ["with-rmtp-module"]
    brew "mysql@5.6", restart_service: true, link: true, conflicts_with: ["mysql"]
    
    cask "firefox", args: { appdir: "~/my-apps/Applications" }
    cask "google-chrome"
    cask "java" unless system "/usr/libexec/java_home --failfast"
    cask "homebrew/cask-fonts/font-charter"
    
    mas "1Password", id: 443987910
    
  • オプション

    • --force リストファイルを強制上書き
    • --global ホームディレクトリにリストファイル.Brewfileを作成
    • --file 'path/filename' リストファイルを指定
    • --describe 'comment' コメント行にcommentを出力

cleanup :アプリ・パッケージ一括削除

  • Brewfileに記載のないアプリケーションをリスト表示する
  • オプション
    • --force リストせずにアンインストール
    • --global ホームディレクトリのリストファイル~/.Brewfileを使用
    • --file 'path/filename' リストファイルを指定

check :Brewfile記載の内、インストール・アップグレードが必要なものを表示

  • オプション
    • --force リストせずにアンインストール
    • --global ホームディレクトリのリストファイル~/.Brewfileを使用
    • --file 'path/filename' リストファイルを指定

list :Brewfile記載のリストを表示する

  • オプション
    • —cask,—taps,—mas,--brews で表示形式指定、defaultが--brews--allですべて表示
    • --global ホームディレクトリのリストファイル~/.Brewfileを使用
    • --file 'path/filename' リストファイルを指定
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment