4 releases (2 breaking)
new 0.9.1 | Apr 21, 2024 |
---|---|
0.6.5 | Apr 7, 2024 |
0.6.3 | Mar 29, 2024 |
0.4.0 | Mar 25, 2024 |
#157 in Development tools
484 downloads per month
26KB
669 lines
cpkg
A dead simple C package manager.
This is an all-in-one wrapper for gcc
, clang
, doxygen
, clang-format
, etc.
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
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 <name> --path /path/to/dependency
and git dependencies with cpkg add <name> --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
generation
🛠️ Other Components
cpkg
supports other functionalities:
- Formatting using
clang-format
- Documenting using
doxygen
⏬ Installation
📩 Releases
You can download the cpkg
binary from the releases (or a nightly build from 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
🔄 Upgrading
You can easily upgrade your cpkg
binary using the cpkg upgrade
command.
Dependencies
~17–33MB
~560K SLoC