Google Font CLI acts as a bridge between the google-webfonts-helper API and your local system.
- Metadata Fetching: The tool fetches a complete list of available Google Fonts from
google-webfonts-helper. - Caching: This list is cached locally to ensure fast startup times for subsequent commands.
- Processing: The metadata is parsed into
GoogleFontobjects, which handle the logic for downloading and installing specific font variants. - Platform-Specific Installation:
- macOS/Linux: Fonts are copied to the user's font directory.
- Windows: A small WScript is used to trigger the native Windows font installation process.
- CLI Layer: Handles command-line arguments and user interaction.
- GoogleFontList: Manages the collection of fonts, searching, and caching.
- GoogleFont: Represents a single font family and provides methods for downloading and installing variants.
- Request Module: Handles all network communication.
