Skip to content

Instantly share code, notes, and snippets.

@davidteren
Last active May 26, 2024 12:22
Show Gist options
  • Save davidteren/898f2dcccd42d9f8680ec69a3a5d350e to your computer and use it in GitHub Desktop.
Save davidteren/898f2dcccd42d9f8680ec69a3a5d350e to your computer and use it in GitHub Desktop.
Install Nerd Fonts via Homebrew [updated & fixed]

Nerd Fonts for your IDE

https://www.nerdfonts.com/font-downloads

The following solution thanks to @hackerzgz & @snacky101 will install all nerd fonts;

brew tap homebrew/cask-fonts
brew search '/font-.*-nerd-font/' | awk '{ print $1 }' | xargs -I{} brew install --cask {} || true

If you prefer to explicitly list the nerd fonts you want to install then you can use the solution provided by @frame45

#!/bin/bash

fonts_list=(
  font-3270-nerd-font
  font-fira-mono-nerd-font
  font-inconsolata-go-nerd-font
  font-inconsolata-lgc-nerd-font
  font-inconsolata-nerd-font
  font-monofur-nerd-font
  font-overpass-nerd-font
  font-ubuntu-mono-nerd-font
  font-agave-nerd-font
  font-arimo-nerd-font
  font-anonymice-nerd-font
  font-aurulent-sans-mono-nerd-font
  font-bigblue-terminal-nerd-font
  font-bitstream-vera-sans-mono-nerd-font
  font-blex-mono-nerd-font
  font-caskaydia-cove-nerd-font
  font-code-new-roman-nerd-font
  font-cousine-nerd-font
  font-daddy-time-mono-nerd-font
  font-dejavu-sans-mono-nerd-font
  font-droid-sans-mono-nerd-font
  font-fantasque-sans-mono-nerd-font
  font-fira-code-nerd-font
  font-go-mono-nerd-font
  font-gohufont-nerd-font
  font-hack-nerd-font
  font-hasklug-nerd-font
  font-heavy-data-nerd-font
  font-hurmit-nerd-font
  font-im-writing-nerd-font
  font-iosevka-nerd-font
  font-jetbrains-mono-nerd-font
  font-lekton-nerd-font
  font-liberation-nerd-font
  font-meslo-lg-nerd-font
  font-monoid-nerd-font
  font-mononoki-nerd-font
  font-mplus-nerd-font
  font-noto-nerd-font
  font-open-dyslexic-nerd-font
  font-profont-nerd-font
  font-proggy-clean-tt-nerd-font
  font-roboto-mono-nerd-font
  font-sauce-code-pro-nerd-font
  font-shure-tech-mono-nerd-font
  font-space-mono-nerd-font
  font-terminess-ttf-nerd-font
  font-tinos-nerd-font
  font-ubuntu-nerd-font
  font-victor-mono-nerd-font
)

brew tap homebrew/cask-fonts

for font in "${fonts_list[@]}"
do
  brew install --cask "$font"
done
exit
@Nilubkal
Copy link

So cool, thanks guys !

@TunaCici
Copy link

TunaCici commented May 4, 2023

Thanks a lot for the script! Love you all.

@archae0pteryx
Copy link

doing an upgrade once you've installed all of these is the pits... i do wish it were bundled a bit better. Be warned if you install the bulk in a loop or via a script

@ckuhtz
Copy link

ckuhtz commented Jun 7, 2023

Thank you! This rocks! 💣

@osalbahr
Copy link

Thoughts about adding this tap to Homebrew's main repo? I'd say nerd fonts are common enough.

@ckuhtz
Copy link

ckuhtz commented Jun 17, 2023

I think that is a great idea.

@nhessler
Copy link

agreed. would be great to have these as part of the main repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment