A lightweight CLI tool for building and managing C projects. Think cargo for C — Forge simplifies project initialization, dependency management, and building with a simple configuration file.
curl -fsSL https://raw.githubusercontent.com/langelozzi/forge/main/install.sh | shThis will download the latest release for your OS and architecture (macOS or Linux) and install it to your PATH.
Forge is a project manager for C that provides:
- Project Initialization - Scaffold a new C project with a standard directory structure
- Build Management - Compile C projects with a simple
forge.tomlconfiguration - Module Management - Add and organize source files easily
- Simple Configuration - Define your project with a straightforward TOML config file
curl -fsSL https://raw.githubusercontent.com/langelozzi/forge/main/install.sh | shVisit the GitHub Releases page and download the binary for your platform.
- macOS (x86_64, ARM64)
- Linux (x86_64)
forge init my-project
cd my-projectThis creates:
src/- source files directoryinclude/- header files directoryforge.toml- project configuration
forge buildforge runforge add my_moduleForge uses forge.toml to configure your project:
[package]
name = "my-project"
version = "0.1.0"
compiler = "gcc"
[build]
flags = ["-Wall", "-Wextra"]Initialize a new C project with the given name.
Usage:
forge init my-appCompile your project based on the configuration in forge.toml.
Usage:
forge buildBuild and run your project.
Usage:
forge runAdd a new module/source file to your project.
Usage:
forge add math_utilsSimply delete the binary from your system:
rm $(which forge)Or if installed via sudo:
sudo rm $(which forge)Contributions are welcome! Feel free to open issues and pull requests.
MIT