lazynf

command module
v0.0.0-...-84b8f34 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 15, 2026 License: MIT Imports: 2 Imported by: 0

README

lazynf

Install Nerd Fonts from your terminal.

Status: early development. Interactive TUI plus full CLI: install, import, update, remove, list, search, cache clean, cache refresh, doctor, and shell completion on Linux and macOS. No release tagged yet — build from source.

Interactive mode

Run lazynf with no arguments on a real terminal to open the interactive TUI: browse the full Nerd Fonts catalog, mark fonts with space, install / update / remove with i / u / r, and watch progress streamed in the log pane below. Doctor diagnostics with actionable fixes are available via d. Press ? inside the TUI for the full key map.

CLI sub-commands (lazynf install foo, lazynf doctor, etc.) remain available and behave exactly as before. The TUI is only launched when stdout is a TTY; piping or redirecting falls back to the help output.

Install

go install github.com/lazynop/lazynf@latest

Usage

lazynf install JetBrainsMono FiraCode    # install one or more fonts
lazynf import --all                      # adopt fonts already on disk into lazynf state
lazynf import JetBrainsMono --detect     # adopt and hash-match against upstream tag
lazynf update                            # refresh stale or imported fonts
lazynf update --force                    # refresh even fonts already at the latest tag
lazynf remove FiraCode                   # uninstall a font (deletes files + state entry)
lazynf remove --purge JetBrainsMono      # also delete files for fonts that were imported
lazynf remove --all --yes                # remove every font from the manifest (non-interactive)
lazynf list                              # color grid of available fonts (TTY) / plain on pipe
lazynf list --installed                  # bordered table of installed fonts
lazynf search mono                       # find fonts by substring
lazynf cache clean                       # clear catalog cache and kept archives
lazynf doctor                            # diagnose paths, auth, manifest, catalog, orphans

Global flags: -q/--quiet (errors only), -v/--verbose (extra diagnostics on stderr).

Run lazynf --help for full options.

Shell completion
source <(lazynf completion bash)              # bash
lazynf completion zsh > ~/.zfunc/_lazynf      # zsh
lazynf completion fish | source               # fish

Tab completion suggests font names dynamically: catalog entries for install, manifest entries for update/remove, orphan candidates for import. Run lazynf list once to populate the catalog cache.

Authentication

lazynf makes one GitHub API call per command in the steady state (cached against the upstream release tag). It picks up credentials from, in order: GITHUB_TOKEN, gh auth token, then unauthenticated. Anonymous use is fine for occasional installs; authenticate to avoid GitHub's anonymous rate limits on heavy use.

Build from source

git clone https://github.com/lazynop/lazynf
cd lazynf
just build
./bin/lazynf --help

Requires Go 1.25+ and (optionally) just.

Status

MVP. Implemented on Linux and macOS: install, import, update, remove, list, search, cache clean, doctor, and shell completion. Planned: Windows support and an interactive TUI.

License

MIT

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
Package cmd registers lazynf's Cobra commands and global flags.
Package cmd registers lazynf's Cobra commands and global flags.
internal
archive
Package archive extracts font files from Nerd Fonts release zips.
Package archive extracts font files from Nerd Fonts release zips.
cache
Package cache stores lazynf's catalog cache: the list of available Nerd Fonts for a given upstream release tag.
Package cache stores lazynf's catalog cache: the list of available Nerd Fonts for a given upstream release tag.
doctor
Package doctor implements the read-only diagnostic command surface.
Package doctor implements the read-only diagnostic command surface.
engine
Package engine exposes an event-driven API for font operations (install, update, remove, import, doctor, refresh).
Package engine exposes an event-driven API for font operations (install, update, remove, import, doctor, refresh).
fontcache
Package fontcache wraps platform-specific font cache refresh.
Package fontcache wraps platform-specific font cache refresh.
fonts
Package fonts is lazynf's UI-agnostic core: it orchestrates the GitHub client, archive extraction, state manifest, catalog cache, and font cache refresher to install Nerd Fonts.
Package fonts is lazynf's UI-agnostic core: it orchestrates the GitHub client, archive extraction, state manifest, catalog cache, and font cache refresher to install Nerd Fonts.
github
Package github is a minimal client for the GitHub REST API endpoints lazynf needs: latest release tag, contents of a directory, and asset download.
Package github is a minimal client for the GitHub REST API endpoints lazynf needs: latest release tag, contents of a directory, and asset download.
state
Package state manages lazynf's persistent manifest of installed fonts.
Package state manages lazynf's persistent manifest of installed fonts.
tui
Package tui exposes the entry point used by cmd/root.go to launch the interactive Bubble Tea program.
Package tui exposes the entry point used by cmd/root.go to launch the interactive Bubble Tea program.
tui/app
Package app houses the root tea.Model.
Package app houses the root tea.Model.
tui/components/confirm
Package confirm shows a yes/no/cancel/force modal and emits ConfirmResultMsg.
Package confirm shows a yes/no/cancel/force modal and emits ConfirmResultMsg.
tui/components/detail
Package detail renders the right-hand FontInfo detail pane.
Package detail renders the right-hand FontInfo detail pane.
tui/components/doctor
Package doctor renders the diagnostic pane (DoctorSectionMsg accumulator) with actionable enter-on-section semantics.
Package doctor renders the diagnostic pane (DoctorSectionMsg accumulator) with actionable enter-on-section semantics.
tui/components/fontlist
Package fontlist renders the left-hand list with cursor + filter + sort + multi-select.
Package fontlist renders the left-hand list with cursor + filter + sort + multi-select.
tui/components/help
Package help renders a keybinding cheat-sheet overlay.
Package help renders a keybinding cheat-sheet overlay.
tui/components/logpane
Package logpane keeps the in-memory log ring; file.go owns the on-disk failure log used for post-mortem inspection.
Package logpane keeps the in-memory log ring; file.go owns the on-disk failure log used for post-mortem inspection.
tui/components/statusbar
Package statusbar renders the bottom bar with key hints + activity badges.
Package statusbar renders the bottom bar with key hints + activity badges.
tui/drain
Package drain converts engine.OpHandle channels into tea.Cmd values.
Package drain converts engine.OpHandle channels into tea.Cmd values.
tui/keys
Package keys centralises every key binding used by the TUI.
Package keys centralises every key binding used by the TUI.
tui/messages
Package messages defines the tea.Msg types exchanged between the root app and its sub-models.
Package messages defines the tea.Msg types exchanged between the root app and its sub-models.
tui/theme
Package theme exposes the lipgloss styles used across TUI components.
Package theme exposes the lipgloss styles used across TUI components.
ui
Package ui — list rendering helpers for `lazynf list` and `lazynf list --installed`.
Package ui — list rendering helpers for `lazynf list` and `lazynf list --installed`.
xdg
Package xdg resolves XDG Base Directory paths and lazynf-specific subpaths.
Package xdg resolves XDG Base Directory paths and lazynf-specific subpaths.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL