Cargo-inspired. Git-native. Module-first.
Built for C++20 and beyond.
# Create a new project
$ cmod init my_project
$ cd my_project
# Add dependencies — straight from Git
$ cmod add github.com/fmtlib/fmt@10.0
$ cmod add github.com/nlohmann/json@3.11
# Build and run
$ cmod build
Resolving dependencies...
Compiling fmt v10.2.1
Compiling json v3.11.3
Compiling my_project v0.1.0
Finished in 2.4s
$ cmod run
Hello, modern C++!
cmod handles dependencies, builds, caching, and security in a single, integrated tool.
Dependencies are Git URLs. Publishing is pushing a tag. No accounts, no approval queues, no vendor lock-in. Your repository is your package.
Native support for C++20 modules, partitions, and BMIs. Automatic dependency discovery via clang-scan-deps. Modules compile once, not thousands of times.
Mandatory lockfiles pin exact Git commits and toolchain versions. Build with --locked and get the same result every time, everywhere.
Content-addressed caching with SHA-256 keys. Cached BMIs skip redundant work. Parallel compilation via topological sort of the module graph.
Monorepo management with unified dependency resolution. Cross-member builds share BMIs and object files. One command builds everything.
Hash verification, trust-on-first-use, signature checking, SBOM generation, and dependency auditing. Supply chain security from day one.
First-class extensions for VS Code and CLion/IntelliJ. LSP-powered diagnostics, module graph visualization, dependency tree, and build status — all built in.
HTTP-based remote cache protocol for sharing build artifacts across your team. Push and pull BMIs and object files to eliminate redundant compilation.
One TOML file. No DSL to learn. No Python classes. No Starlark rules.
[package]
name = "my_project"
version = "1.0.0"
edition = "2024"
license = "MIT"
[module]
name = "com.github.yourname.my_project"
root = "src/my_project.cppm"
[dependencies]
"github.com/fmtlib/fmt" = ">=10.0"
"github.com/nlohmann/json" = "^3.11"
[toolchain]
compiler = "clang"
std = "c++23"
[build]
type = "binary"
An honest comparison with existing C++ tools.
| Feature | cmod | CMake | Conan | vcpkg | Bazel |
|---|---|---|---|---|---|
| C++20 Modules | Native | Experimental | No | Partial | Partial |
| Package Management | Built-in (Git) | None | Registry | Registry | Rules |
| Mandatory Lockfile | Yes | No | Optional | Partial | Implicit |
| Config Format | TOML | CMake DSL | Python | JSON | Starlark |
| Dependency Source | Git URLs | Manual | Central server | Central repo | HTTP archives |
| Security Built-in | Yes | No | Partial | Partial | Hermetic |
| Workspace / Monorepo | Native | Subdirectories | No | No | Native |
| IDE Extensions | VS Code + CLion | CMake Tools | No | No | Plugin |
| Setup Complexity | Low | Medium | Medium-High | Medium | High |
8 focused crates plus IDE extensions for VS Code and CLion. Clean dependency flow from CLI down to core.
# Resolution
cmod.toml → dependency graph → cmod.lock
# Build
lockfile → module DAG → Clang invocations → artifacts
# Cache
SHA-256 key → local cache → remote cache (HTTP REST)
Get started in under a minute. No accounts, no configuration files to write, no ceremony.