A desktop GUI for scaffolding modern C++/CMake and ROS2 Jazzy projects in seconds.
Built with Python 3 and PySide6. No web framework, no Electron — just a fast native Qt app.
- Two project types — standard C++/CMake and ROS2 Jazzy (
ament_cmake) - Live preview — CMakeLists.txt, package.xml, and README update as you type
- Dependency manager — categorised package tree with one-click add/remove
- Dynamic executable list — add any number of named targets with per-target options
- Library configuration — STATIC / SHARED / INTERFACE, CMake package export, ament exports
- Extras — .gitignore, .clang-format, .clang-tidy, .editorconfig, GitHub Actions, Dockerfile, GoogleTest stubs
- VS Code integration — settings / tasks / launch.json; always builds in Release mode
- Preset system — 4 built-in presets, save/load custom presets as JSON
- Git init — optional
git init+ initial commit after generation
- Python ≥ 3.10
- PySide6 ≥ 6.4
pipx install git+https://github.com/<your-org>/cpp-gen.gitor from a local clone:
git clone https://github.com/<your-org>/cpp-gen.git
cd cpp-gen
pipx install .pip install git+https://github.com/<your-org>/cpp-gen.git
# or
pip install -e . # editable / development installcpp-genThat's it. The GUI opens immediately.
| Shortcut | Action |
|---|---|
Ctrl+N |
Reset to defaults |
Ctrl+O |
Load preset |
Ctrl+S |
Save preset |
Ctrl+Enter |
Generate project |
Ctrl+Q |
Quit |
- Project tab — set name, choose Normal C++ or ROS2 Jazzy, pick license and C++ standard
- Dependencies tab — double-click packages from the suggestion tree or type custom names
- Executables tab — click + Add Executable for each binary target
- Library tab — choose SHARED / STATIC / INTERFACE; enable CMake package export if needed
- Extras tab — enable .clang-format, GitHub Actions, tests, etc.
- Preview tab — verify the generated CMakeLists.txt and file tree
- Click ▶ Generate Project
| Preset | Description |
|---|---|
| Minimal C++ | Library + one executable, no dependencies |
| C++ + Eigen / OpenCV | Adds Eigen3, OpenCV, fmt, spdlog, .clang-format |
| ROS2 Minimal Node | rclcpp + std_msgs, launch + config files |
| ROS2 Robotics | Full sensor/geometry/tf2/PCL/Eigen stack |
Normal C++:
cmake -S . -B build -DCMAKE_BUILD_TYPE=Release
cmake --build build -j$(nproc)ROS2 Jazzy (from your workspace root):
colcon build --packages-select <name> --cmake-args -DCMAKE_BUILD_TYPE=Release
source install/setup.bash
ros2 run <name> <executable>cpp-gen/
├── run.py # convenience launcher (python run.py)
├── requirements.txt
├── pyproject.toml
└── src/cpp_project_generator/
├── main.py
├── gui/
│ ├── main_window.py # main window, toolbar, preset handling
│ ├── project_tab.py
│ ├── deps_tab.py
│ ├── executables_tab.py
│ ├── library_tab.py
│ ├── extras_tab.py
│ └── preview_tab.py # live preview + CMake syntax highlighting
├── generator/
│ ├── models.py # dataclasses + JSON serialisation
│ ├── cmake_generator.py # CMakeLists.txt (CPP + ROS2)
│ ├── package_xml_generator.py
│ ├── source_generator.py # placeholder C++ files
│ ├── vscode_generator.py
│ ├── readme_generator.py
│ ├── extras_generator.py # gitignore, license, CI, …
│ └── file_writer.py # orchestrates all generators
└── presets/
├── cpp_minimal.json
├── cpp_opencv_eigen.json
├── ros2_minimal.json
└── ros2_robotics.json
- Fork the repository
- Create a feature branch
- Open a pull request — please keep commits focused and add tests for new generator logic
MIT — see LICENSE.