C.W.K.
Stream
Lesson 09 of 14 · published

Brewfile 통한 패키지 관리

~12 min · brewfile, homebrew, consistency

Level 0Pinger
0 XP0/101 lessons0/12 achievements
0/150 XP to next level150 XP to go0% complete

한 파일, 동일 패키지

brew bundle + Brewfile 이 macOS 의 requirements.txt 등가 — 선언적 패키지 관리. 패키지 한 번 나열; brew bundle 돌리는 모든 머신이 같은 셋 설치. Dotfiles repo 와 결합하면 새 머신 셋업이 두 명령.

Brewfile 에 들어가는 것

  • brew "name" — CLI 도구 (git, ripgrep, jq, mtr).
  • cask "name" — GUI 앱 (Tailscale, iTerm2, VS Code).
  • tap "user/repo" — 메인 brew 에 없는 third-party formula.
  • mas "App Name", id: 12345mas CLI 통한 App Store 앱.

Code

현재 상태에서 생성·bash
# Snapshot what's installed now
brew bundle dump --file=~/dotfiles/Brewfile

# Inspect
cat ~/dotfiles/Brewfile
진짜 같은 Brewfile·ruby
# Brewfile
tap "homebrew/cask"

# Networking & ops
brew "git"
brew "gh"
brew "iperf3"
brew "mtr"
brew "nmap"
brew "rsync"
brew "wget"
brew "jq"
brew "ripgrep"
brew "fd"
brew "bat"
brew "eza"
brew "starship"
brew "wireguard-tools"

# Dev
brew "node"
brew "python@3.12"
brew "miniconda"

# GUI
cask "tailscale"
cask "iterm2"
cask "visual-studio-code"
cask "raycast"
적용하고 체크·bash
# Install everything
brew bundle --file=~/dotfiles/Brewfile

# What's missing?
brew bundle check --file=~/dotfiles/Brewfile

# What would be installed (dry run)
brew bundle list --file=~/dotfiles/Brewfile

# Fleet-wide update
for host in $(cat ~/.fleet/all.txt); do
    echo "=== $host ==="
    ssh "$host" 'cd ~/dotfiles && git pull && brew bundle && brew update && brew upgrade'
done

External links

Exercise

brew bundle dump --file=~/dotfiles/Brewfile 돌려. 출력 훑어 — 모든 패키지 알아? Commit. 두 번째 맥에서 brew bundle --file=~/dotfiles/Brewfile. 끝나면 두 머신이 동일 Homebrew 상태. 그게 fleet 레벨 패키지 일관성.

Progress

Progress is local-only — sign in to sync across devices.
이 페이지에서 버그를 발견하셨거나 피드백이 있으세요?문제 신고

댓글 0

🔔 답글 알림 (로그인 필요)
로그인댓글을 남기려면 로그인해 주세요.

아직 댓글이 없어요. 첫 댓글을 남겨보세요.