Hola와 함께 몇 분 안에 Mac 개발 환경 설정

발행: (2025년 12월 4일 오후 12:56 GMT+9)
5 min read
원문: Dev.to

Source: Dev.to

왜 Hola인가요?

  • 전통적인 Chef 설치와 같은 무거운 의존성이 없습니다.
  • Ruby DSL은 읽기 쉽고 표현력이 풍부하지만 대부분의 사용자에게는 선택 사항입니다.
  • Homebrew, mise, dotfiles, 그리고 macOS 시스템 설정을 하나의 워크플로우에서 처리합니다.
  • Zig로 구축되어 빠르고 메모리 사용량이 매우 적습니다.

기능

관습 우선 구성

이미 알고 있는 도구들을 사용하세요:

Brewfile (Homebrew’s native format)

brew "git"
brew "neovim"
cask "ghostty"
cask "visual-studio-code"

mise.toml (mise’s native format)

[tools]
node = "24"
python = "3.14"
rust = "stable"

선택적 Ruby DSL

고급 프로비저닝을 위해 (사용자 90 %는 필요하지 않음):

# ~/.config/hola/provision.rb
package ["git", "tmux", "neovim"]

execute "install-oh-my-zsh" do
  command 'sh -c "$(curl -fsSL https://ohmyz.sh/install.sh)"'
  not_if { Dir.exist?(File.expand_path("~/.oh-my-zsh")) }
end

지능형 Dotfiles 관리

# Bootstrap from a GitHub repo (clones + installs packages + links dotfiles)
hola apply --github username/dotfiles

# Or just link dotfiles from a local directory
hola link --dotfiles ~/.dotfiles

macOS 데스크톱 구성

Dock 레이아웃과 시스템 기본값을 Ruby로 직접 정의합니다:

# ~/.config/hola/provision.rb
macos_dock do
  apps [
    '/Applications/Ghostty.app/',
    '/Applications/Visual Studio Code.app/',
    '/Applications/Safari.app/',
  ]
  orientation "bottom"
  autohide true
  magnification true
  tilesize 50
  largesize 40
end

macos_defaults "show hidden files" do
  domain "com.apple.finder"
  key "AppleShowAllFiles"
  value true
end

macos_defaults "keyboard repeat rate" do
  global true
  key "KeyRepeat"
  value 1
end

설치

# Quick install (recommended)
curl -fsSL https://hola.ac/install | bash

또는 Homebrew를 통해:

brew tap ratazzi/hola
brew install hola

또는 수동으로 다운로드:

curl -fsSL https://github.com/ratazzi/hola/releases/latest/download/hola-macos-aarch64 -o hola
chmod +x hola
xattr -d com.apple.quarantine hola
sudo mv hola /usr/local/bin/

예시 저장소 레이아웃

repo/
├── Brewfile
├── mise.toml
└── .config/
    └── hola/
        └── provision.rb   # optional

Brewfile (repo root)

brew "git"
brew "gh"
brew "ripgrep"
brew "fzf"
cask "ghostty"
cask "zed"
cask "raycast"

mise.toml (repo root)

[tools]
node = "20"
python = "3.12"
go = "latest"

Provision 파일 (선택 사항 – macOS 데스크톱 구성 섹션의 예시를 참고하세요).

한 명령으로 모든 것을 설정합니다:

hola apply --github username/dotfiles

Hola가 하는 일

  • ✅ dotfiles 저장소를 ~/.dotfiles에 복제합니다
  • Brewfile에 있는 모든 Homebrew 패키지를 설치합니다
  • mise.toml에서 도구 버전을 설치하고 고정합니다
  • ✅ dotfiles를 홈 디렉터리에 심볼릭 링크합니다
  • ✅ Dock 및 시스템 설정을 위해 provision.rb를 실행합니다 (존재하는 경우)

기존 구성 내보내기

# Export current Dock configuration
hola dock

# Export Homebrew packages to Brewfile
brew bundle dump

전사적인 Dotfiles 저장소 예시

Brewfile

# Core tools every developer needs
brew "git"
brew "docker"
brew "kubectl"

# Company‑specific tools
cask "slack"
cask "zoom"
cask "visual-studio-code"

Provision 파일 (고급 설정)

# Install VS Code extensions
execute "install vscode extensions" do
  command "code --install-extension ms-python.python"
  command "code --install-extension dbaeumer.vscode-eslint"
  not_if "code --list-extensions | grep -q ms-python.python"
end

# Clone team repositories
directory "/Users/#{ENV['USER']}/work" do
  recursive true
end

git "/Users/#{ENV['USER']}/work/backend" do
  repository "git@github.com:company/backend.git"
end

신입 사원은 간단히 실행합니다:

hola apply --github company/dotfiles

고급 Ruby DSL 사용법

# In ~/.config/hola/provision.rb
if ENV['USER'] == 'john'
  package "discord"
end

case node['platform']
when 'darwin'
  package "mas"  # Mac App Store CLI
when 'ubuntu'
  apt_repository "ppa:graphics-drivers/ppa"
end

template "/Users/#{ENV['USER']}/.gitconfig" do
  content "It’s like Chef, but without the baggage."
end

“드디어 작동하는 Dock 관리.” – 더 이상 수동으로 끌어다 놓거나 복잡한 AppleScript를 사용할 필요가 없습니다. 코드로 Dock 레이아웃을 정의하세요.

“관습 우선 구성을 제대로 구현.” – 스마트 기본값 덕분에 입력이 줄어듭니다. Hola는 dotfiles가 어디에 있어야 하는지 알고 있습니다.

시작하기

# Install
curl -fsSL https://hola.ac/install | bash

# Bootstrap from your dotfiles repo
hola apply --github username/dotfiles

또는 Brewfile만으로 간단히 시작하세요:

echo 'brew "git"' > Brewfile
echo 'cask "ghostty"' >> Brewfile
hola apply

링크

시간을 소중히 여기는 개발자들이 Zig로 ❤️를 담아 만들었습니다.

Back to Blog

관련 글

더 보기 »

Powershell은 은근히 멋지다

PowerShell는 더 인기 있는 쉘에 비해 종종 간과되지만, 로컬 개발 워크플로를 간소화할 수 있는 강력한 기능을 제공합니다. 아래는 ...