Help us understand the problem. What is going on with this article?

brew bundleでMacのアプリをまとめてインストール・管理

More than 1 year has passed since last update.

AnsibleでMacのアプリをインストールしたり、管理したりしたが、便利な brew bundle コマンドを発見した。
新人のMacの開発環境準備や、自分のMacを変えたり、リセットしたりするときにも楽勝。

Brewfile

Brewfile を用意して、brew bundleを実行すると、アプリを一括インストールできる。

# Brewfile
cask_args appdir: "/Applications"
tap "caskroom/cask"
tap "homebrew/bundle"
tap "homebrew/core"

cask "google-chrome"
cask "slack"
cask "github"
brew "git"
brew "vim"
brew "zsh"
brew "zsh-completions"
cask "iterm2"
cask "atom"
cask "jetbrains-toolbox"

brew "docker"
cask "docker"

さらに、

  • brew bundle cleanup でBrewfileに入っていないアプリを削除
  • brew bundle dump でBrewfileにインストール済みアプリのリストを出力
  • --globalオプションで ~/.Brewfile を利用

などができます。

Mac引っ越しの流れ

引越し元Macで

cp ~/.Brewfile ~/.Brewfile.bak
brew bundle dump --global --force
gist ~/.Brewfile

すると Brewfile が https://gist.github.com/1d0a1d21c58314d4d4546570c3ac77f8 のような URL に保存される。

引越し先Macで

  • 先に保存した Brewfile をダウンロードし、~/.Brewfile に保存
  • brew をインストール
  • brew bundle --global を実行

参考

Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした