getnf

ID

getnf

Home page

https://github.com/getnf/getnf

Upstream stars

⭐ 1,256

Last commit

2026-06-19

Platforms

🐧 Linux · 🍎 macOS

Operations

installed · search · install · upgrade · upgrade_all · remove

purl types

pkg:getnf

CLI name

getnf

Forced environment

TERM=dumb

Issues and PRs

📦 manager: getnf

Source

meta_package_manager/managers/getnf.toml

getnf installs Nerd Fonts (https://www.nerdfonts.com), the patched programming fonts published as release assets of https://github.com/ryanoasis/nerd-fonts.

A font is a package here. Each one carries a name the tool resolves against its catalog, a version taken from the Nerd Fonts release it was cut from, and a directory of its own that removal deletes. The vetting turns on whether an inventory exists rather than on what that inventory holds, the same reading that wrapped mas for App Store applications and vagrant for boxes.

Parsing notes, verified against getnf v0.3.0 on macOS:

  • TERM=dumb is forced. getnf colors its headings through tput, which emits escape sequences whether or not stdout is a terminal, so the same command yields different bytes depending on the caller’s terminal. The rows mpm parses are plain either way; pinning TERM is what keeps the whole transcript stable, and it is why the samples below carry no escapes.

  • Versions are Nerd Fonts release tags, so the release the font was cut from is its version. The v prefix is stripped to leave a bare version.

  • A font installed outside getnf, or by a getnf too old to record where it came from, has no release marker and renders as <name> - unknown version. One alternation spans both shapes without letting that marker land in the version field: such a font is genuinely installed and can be removed, it just carries no version. The micro definition takes the same approach for its bundled plugins.

  • The user scope is the wrapped one. -l, -i and -u all address the per-user font directory, ~/Library/Fonts on macOS and ~/.local/share/fonts elsewhere. -g switches every operation to the machine-wide directory and shells out to sudo to write there, so mpm stays with the scope that needs no escalation.

  • Search lists the whole catalog. -L accepts no query, so mpm narrows the results itself, the same route the micro definition takes.

  • -i on an already-installed font reinstalls it at the current release, which is a real per-font upgrade rather than a whole-host one: getnf’s direct_install validates the name against the catalog and acts on the fonts it was handed. pamac is the counter-example that makes this worth stating, its upgrade <package> ignoring positionals entirely.

  • No outdated: nothing reports staleness without acting on it, -U computing which fonts are behind and updating them in the same pass.

  • No sync and no cleanup: the catalog refreshes as a side effect of every command that needs it and never on its own, and the downloaded archives are deleted after each install unless -k keeps them.

Warning

Every operation but removal needs network access. getnf probes connectivitycheck.gstatic.com then cp.cloudflare.com and aborts with “Internet connection is required for getnf to work.” if neither answers, then refreshes its catalog from the GitHub API. So an offline mpm installed reports getnf as failed rather than empty. Only -u and the version probe run before that check and work offline.

Warning

getnf -U exits 1 on a host holding no Nerd Font at all, reporting “No installed Nerd Fonts found.” on standard error, so mpm upgrade --all marks getnf as failed on a machine that simply has nothing to upgrade. With at least one font installed the same command exits 0, whether or not anything needed updating.

What mpm adds to getnf

Through mpm, getnf gains --exact and --extended search, to narrow to exact names or match descriptions.

Bigger still, mpm reaches across every manager at once: mpm installed and mpm outdated cover getnf alongside every other manager you run in one table, mpm upgrade --all updates them together, and mpm sbom exports the whole machine as one bill of materials.

Every mpm command also gains --dry-run and --plan previews, cross-scheme version comparison and purl identifiers. See manager augmentations for how each one is built.

Your getnf commands, in mpm

You already know getnf: each operation maps one-to-one onto mpm, in an interface shared by every manager.

To…

With getnf

With mpm

List what’s installed

getnf -l

mpm --getnf installed

Search for a package

getnf -L

mpm --getnf search <pkg>

Install a package

getnf -i <package_id>

mpm install pkg:getnf/<package_id>

Upgrade one package

getnf -i <package_id>

mpm --getnf upgrade <package_id>

Upgrade everything

getnf -U

mpm --getnf upgrade --all

Remove a package

getnf -u <package_id>

mpm remove pkg:getnf/<package_id>

Prefix any command above with --dry-run to simulate the underlying manager calls without touching the system: the safe way to watch what mpm would do before trusting it.

Operations

Operation

Supported

Notes

installed

outdated

orphans

search

exact and extended search backfilled by mpm

install

upgrade

upgrade_all

remove

sync

cleanup

doctor

Selecting and configuring getnf

Deselect getnf for a single run with --no-getnf, or persist the choice in your configuration:

[mpm]
getnf = false

The arguments and environment variables listed in the box atop this page are forced on every getnf call, so runs stay quiet, non-interactive and reproducible: the defaults you would set in CI anyway.

Keep it enabled but tune how mpm drives it with a per-manager override:

[mpm.managers.getnf]
timeout = 900

mpm config-template getnf prints every overridable attribute as a ready-to-paste block.

Recipes

A few jobs you would otherwise script around getnf, one mpm command each:

  • Snapshot and clone a machine: mpm --getnf dump getnf.toml, then mpm restore getnf.toml on the next one.

  • Export a compliance SBOM: mpm --getnf sbom (CycloneDX by default, --spdx for SPDX).

Privilege escalation

mpm runs this manager as the current user and never prepends sudo by default. Flip the policy for its privileged operations with --sudo or the per-manager sudo override.

None of its operations needs root.

See privilege escalation for the full policy.

Cooldown

State of getnf’s release-age gating, from the cooldown support table:

Status: ❌ None

A cooldown only pays off where a compromised release can be withdrawn while the clock runs, and can only be emulated where the registry dates its releases. From the retraction table:

  • Registry: GitHub release assets

  • Retraction: None: withdrawing a build is the upstream author deleting their own release or tag. Nothing sits between them and the user

  • Publish date: ✅ server-set published_at on each release (REST API)

With --cooldown set, mpm skips this manager’s install and upgrade operations rather than run them unguarded (fail-closed); --cooldown best-effort opts back in.

Version probe

The version is probed by running:

$ getnf -V
getnf v0.3.0

and extracted with:

r"getnf v(?P<version>\S+)"

Reference traces

Raw native outputs captured in the bundled definition: the reference mpm’s parsers were written against. If you know getnf well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ getnf -l
Installed Nerd Fonts:
0xProto - unknown version
Agave - v3.5.0

Feed any of these through mpm and the raw output becomes one uniform table, the same shape for every manager: filter it, project columns, or export it (mpm --getnf installed --output json, or csv, toml, yaml), each package carrying a purl and a version comparable across managers.

Upstream project

Metrics

getnf/getnf

Activity

commit activity commits since open issues open pull requests

Popularity

forks watchers contributors

Metadata

latest release release date license main language

Changelog

  • 8.0.0.dev0 (unreleased)

    • Add getnf as a bundled definition, with installed, search, install, remove and upgrade support. It installs Nerd Fonts, so a font is what it calls a package and the Nerd Fonts release it was cut from is the version. Every call forces TERM=dumb, getnf coloring its headings through tput whether or not it writes to a terminal.