Coffee
A modern package manager for C.
Coffee is a package manager and build system for C projects. It manages dependencies, orchestrates builds, and provides a consistent workflow — inspired by Cargo, but built for the C ecosystem.
Quick Start
# Create a new project
coffee new my-project
# Build it
cd my-project
coffee build
# Run tests
coffee test
Project Structure
Coffee enforces a canonical structure on each project:
root
├── Coffee.toml # Project manifest
├── include/ # Public API headers
├── src/ # Source files
├── tests/ # Unit & integration tests
├── docs/ # Documentation
├── scripts/ # Utility scripts
└── build/ # Build artifacts (gitignored)
Features
- Manifest-driven builds —
Coffee.tomldescribes your project, its dependencies, and features - Dependency management — Add, remove, and update dependencies with version-pinned
resolution via
Coffee.lock - Feature system — Conditional compilation and optional dependencies via
[features]in your manifest - Registry — Search packages in the Coffee registry; install specific packages via
coffee install --git <url>. - Static analysis —
coffee checkrunsclang -fsyntax-onlyand validates your manifest - Cross-compilation — Target different platforms via
--target
Getting Started
Installation
git clone https://github.com/coffee-clang/coffee.git
cd coffee
make
Creating a Project
coffee new hello
cd hello
coffee build
73|cf19582f ./build/debug/hello
Documentation
- Feature System Guide — Learn about Coffee’s conditional compilation and optional dependency features
- Command Reference — See
docs/commands/for detailed documentation of every command - Design Document — Architecture, design philosophy, and complete command reference
Project Status
Coffee is under active development. See the TODO list for current status and planned features.
License
MIT — see the LICENSE file.
Need help?
Please wait: the project is still pre-alpha!
Cup of Coffee is an open source project inspired by Cargo, Rustup Crates, and Conda-forge.