A bash script to search, preview, and install Nerd Fonts.
- Interactive Search: Search the Nerd Fonts catalog with
fzf. - Details Preview: View font versions, license data, and descriptions before download.
- Batch Selection: Select multiple fonts with
Tabto install them in one pass. - Direct CLI Mode: Pass font names as arguments for dotfiles and scripts.
- Catalog List: Print all available fonts and versions with
--list. - System Detection: Installs fonts to standard user font folders on macOS and Linux.
- Cache Refresh: Updates fontconfig cache after installation.
- Clean Teardown: Removes temporary download files on completion or exit.
Install these command-line tools:
curl- Download fonts and catalog datajq- Parse font metadataunzip- Extract font archivesfzf- Interactive fuzzy search (optional for direct CLI mode)
macOS (Homebrew):
brew install fzf curl jq unzipUbuntu / Debian:
sudo apt update && sudo apt install fzf curl jq unzipFedora:
sudo dnf install fzf curl jq unzipArch Linux:
sudo pacman -S fzf curl jq unzipRun the script without arguments:
./install-nerd-font.sh| Key | Action |
|---|---|
Type |
Search fonts |
Up / Down or Ctrl-k / Ctrl-j |
Move selection |
Tab / Shift-Tab |
Select or deselect multiple fonts |
Enter |
Install selected font(s) |
Esc / Ctrl-c |
Cancel |
Install fonts directly by name:
# Install a single font
./install-nerd-font.sh Hack
# Install multiple fonts
./install-nerd-font.sh Hack "JetBrains Mono" CascadiaCode FiraCodeFont names are case-insensitive. You can pass patched names, package names, or original family names.
Print all available fonts:
./install-nerd-font.sh --listSpecify an install path with -d or the FONT_DIR variable:
# With command line option
./install-nerd-font.sh -d ~/.local/share/custom-fonts Hack
# With environment variable
FONT_DIR=/opt/custom/fonts ./install-nerd-font.sh- macOS:
~/Library/Fonts - Linux:
${XDG_DATA_HOME:-$HOME/.local/share}/fonts
OPTIONS:
-h, --help Show help message and exit
-l, --list List all available Nerd Fonts with versions and descriptions
-d, --dir DIR Specify custom font installation directory (overrides FONT_DIR)
See CHANGELOG.md for release history following Keep a Changelog.
This project uses the MIT License. Upstream font licenses apply to individual font files. See the Nerd Fonts repository for details.