Skip to content

Instantly share code, notes, and snippets.

@iqiancheng
Created April 29, 2025 10:05
Show Gist options
  • Save iqiancheng/aca38a3778db3547ac3a946b792f2157 to your computer and use it in GitHub Desktop.
Save iqiancheng/aca38a3778db3547ac3a946b792f2157 to your computer and use it in GitHub Desktop.
macos brew setup for a new mac
#!/bin/bash
# Required taps
TAPS=(
bookstairs/tap
homebrew/services
lijy91/biyi
quackduck/tap
tabbyml/tabby
ygsgdbd/tap
)
# Add missing taps
echo "Checking Homebrew taps..."
for tap in "${TAPS[@]}"; do
brew tap | grep -q "^$tap\$" || brew tap "$tap"
done
# Required formulae
FORMULAE=(
aom flac hugo liblqr libx11 openexr snappy
aribb24 fontconfig hunspell libmicrohttpd libxau openjpeg speex
asitop freetype icu4c@76 libmng libxcb openssl@3 sqlite
assimp frei0r icu4c@77 libmpc libxdmcp opus srt
autojump gcc imath libogg libxrender p7zip tabby
bash gd isl libomp libyaml pandoc tesseract
bc gdbm jasper libpng little-cms2 pango theora
bind gdk-pixbuf jbig2dec libraw lz4 pcre2 tree
bookhunter gettext jemalloc librist lzo pixman unbound
brotli ghostscript jpeg-turbo librsvg m4 pycparser uniclip
btop giflib jpeg-xl libsamplerate mbedtls python-packaging userspace-rcu
c-ares git jq libsndfile md4c python-setuptools uv
ca-certificates git-lfs json-c libsodium mlx [email protected] webp
cairo gitleaks lame libsoxr mpdecimal [email protected] wget
certifi glances leptonica libssh mpfr [email protected] x264
cffi glib libarchive libssh2 mpg123 qcachegrind x265
cjson gmp libass libtasn1 msmtp qt xorgproto
cmake gnutls libavif libtiff ncurses rav1e xvid
create-dmg graphite2 libb2 libtool netcat readline xz
cryptography graphviz libbluray libunibreak netpbm rtmpdump zeromq
curl gts libde265 libunistring nettle rubberband zimg
dav1d harfbuzz libdeflate libuv node ruby zsh-autosuggestions
dbus hexo libevent libvidstab ollama sdl2 zstd
double-conversion highway libheif libvmaf oniguruma shared-mime-info
faiss htop libidn libvorbis openblas six
ffmpeg httrack libidn2 libvpx opencore-amr smartmontools
)
# Required casks
CASKS=(
applite chatwise jordanbaird-ice obsidian texifier utm zotero
blender cherry-studio keepingyouawake pronotes texmaker v2bar
bruno chromedriver localsend rapidapi texstudio vastwords
calibre figma meld reqable thunder vivaldi
capslocknodelay grandperspective miniconda switchhosts tuist windsurf
)
# Install missing formulae
echo "Installing formulae..."
for formula in "${FORMULAE[@]}"; do
brew list "$formula" &>/dev/null || brew install "$formula"
done
# Install missing casks
echo "Installing casks..."
for cask in "${CASKS[@]}"; do
brew list --cask "$cask" &>/dev/null || brew install --cask "$cask"
done
echo "Done!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment