You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Basically the lazy-man's copy/paste promoting smaller C utilities, also
13
+
serving as a nice way to discover these sort of libraries. From my experience
14
+
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
15
+
stand-alone "micro" C libraries for developers to quickly install without coupling
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.
47
19
48
-
## About
20
+
The [listing of packages](https://github.com/clibs/clib/wiki/Packages) acts as the "registry". The registry is used by `clib(1)` when searching for packages.
49
21
50
-
Basically the lazy-man's copy/paste promoting smaller C utilities, also
51
-
serving as a nice way to discover these sort of libraries. From my experience
52
-
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
53
-
stand-alone "micro" C libraries for developers to quickly install without coupling
54
-
to large frameworks.
22
+
## Installation and building
23
+
Binaries for `clib(1)` releases can be found at [releases](https://github.com/clibs/clib/releases/).
24
+
For OSx and linux [libcurl](http://curl.haxx.se/libcurl/) should be installed and linkable.
25
+
The windows binaries do not require any libraries to be installed.
55
26
56
-
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.
27
+
See [Building](Building.md)for instructions on how to build clib.
57
28
58
-
The wiki [listing of packages](https://github.com/clibs/clib/wiki/Packages) acts as the "registry" and populates the `clib-search(1)` results.
59
29
60
30
## Usage
61
-
31
+
More detailed information on how to use `clib` can be found in [Usage](Usage.md).
62
32
```
63
33
clib <command> [options]
64
34
@@ -78,13 +48,9 @@ $ sudo make install
78
48
search [query] Search for packages
79
49
help <cmd> Display help for cmd
80
50
```
51
+
More information about the Command Line Interface can be found [here](https://github.com/clibs/clib/wiki/Command-Line-Interface).
81
52
82
-
More about the Command Line Interface [here](https://github.com/clibs/clib/wiki/Command-Line-Interface).
83
-
84
-
## Examples
85
-
86
-
More examples and best practices at [BEST_PRACTICE.md](https://github.com/clibs/clib/blob/master/BEST_PRACTICE.md).
By default `clib` uses the [listing of packages](https://github.com/clibs/clib/wiki/Packages) as the place to look for packages, the registry, and [github.com](https://github.com) for downloading packages.
235
+
You can specify additional registries and download from other repositories than github.
236
+
This might be useful when using `clib` to install a mix of private and public packages.
237
+
238
+
### Adding additional registries
239
+
Additional registries can be provided in the `clib.json` of a project.
240
+
Currently github wiki's and gitlab — both [gitlab.com](https://www.gitlab.com) and self hosted — are supported.
241
+
For gitlab the format is a bit complicated as it has to conform to the gitlab api.
242
+
You should use the same format as the default registry but in a file in a repository instead of in a wiki.
_**CAUTION:** For gitlab, the url should be of the form `/project/<id>` and not `/group/repo` check [my-gitlab-registry](https://gitlab.com/nouwaarom/my-clib-registry) for an example._
254
+
255
+
### Downloading from gitlab or private sources
256
+
To download from some sources, authentication might be required.
257
+
To facilitate this `clib_secrets.json` is used to store the credentials.
258
+
259
+
```json
260
+
{
261
+
"github.com": "GITHUB_API_TOKEN",
262
+
"github.example.com": "GITLAB_USER_TOKEN"
263
+
}
264
+
```
265
+
266
+
Gitlab always requires a secret in order to use the API.
267
+
The secret can be obtained by clicking your profile and then (Preferences -> Access Tokens) and create a token with only `read_repository` rights.
268
+
269
+
_**TIP:** To prevent accidentally commiting your secrets add `clib_secrets.json` to `.gitignore` and use `clib_secrets.json.dist` to specify for which domains a secret is required._
0 commit comments