A powerful and interactive C++ project generator written in Rust. It helps you quickly set up new C++ projects with modern best practices and your preferred configurations.
- 🎯 Interactive CLI with smart defaults
- 🏗️ Multiple build systems (CMake, Make)
- 📦 Package manager integration (Conan, Vcpkg)
- ✅ Testing framework setup (doctest, Google Test, Catch2, Boost.Test)
- 🔍 Code quality tools (clang-format, clang-tidy, cppcheck)
- 📝 License management (MIT, Apache-2.0, GPL-3.0, BSD-3-Clause)
- 🎨 Project templates (Executable, Library)
- 🔄 Git initialization
- C++ compiler - clang or gcc
- CMake or Make build system
- Optional: Conan or Vcpkg package manager
- Optional: clang-format, clang-tidy, or cppcheck for code quality tools
cargo buildcargo testGenerate code coverage reports locally:
# Install cargo-tarpaulin
cargo install cargo-llvm-cov
# Print the coverage summary to stdout
cargo llvm-cov
# Open coverage report
cargo llvm-cov --openThis project includes pre-commit hooks that run code formatting and linting checks before each commit. To install them:
./hooks/install-hooks.shThe pre-commit hook will automatically:
- Check code formatting with
cargo fmt - Run linting checks with
cargo clippy
If you need to commit without running the hooks (not recommended), use:
git commit --no-verifySimply run:
cppupFollow the interactive prompts to configure your project.
Create a new executable project with specific settings:
cppup --name my-project \
--description "My awesome C++ project" \
--project-type executable \
--build-system cmake \
--cpp-standard 17 \
--package-manager conan \
--test-framework doctest \
--license MIT \
--quality-tools clang-format,clang-tidy \
--non-interactive--name: Project name--description: Project description--project-type:executableorlibrary--build-system:cmakeormake--cpp-standard:11,14,17,20, or23--package-manager:none,conan, orvcpkg--test-framework:none,doctest,gtest,catch2, orboosttest--license:MIT,Apache-2.0,GPL-3.0, orBSD-3-Clause--quality-tools: Comma-separated list ofclang-format,clang-tidy,cppcheck--non-interactive: Skip interactive prompts--path: Output directory (default: current directory)--git: Initialize git repository (default: true)
Generated project structure for an executable:
my-project/
├── src/
│ └── main.cpp
├── include/
├── assets/
├── tests/ # If testing is enabled
├── build/
├── CMakeLists.txt # Or Makefile
├── .gitignore
├── LICENSE
└── README.md
For a library:
my-project/
├── src/
│ └── lib.cpp
├── include/
│ └── my-project.hpp
├── examples/
├── tests/ # If testing is enabled
├── build/
├── CMakeLists.txt # Or Makefile
├── .gitignore
├── LICENSE
└── README.md
This project is licensed under the MIT License - see the LICENSE file for details.
Nauris Linde [email protected]
Contributions are welcome! Please open an issue or submit a pull request for any improvements or bug fixes.
- Rust for the programming language
- Handlebars for templating
- Conan for package management
- Vcpkg for package management
- CMake for build system
- Make for build system
- doctest for testing
- Catch2 for testing
- Boost.Test for testing
- Google Test for testing
- Clang Tidy for code quality
- Cppcheck for code quality
- Clang Format for code formatting