2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

dotfiles管理にhomebrew-bundleを導入する

Last updated at Posted at 2019-09-23

はじめに

最近ようやくdotfilesをGitで管理するようにしました。
頻繁にマシンを入れ替えるわけではないけど、こういうのっていざというとき案外役に立つので馬鹿にできない。パッケージマネージャーにhomebrewを使っているのでhomebrew用のインストールシェルを用意していました。homebrewにはhomebrew-bundleというものがあることを恥ずかしながら最近知ったので試してみます。

homebrew-bundle

Brewfileというファイルを作っておいてその中に必要なものを書いておいてbrew bundleコマンドで
複数パッケージをまとめてインストールすることができるらしい。素敵。

Brewfile

cask_args appdir: '/Applications'

tap "caskroom/fonts"
tap "homebrew/bundle"
tap "homebrew/cask"
tap "homebrew/core"
tap "sanemat/font"

# brew
brew 'awscli'
brew 'colordiff'
brew 'composer'
brew 'curl'
brew 'diff-so-fancy'
brew 'git'
brew "go"
brew 'neovim'
brew 'openssl'
brew 'peco'
brew "pyenv"
brew "pyenv-virtualenv"
brew 'ssh-copy-id'
brew 'tmux'
brew 'tree'
brew "vim"
brew 'wget'
brew 'zsh-completions'
brew "sanemat/font/ricty", args: ["with-powerline"]

# cask
cask 'alfred'
cask 'appcleaner'
cask 'clipy'
cask 'docker'
cask 'google-chrome'
cask 'google-japanese-ime'
cask 'iterm2'
cask 'sequel-pro'
cask 'visual-studio-code'
cask "caskroom/fonts/font-hack-nerd-font"

brew bundle

▸ brew bundle     
Using caskroom/fonts
Using homebrew/bundle
Using homebrew/cask
Using homebrew/core
....

インストール済みのものはUsing、未インストールのものはInstallingで表示される

おまけ

Brewfileに入っていないアプリを削除

brew bundle cleanup

Brewfileにインストール済みアプリのリストを出力

brew bundle dump
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?