clib¶
- ID
clib- Link
- 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
- Source
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:
installforces--global. Without it clib vendors sources into adeps/directory relative to the working directory, which is a project operation rather than a machine-wide one;--globalinstalls to the prefix instead.No inventory: clib ships no
listcommand of any kind, soinstalledandoutdatedare not declared and mpm auto-skips them. What remains is still more than the competing wrappers offer, none of which reach clib at all.upgradeis not declared either.clib upgradeupgrades clib itself to a given version rather than any package, andclib updatere-fetches packages into the projectdeps/directory, so neither is a package upgrade.Every operation keys on the
owner/reposlug.searchreports it asrepo,installtakes it directly, anduninstallparses it back apart throughparse_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_versionandlatest_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 |
With |
|---|---|---|
Search for a package |
|
|
Install a package |
|
|
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 |
|
✅ |
|
|
||
|
||
|
✅ |
|
|
||
|
||
|
Configuration¶
Ignore
clibon thempmCLI by passing the--no-cliboption.Ignore it for every run in your configuration:
[mpm] clib = false
Raise the timeout of all
clibcalls:[mpm.overrides.clib] timeout = 900
Run
mpm config-template clibto 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, thenmpm restore clib.tomlon the next one.Export a compliance SBOM:
mpm --clib 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 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_URLinsrc/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 itPublish 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 |
|
|---|---|
Activity |
|
Popularity |
|
Metadata |
|
Changelog¶
8.0.0(2026-09-20)Add the clib C package manager with
search,installandremovesupport,installforced--global. It ships no listing command, so no inventory is declared.