DvvCz / cpkg

A dead simple package manager for C.
MIT License
1 stars 0 forks source link
c-language clang gcc manager package-manager

cpkg

A dead simple, modern package manager for C.

GitHub Actions Workflow Status Crates.io Version GitHub Release

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

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:

⏬ 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

πŸ›œ cURL script

The other options are preferred, but there is an install script.

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.