Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dvvcz/cpkg
A dead simple package manager for C.
https://github.com/dvvcz/cpkg
c-language clang gcc manager package-manager
Last synced: about 1 month ago
JSON representation
A dead simple package manager for C.
- Host: GitHub
- URL: https://github.com/dvvcz/cpkg
- Owner: DvvCz
- License: mit
- Created: 2024-03-24T09:56:58.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2024-09-23T00:54:40.000Z (4 months ago)
- Last Synced: 2024-12-19T15:12:37.074Z (about 1 month ago)
- Topics: c-language, clang, gcc, manager, package-manager
- Language: Rust
- Homepage:
- Size: 69.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
cpkg
A dead simple, modern package manager for C.## What is cpkg?
`cpkg` is an all-in-one wrapper for tools like `gcc`, `clang`, `doxygen` and `clang-format`.
It automatically detects which are present on your system, allowing you to use them with one simple cli.Inspired by the convenience of modern tools like `cargo` and `bun`.
## Usage
```bash
cpkg init
cpkg run
```## Features
### 🧑💻 Project Runner
You can create a project with `new` or `init`, and then run `/src/main.c` with `cpkg run` or `cpkg build`.
You can run tests located in `/src/*.test.c` and `/tests/*.c` with `cpkg test`.
### 📦 Package Management
You can add local paths with `cpkg add --path /path/to/dependency` and git dependencies with `cpkg add --git https://github.com/nothings/stb/tree/master`.
### 🗄️ Project File Generation
Project files can be generated using `cpkg generate`.
This creates a project file that acts as if you ran `cpkg build`, without `cpkg`.
*Currently only supports basic [`Makefile`](https://www.gnu.org/software/make) generation*
### 🛠️ Other Components
`cpkg` supports other functionalities:
* Formatting using [`clang-format`](https://clang.llvm.org/docs/ClangFormat.html)
* Documenting using [`doxygen`](https://www.doxygen.nl)## ⏬ Installation
### 📩 Releases
You can download the `cpkg` binary from [the releases](https://github.com/DvvCz/cpkg/releases) (or a nightly build from [actions](https://github.com/DvvCz/cpkg/actions))
### 📦 Cargo
If you have `cargo` you can install from crates.io.
```
cargo install cpkg
```Or clone the repository and install it locally.
```
git clone https://github.com/DvvCz/cpkg
cargo install --path cpkg
```### 🛜 cURL script
The other options are preferred, but there is an install script.
```bash
curl -fsSL https://raw.githubusercontent.com/DvvCz/cpkg/master/install.sh | bash
```### 🔄 Upgrading
You can easily upgrade your `cpkg` binary using the `cpkg upgrade` command.