getnf¶
- ID
getnf- Home page
- 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
- Source
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=dumbis forced. getnf colors its headings throughtput, 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
vprefix 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. Themicrodefinition takes the same approach for its bundled plugins.The user scope is the wrapped one.
-l,-iand-uall address the per-user font directory,~/Library/Fontson macOS and~/.local/share/fontselsewhere.-gswitches every operation to the machine-wide directory and shells out tosudoto write there, so mpm stays with the scope that needs no escalation.Search lists the whole catalog.
-Laccepts no query, so mpm narrows the results itself, the same route themicrodefinition takes.-ion an already-installed font reinstalls it at the current release, which is a real per-font upgrade rather than a whole-host one: getnf’sdirect_installvalidates the name against the catalog and acts on the fonts it was handed.pamacis the counter-example that makes this worth stating, itsupgrade <package>ignoring positionals entirely.No
outdated: nothing reports staleness without acting on it,-Ucomputing which fonts are behind and updating them in the same pass.No
syncand nocleanup: 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-kkeeps 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 |
With |
|---|---|---|
List what’s installed |
|
|
Search for a package |
|
|
Install a package |
|
|
Upgrade one package |
|
|
Upgrade everything |
|
|
Remove a package |
|
|
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 |
|---|---|---|
|
✓ |
|
|
||
|
||
|
✓ |
exact and extended search backfilled by |
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
✓ |
|
|
||
|
||
|
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, thenmpm restore getnf.tomlon the next one.Export a compliance SBOM:
mpm --getnf sbom(CycloneDX by default,--spdxfor 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_aton 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 |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|
Changelog¶
8.0.0.dev0(unreleased)Add getnf as a bundled definition, with
installed,search,install,removeandupgradesupport. 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 forcesTERM=dumb, getnf coloring its headings throughtputwhether or not it writes to a terminal.