clib

ID

clib

Link

Repository

Upstream stars

⭐ 5,144

Last commit

2026-07-18

Platforms

🐧 Linux · 🍎 macOS

Operations

search · install · remove

purl types

pkg:clib/

CLI name

clib

Issues and PRs

📦 manager: clib

Source

clib.toml

clib is the package manager of the C ecosystem, distributing small libraries and standalone programs.

Parsing notes, verified against clib 2.8.7 on macOS:

  • install forces --global. Without it clib vendors sources into a deps/ directory relative to the working directory, which is a project operation rather than a machine-wide one; --global installs to the prefix instead.

  • No inventory: clib ships no list command of any kind, so installed and outdated are not declared and mpm auto-skips them. What remains is still more than the competing wrappers offer, none of which reach clib at all.

  • upgrade is not declared either. clib upgrade upgrades clib itself to a given version rather than any package, and clib update re-fetches packages into the project deps/ directory, so neither is a package upgrade.

  • Every operation keys on the owner/repo slug. search reports it as repo, install takes it directly, and uninstall parses it back apart through parse_repo_owner/parse_repo_name (src/clib-uninstall.c), so one id feeds all three.

  • The registry carries no versions at all, only names, URLs and descriptions, so search results are yielded version-less. The description is dropped too: the definition schema only maps package_id, installed_version and latest_version, so a class would be needed to carry it, which is not worth the weight for one cosmetic column.

What mpm adds to clib

Through mpm, clib 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 clib 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 clib commands, in mpm

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

To…

With clib

With mpm

Search for a package

clib search --json --no-color <query>

mpm --clib search <query>

Install a package

clib install --global <package_id>

mpm install pkg:clib/<package_id>

Remove a package

clib uninstall <package_id>

mpm remove pkg:clib/<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

Configuration

  • Ignore clib on the mpm CLI by passing the --no-clib option.

  • Ignore it for every run in your configuration:

    [mpm]
    clib = false
    
  • Raise the timeout of all clib calls:

    [mpm.overrides.clib]
    timeout = 900
    
  • Run mpm config-template clib to print all overridable settings for your configuration file:

    [mpm.overrides.clib]
    cli_names = [
        "clib",
    ]
    cli_search_path = []
    dry_run = false
    ignore_auto_updates = true
    plan = false
    post_args = []
    pre_args = []
    pre_cmds = []
    stop_on_error = false
    unmaintained = false
    version_cli_options = [
        "--version",
    ]
    version_regexes = [
        "(?P<version>\\d+\\.\\d+\\.\\d+)",
    ]
    

Recipes

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

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

  • Export a compliance SBOM: mpm --clib 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 is privileged.

See privilege escalation for the full policy.

Cooldown

State of clib’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: clib package wiki

  • Retraction: Wiki edit: the index is a GitHub wiki page, clibs/clib/wiki/Packages, scraped as HTML (CLIB_WIKI_URL in src/clib-search.c), so withdrawal is an edit to that page; the code itself is fetched from the GitHub archive of whichever repository the row names, and disappears with it

  • Publish date: ❌ the index carries names, URLs and descriptions only, with no version field at all, so there is nothing to date a release by

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.

Reference traces

A collection of raw native outputs captured from the manager’s own CLI and recorded in the bundled definition. If you know clib well and a transcript below looks wrong, or a newer release changed its output format, report it.

$ clib search --json --no-color {query}
[
  {
    "repo": "willemt/skiplist",
    "href": "https://github.com/willemt/skiplist",
    "description": "Dictionary implemented through a skiplist",
    "category": "data structure"
  }
]

Version check

The version is probed by running:

$ clib --version
2.8.7

and extracted with:

r"(?P<version>\d+\.\d+\.\d+)"

Upstream project

Metrics

clibs/clib

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 (2026-09-20)

    • Add the clib C package manager with search, install and remove support, install forced --global. It ships no listing command, so no inventory is declared.