Open-source project workflow CLI for C and C++ teams.
mux gives C and C++ developers a Cargo-like command loop: scaffold, build, run, test, and clean with consistent CMake preset conventions.
- Faster onboarding for native projects with a standard layout and commands.
- Clean build/test flow across debug and release without custom scripts.
- C template with Unity tests ready out of the box.
- C++ template with GoogleTest wired through
FetchContent. - Dependency vendoring workflow for C via
mux addandmux remove.
# Build mux
cargo build
# Create and enter a C project (default template)
mux init hello_c
cd hello_c
# Build, run, test
mux build
mux run
mux testC++ project:
mux init hello_cpp --cpp
cd hello_cpp
mux build
mux run
mux testFrom repository root:
cargo install --path .
mux --versionPrebuilt binaries:
- Download latest assets:
https://github.com/DHANUSH-web/mux/releases/latest
Or run without global install:
cargo run -- --help- CI:
.github/workflows/ci.yml - Release:
.github/workflows/release.yml - CI runs on pushes to
mainand pull requests, and validates format/check/tests plus C/C++ smoke flows. - Release builds Linux/macOS/Windows binaries and uploads them to GitHub Releases.
- Trigger a release by pushing a version tag, for example:
v0.1.0.
mux init <project-name> [--lang c|cpp] [--cpp]
mux build [--release|--all]
mux run [--release]
mux test [--release|--all]
mux clean [--release|--all]
mux add <lib> [--target <cmake-target>] # C template only
mux remove <lib-name> # C template only
Notes:
--alland--releaseare mutually exclusive where both are supported.build,run,test, andcleanmust run inside a mux-generated project.
<project>/
CMakeLists.txt
CMakePresets.json
src/main.c
tests/test_main.c
lib/unity/unity.h
lib/unity/unity.c
- Targets:
main,test_main - Test framework: Unity
- Supports
mux addandmux remove
<project>/
CMakeLists.txt
CMakePresets.json
src/main.cpp
tests/test_main.cpp
lib/README.md
- Targets:
main,test_main - Test framework: GoogleTest via CMake
FetchContent mux addis intentionally not enabled yet
Add dependency:
mux add <lib>Supported formats:
- Local path:
mux add ../my_c_lib - Git URL:
mux add https://github.com/user/repo.git - GitHub shorthand:
mux add owner/repo - Repository shorthand:
mux add repo(expands tohttps://github.com/repo/repo.git)
Optional target override:
mux add owner/repo --target actual_cmake_targetRemove dependency:
mux remove <lib-name>mux updates vendored files under lib/, CMakeLists.txt, and tracks metadata in mux.lock.
CMakePresets.jsonversion: 6- Presets:
unix-debug,unix-release,windows-debug,windows-release - Build outputs:
out/<platform>-<profile>
Examples:
out/unix-debugout/unix-releaseout/windows-debugout/windows-release
- Rust toolchain
- CMake 3.20+
- C/C++ compiler toolchain
- Internet access for first C++ configure/build (GoogleTest download)
Issues and pull requests are welcome.
Read these first:
CONTRIBUTING.mdCODE_OF_CONDUCT.mdSECURITY.md
For local validation after behavior/template changes:
cargo fmt
cargo checkThen run smoke tests for:
- C flow:
init/build/run/test - C++ flow:
init --cpp,build,test - C add/remove flow:
add,remove,build,test
- Questions and usage help: open a GitHub issue with the
questionlabel. - Bugs: use the bug report template in
.github/ISSUE_TEMPLATE/bug_report.yml. - Security issues: follow
SECURITY.mdand report privately.
- Project owner:
@DHANUSH-web - Repository:
https://github.com/DHANUSH-web/mux
This project is licensed under GPL-3.0-only. See LICENSE.