Rivets handles the first 30 minutes of setting up a C++ project so you can focus on writing code, not fighting CMakeLists.txt. Wraps CMake + Clang/GCC in a modern, forgiving CLI.
Four commands handle the whole lifecycle — from doctor to run — with a layout that scales from hello-world to small game engines.
Detects clang++/g++, cmake, ninja. Tells you exactly what to install — no guessing.
Scaffolds riv.toml, src/main.cpp, lib/ and include/ with .keep files. Clean, scalable.
Scans src/lib/include, validates, generates .riv/CMakeLists.txt and invokes CMake.
Incremental build + run + arg forwarding: riv run -- --flag. It just works.
Generated CMake is standard and readable. Keep it and walk away whenever you want.
No build scripts in packages. Dependencies are data, not arbitrary code execution.
No hidden state. Everything lands in .riv/ so your root stays clean.
Find .cpp/.h in src/, lib/*, include/
Reject bad layouts with friendly fix hints
Render CMakeLists.txt.tmpl into .riv/
cmake -S .riv -B .riv/build → build
name = "hello-world" version = "0.1.0" standard = "17"
lib/ with src/ + include/<name> becomes a static lib and is linked automatically..riv/build/<name>. Root stays clean; build artifacts are gitignored.Opinionated, minimal, and familiar to any C++ dev. Start small — grow without restructuring.
#include <iostream>
int add(int a, int b) { return a + b; }
int main() {
std::cout << "Hello from riv!\n";
std::cout << "2 + 3 = " << add(2, 3) << "\n";
return 0;
}compile_commands.json for VS Code & CLion IntelliSense out of the box.Four commands. No flags to memorize.
Go 1.23+ required. For everyone else, binaries are on the way.
Ensure $(go env GOPATH)/bin is in your PATH.
Beginner-friendly defaults, pro-ready output.
.riv/build.Downloading a library never runs arbitrary code. Dependencies are declared data.
Generated CMake is yours. Outgrow Rivets? Take it with you, no migration.
Invalid layout → precise error + fix hint. No silent breakage.
What’s done and what’s intentionally deferred.
Built for learners, by learners. Contributions welcome — especially from beginners.
go test ./... → go fmt → PR.
The rivet-shaped R is Rivets’ mark — see assets/branding.One command to scaffold, one to run. The rest is just C++.