HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
clibs
clib
C2013–2024
clibs / clib

clib

Package manager for the C programming language.

17Distinct people
18Mentions
0Explicit recommenders
5.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Package manager for the C programming language.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year18 dated mentions

Observed mentions: 2013-10-26 22:33:58 UTC to 2024-10-28 15:23:25 UTC.

0123452013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20132014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 5 mentions; 2 submissions, 3 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2024

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC101
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC523
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC514
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC202
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC110
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC000
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC110
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC110
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC000
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC110
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC110

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
clib(1) Package manager for the C programming language. Installation Expects libcurl to be installed and linkable. With homebrew: $ brew install clib Or MacPorts: $ sudo port selfupdate $ sudo port install clib With git: $ git clone https://github.com/clibs/clib.git /tmp/clib $ cd /tmp/clib $ make install Ubuntu: # install libcurl $ sudo apt-get install libcurl4-gnutls-dev -qq # clone $ git clone https://github.com/clibs/clib.git /tmp/clib && cd /tmp/clib # build $ make # put on path $ sudo make install Fedora: # install libcurl $ sudo dnf install libcurl-devel # clone $ git clone https://github.com/clibs/clib.git /tmp/clib && cd /tmp/clib # build $ make # put on path $ sudo make install Nix: $ nix-env -i clib Or add to your nativeBuildInputs. About Basically the lazy-man's copy/paste promoting smaller C utilities, also serving as a nice way to discover these sort of libraries. From my experience C libraries are scattered all over the web and discovery is relatively poor. The footprint of these libraries is usually quite large and unfocused. The goal of clibs is to provide stand-alone "micro" C libraries for developers to quickly install without coupling to large frameworks. You should use clib(1) to fetch these files for you and check them into your repository, the end-user and contributors should not require having clib(1) installed. This allows clib(1) to fit into any new or existing C workflow without friction. The wiki listing of packages acts as the "registry" and populates the clib-search(1) results. Usage clib <command> [options] Options: -h, --help Output this message -V, --version Output version information Commands: init Start a new project i, install [name...] Install one or more packages up, update [name...] Update one or more packages uninstall [name...] Uninstall executables upgrade [version] Upgrade clib to a specified or latest version configure [name...] Configure one or more packages build [name...] Build one or more packages search [query] Search for packages help <cmd> Display help for cmd More about the Command Line Interface here. Examples More examples and best practices at BEST_PRACTICE.md. Install a few dependencies to ./deps: $ clib install clibs/ms clibs/commander Install them to ./src instead: $ clib install clibs/ms clibs/commander -o src When installing libraries from the clibs org you can omit the name: $ clib install ms file hash Install some executables: $ clib install visionmedia/mon visionmedia/every visionmedia/watch clib.json Example of a clib.json explicitly listing the source: { "name": "term", "version": "0.0.1", "repo": "clibs/term", "description": "Terminal ansi escape goodies", "keywords": ["terminal", "term", "tty", "ansi", "escape", "colors", "console"], "license": "MIT", "src": ["src/term.c", "src/term.h"] } Example of a clib.json for an executable: { "name": "mon", "version": "1.1.1", "repo": "visionmedia/mon", "description": "Simple process monitoring", "keywords": ["process", "monitoring", "monitor", "availability"], "license": "MIT", "install": "make install" } See explanation of clib.json for more details. Contributing If you're interested in being part of this initiative let me know and I'll add you to the clibs organization so you can create repos here and contribute to existing ones. If you have any issues, questions or suggestions, please open an issue here. You can also find us on Gitter: https://gitter.im/clibs/clib Also feel free to open a GitHub Discussion here. Before committing to the repository, please run make commit-hook. This installs a commit hook which formats .c and .h files. Articles Introducing Clib - introduction to clib The Advent of Clib: the C Package Manager - overview article about clib
Read the full README on GitHub

What Hacker News says

18 sources
This is a great list, it looks useful! In addition to clib[1] mentioned in this list, there's also CCAN[2]. It's another collection of small C libraries, but unlike clib and this list, the libraries are maintained as a single project (for better or worse). I'd love to see some more convergence on library search and package management for C. I was glad to see clib and CCAN consider coordinating.[3] Hopefully that effort will eventually bear fruit. 1. https://github.com/clibs/clib 2. https://ccodearchive.net/ 3. https://github.com/clibs/clib/issues/69
In Single-file C/C++ public-domain/open source libraries with minimal dependencies
Oh dear... I'm just sight-linting so this might be wrong, but I'm certain the function executable in src/clib-install.c [1] can be easily overflown by providing a maliciously long package name or version --neither of which are validated at all [2] despite coming straight from the wiki page, as you point out. The function allocates 256-byte buffers to store a url and file name, respectively, but blindly fills them up using sprintf with non-validated user-supplied data, and without checking the resulting number of characters written, eg: char *url = malloc(256); if(NULL == file) goto e1; sprintf(file,"%s-%s.tar.gz",pkg->name,pkg->version); C is unforgiving indeed. Also what's up with all those (0 == count) yoda conditionals all over? Is that becoming a thing again? [1] https://github.com/clibs/clib/blob/master/src/clib-install.c [2]
Read the rest
As far as I can tell, the package info from the wiki is dealt with by functions in deps/clib-package.c that, despite promising names like json_object_get_string_safe, do not ever validate the provided name or version string: https://github.com/clibs/clib/blob/master/deps/clib-package/...
In Clib: Package manager for C
Not only that, but there appear to be potential buffer overflows which involve the data pulled from the wiki page[1]. I'm not sure why asprintf wasn't used here (and in other places). The partial re-implementation of libc[2, 3] is also somewhat frightening. As are potential unchecked integer overflows when calculating a size to pass to malloc[4]. C is hard. -- [1] https://github.com/clibs/clib/blob/master/src/clib-install.c... [2] https://github.com/clibs/clib/blob/master/deps/fs/fs.c [3] https://github.com/clibs/clib/blob/master/deps/str-copy/str-... [4] https://github.com/clibs/clib/blob/master/deps/http-get/http...
In Clib: Package manager for C

Showing the 15 most recent of 18 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.