a tiny google fonts cli for installing fonts on your machine.
this exists because google fonts should be installable from the terminal without api keys, browser clicking, or downloading a zip like it is 2012.
install globally:
npm install -g @extoci/fontsthen:
font add interto launch the interactive installer:
font addit uses google-webfonts-helper, so you do not need a google api key.
- node 20+ for the published cli
- bun if you are developing locally
- internet access, obviously
- on linux,
fc-cacheis nice to have but not required
font add installs font files into your user font directory:
- macos:
~/Library/Fonts - linux:
~/.local/share/fonts(or$XDG_DATA_HOME/fonts) - windows:
%LOCALAPPDATA%\Microsoft\Windows\Fonts
installed fonts are tracked in a small manifest so font list, font remove, and font update know what this cli put there.
interactive mode:
font addscriptable commands:
font add inter
font add inter -v regular,700
font download "Source Sans 3" --dest ./fonts --woff2
font find inter
font find --all
font list
font update
font remove inter-v, --variants regular,700– install or download specific variants-d, --dest ./fonts– save font files somewhere instead of installing them--woff2– download woff2 files instead of ttf--refresh– refresh the cached google fonts catalog--all– print the whole catalog withfont find--limit 10– limitfont findoutput--select– pick one narrowedfont findresult interactively-y, --yes– skip prompts where possible
install inter regular and bold:
font add inter -v regular,700search google fonts:
font find monoprint every font in the catalog:
font find --alldownload web fonts into your project:
font download inter --dest ./public/fonts --woff2remove fonts installed by this cli:
font remove interrun with bun:
bun run devbuild:
bun run buildtest:
bun run test-
font addworked but the font is not showing up restart the app you are trying to use the font in. some apps cache the font list. -
linux font list did not refresh install
fontconfigsofc-cacheis available, then runfc-cache -f. -
search feels stale run with
--refreshto redownload the google fonts catalog. -
windows install is weird windows font installation is windows font installation. this cli installs into the current user's font directory and registers the font for that user.
this is bun-first for development, but the published binary is a bundled node cli so npm install -g @extoci/fonts works normally.
uses google-webfonts-helper for the font catalog and file urls. built by exotic with codex.