C++ Project Foundation
Create a ready-to-build C++ service project with one command. The generated project includes sample code, tests, CMake and Conan settings, GitHub Actions, release packaging, and optional deployment tools.
This project is a starter kit and command-line tool. It does not decide how your service should work, choose a database, or deploy anything without an explicit command.
Is this for me?
Use it when you want:
- a new C++20 service that builds the same way locally and in GitHub Actions;
- tests, formatting and common safety checks set up from the beginning;
- a repeatable release package with a checksum and a software inventory;
- optional commands for deployment, rollback, backup and operational records.
The supported production setup is Ubuntu 24.04 on x86-64 with GCC 13. You can inspect or generate projects on other systems, but production builds should use the supported setup.
Quick start
Creating a project requires Python 3.11 or newer and
pipx. Building it also requires GCC 13, CMake, Ninja and
Conan. The step-by-step guide includes the installation commands.
Install the tool from PyPI:
pipx install "cpp-project-foundation==0.7.0"
cpp-foundation --help
Create a project. The output directory must not already exist:
cpp-foundation init \
--name order-service \
--version 0.1.0 \
--license MIT \
--output ../order-service
cd ../order-service
Check the generated files:
cpp-foundation validate
cpp-foundation doctor --root .
validate checks foundation.toml. doctor explains which files and tools are ready and
which optional tools are missing. A warning that the service has not been built yet is
normal at this point.
Continue with Build and run your first project.
What gets created?
| Path | Purpose |
|---|---|
src/, include/ |
Example application code to replace with your own code |
tests/ |
A small test and the place for new tests |
CMakeLists.txt, CMakePresets.json |
Build targets and short repeatable commands |
conanfile.py, conan/ |
Third-party dependencies and their fixed versions |
foundation.toml |
Project name, build targets, release files and operation commands |
.github/workflows/ |
Automated build, test, security and release jobs |
deploy/ |
Optional Docker Compose and systemd examples |
quality/ |
Time, size and coverage limits used by checks |
LICENSE, SECURITY.md |
Chosen license and private-reporting guidance |
The generated directory is your project. You may edit it normally. The tool never silently replaces application code or changes a limit after a failed check.
Commands you will use most
Run these commands from the generated project directory:
| Command | When to use it |
|---|---|
cpp-foundation validate |
After editing foundation.toml |
cpp-foundation doctor --root . |
When setting up a machine or diagnosing a project |
cpp-foundation quality --root . --mode fast |
Before each pull request |
cpp-foundation template-diff --root . |
Before upgrading the foundation version |
cpp-foundation package --output-dir dist |
After a successful release build |
cpp-foundation verify-release ... |
Before installing or publishing a release archive |
Quality tools have a one-time installation step. Deployment and backup commands also need some preparation. Follow the linked guide instead of copying an isolated command:
- First project: install, build, test and run
- Maintain a generated project
- Release, deploy, recover and back up
A few terms used in the documentation
- Manifest:
foundation.toml, the small file that tells the tool about your project. - Lockfile: a file that records exact dependency versions so later builds use the same inputs.
- Workflow: an automated GitHub Actions job.
- Evidence: a JSON result or package kept to show what a check actually did.
- SBOM: a list of the files and third-party packages in a release.
Documentation
Start at the documentation index, which separates guides by audience:
- new users;
- people maintaining a generated project;
- production operators;
- contributors maintaining this foundation repository.
For version support and upgrades, see compatibility and migration notes.
Important limits
- Generated monitoring and deployment files are examples. Review host names, storage, credentials and access rules before production use.
- Application data, credentials and backups must stay outside release directories.
- Passing the included checks does not by itself prove high availability, capacity or disaster recovery.
- Long eight-hour checks need a reliable self-hosted GitHub Actions runner. Short checks use GitHub-hosted runners by default.
To report a security issue, follow SECURITY.md. To change this repository, follow CONTRIBUTING.md.
Metadata
Release files for cpp-project-foundation 0.7.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cpp_project_foundation-0.7.0-py3-none-any.whl | Python 3 | none | any | Details |
Release files / cpp_project_foundation-0.7.0-py3-none-any.whl
| Download URL | cpp_project_foundation-0.7.0-py3-none-any.whl |
|---|---|
| Size | 89.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e55ca01032b6449bafab44c4bde7019f215e10a817740d1d124a26d4e6e356de
|
|
BLAKE2b-256 checksum How to use checksums |
d5d692fec9ddbba78f20cf4067bf1257ba8db0e6e6aa8b1b6dc7eb52fa78e604
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 30, 2026.
Transparency log