A powerful CLI tool for generating CMake + Conan project templates for C++ applications and libraries.
Template Maker automates the creation of well-structured C++ projects with modern build systems. It generates complete project scaffolding including CMake configuration, Conan dependency management, and proper directory structure for both applications and libraries.
- π Quick Setup: Generate complete C++ project structure in seconds
- π¦ Conan Integration: Built-in support for modern C++ dependency management
- ποΈ CMake Ready: Pre-configured CMake files for immediate development
- π Dual Modes: Support for both application and library project types
- π§ͺ Test Framework: Includes test structure and configuration
- β‘ Zero Configuration: Works out of the box with sensible defaults
pip install template-makerpip install git+https://github.com/shajeen/template-maker.gittemplate-maker --helpTemplate Maker requires two arguments:
--name: Your project name--ptype: Project type (0 for application, 1 for library)
template-maker --name="my_awesome_app" --ptype=0This generates:
out/my_awesome_app/
βββ CMakeLists.txt
βββ README.md
βββ LICENSE
βββ conanfile.txt
βββ src/
βββ main.cpp
template-maker --name="my_awesome_lib" --ptype=1This generates:
out/my_awesome_lib/
βββ CMakeLists.txt
βββ README.md
βββ LICENSE
βββ app/ # Example application
β βββ CMakeLists.txt
β βββ src/
β βββ main.cpp
βββ lib/ # Library source
β βββ CMakeLists.txt
β βββ conanfile.py
β βββ include/
β β βββ main.h
β βββ src/
β βββ main.cpp
βββ test/ # Test framework
βββ CMakeLists.txt
βββ conanfile.txt
βββ src/
βββ main.cpp
| Type | Value | Description |
|---|---|---|
| Application | 0 | Standalone executable project |
| Library | 1 | Reusable library with tests and example app |
After generation, navigate to the output directory and build:
cd out/your_project_name
mkdir build && cd build
conan install .. --build=missing
cmake ..
cmake --build .- Python 3.6+
- Git (for installation from source)
The generated application includes:
- Modern CMake configuration
- Conan dependency management
- Source code organization
- Build scripts ready for immediate use
The generated library includes:
- Separate lib, app, and test directories
- Header/source separation
- Conan package configuration
- Example application demonstrating library usage
- Test framework setup
- Support for additional build systems (Meson, Bazel)
- Template customization options
- Integration with popular C++ frameworks
- Docker support
- CI/CD template generation
See the open issues for a list of proposed features and known issues.
Contributions are welcome! Here's how you can help:
- Report Issues: Found a bug? Create an issue
- Suggest Features: Have an idea? Request a feature
- Submit Code:
- Fork the repository
- Create a feature branch
- Make your changes with tests
- Submit a pull request
Please read CONTRIBUTING.md for detailed contribution guidelines.
This project is licensed under the GNU General Public License v3.0 - see the LICENSE file for details.
- π§ Email: shajeenahmed@gmail.com
- π¦ Twitter: @shajeenahamed
- π Issues: GitHub Issues
- π Documentation: Project Wiki
- The C++ community for continuous innovation
- Conan team for excellent package management
- CMake developers for the robust build system