Bootstrap a professional-grade C++ project environment
Project description
cppboot
Bootstrap a professional-grade C++ project environment so you can start writing code immediately.
Install
pip install -e .
# or
python3 -m pip install -e .
Usage
cppboot --name myproj
cppboot -n myproj --license mit --with-modules
cppboot -n myproj --no-vscode --no-vim --no-github-actions --no-ctags
cppboot -n myproj --github # opt-in: create remote with gh
Every project includes a version library API driven by a root VERSION
file (single source of truth) and CLI --version / -V.
Options
Requires Python 3.9+ (CI: 3.9–3.15; Amazon Linux’s system 3.9 is supported).
| Flag | Default | Description |
|---|---|---|
-n, --name |
(prompt) | Project name |
--license |
apache-2.0 |
License id |
--build-system |
cmake |
Only cmake for now |
--with-modules |
off | C++20 modules scaffold (opt-in) |
--shared |
off | Shared library instead of static (opt-in) |
--github |
off | Create GitHub remote with gh (opt-in) |
--output-dir |
. |
Parent directory for the new project |
-v, --verbose |
off | Verbose logging |
--version |
Print cppboot version | |
-h, --help |
Help |
Opinionated defaults (always on). Disable only with --no-*:
| Opt-out | Skips |
|---|---|
--no-vim |
Project-local .vimrc |
--no-ctags |
Universal Ctags .ctags + make tags |
--no-vscode |
VS Code + CMakePresets.json |
--no-github-actions |
CI / sanitizers / release workflows |
--no-codespaces |
Codespaces / Dev Container |
--no-community-docs |
CoC / CONTRIBUTING / SECURITY |
--no-git |
git init + initial commit |
--no-fmt |
make fmt after scaffolding |
What you get
- CMake (C++20) + GNU Makefile + Windows
build.bat+CMakePresets.json - Root
VERSIONfile → CMake /--version/ release workflow stay in sync - Default version component + app CLI
--version+ tests + benchmark - Library + app + GoogleTest + Google Benchmark
- Default app deps (FetchContent, ON): CLI11, nlohmann/json, spdlog
- Component-oriented
src/layout with explicit source lists .clang-format(Microsoft layout); code logic/naming per Google C++ Style Guide.clangd, Doxygen, warnings-as-errors,compile_commands.json- Root convenience binary symlink (
./myprojaftermake) - Default ON:
.vimrc, ctags, VS Code (clangd, CMake Tools, CodeLLDB, C++ TestMate), GitHub Actions CI, Codespaces (.devcontainer/) - Default OFF:
--githubremote creation - After scaffolding: runs
make fmt, thengit init+ add + initial commit README.md,AGENTS.md- Repo-local CODE_OF_CONDUCT.md (short, technology-first), CONTRIBUTING.md, SECURITY.md (override GitHub user/org default community files)
Post-bootstrap state
When make/clang-format and git are available, a new project ends with:
- Sources formatted to the checked-in Microsoft
.clang-format - A single Initial commit from cppboot containing the full tree
Developers can start work with a clean git status and predictable formatting.
Development / tests
python3 -m pip install -e ".[dev]"
python3 -m pytest -q
python3 -m ruff check src tests
python3 -m ruff format --check src tests
python3 -m mypy
python3 -m build && python3 -m twine check dist/*
Tests cover CLI parsing, name/license logic, and filesystem generation with
offline licenses and no network / no gh. Optional markers:
@pytest.mark.requires_git— runs only whengitis onPATH
Optional full C++ smoke (local only, not required for CI):
bash scripts/smoke.sh
Releasing to PyPI (when ready)
Package version lives in src/cppboot/_version.py (single source; also used by
setuptools dynamic version).
- Bump
__version__in_version.pyand updateCHANGELOG.md - Merge to
main(CI must be green) - Create a GitHub Release with tag
vX.Y.Zmatching that version
(GitHub UI: Releases → Draft a new release, orgh release create vX.Y.Z) - Workflow Publish (
.github/workflows/publish.yml) runs onrelease: published:- Verifies tag
vX.Y.Z== package version - Builds sdist + wheel
- Uploads to PyPI via Trusted Publishing (OIDC; no long-lived API token in the repo)
- Verifies tag
Manual dry-run target (does not publish to real PyPI unless you choose it):
gh workflow run publish.yml -f target=testpypi
One-time setup before the first real publish (not automated here):
- Create the empty project on PyPI (or claim
cppbooton first upload) - Add a Trusted Publisher: owner
bluesentinelsec, repocppboot, workflowpublish.yml, environmentpypi - Optionally configure TestPyPI the same way with environment
testpypi - Create GitHub Environments
pypi/testpypi(optional protection rules)
Until that setup is done, the publish job will fail at the upload step — which is expected and safe while developing.
Package layout
src/cppboot/
cli.py # argparse entrypoint
names.py # name validation / identifiers
licenses.py # license fetch (online + offline)
options.py # ProjectOptions / GenerateResult
generator.py # stable facade (re-exports generate_project)
generate/ # implementation
project.py # orchestration
cmake_files.py
build_wrappers.py # Makefile + build.bat
sources.py # VERSION + C++ templates
docs.py
ide.py
github_actions.py
tooling.py # fmt / git / gh
Public imports:
from cppboot import ProjectOptions, generate_project
# or
from cppboot.generator import ProjectOptions, generate_project
Smoke check (generated C++ project)
python3 -m pip install -e .
bash scripts/smoke.sh
# or manually:
rm -rf /tmp/cppboot-smoke && cppboot -n smoke --output-dir /tmp/cppboot-smoke
cd /tmp/cppboot-smoke/smoke
git status --short # should be empty after bootstrap
make && make test && ./smoke --version
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cppboot-0.2.1.tar.gz.
File metadata
- Download URL: cppboot-0.2.1.tar.gz
- Upload date:
- Size: 55.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
478ce767d6e07377ddc3a0900e21910513902d8588b69c3c4a56ff0115b4deb5
|
|
| MD5 |
ef58c3d6ad112aa5674a5bb46667eab5
|
|
| BLAKE2b-256 |
e78d83e5073fc969e0d8bff81ac5a662509cde74625288405cde2302327b6ba3
|
Provenance
The following attestation bundles were made for cppboot-0.2.1.tar.gz:
Publisher:
publish.yml on bluesentinelsec/cppboot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cppboot-0.2.1.tar.gz -
Subject digest:
478ce767d6e07377ddc3a0900e21910513902d8588b69c3c4a56ff0115b4deb5 - Sigstore transparency entry: 2259736899
- Sigstore integration time:
-
Permalink:
bluesentinelsec/cppboot@8532c5adfa689738ad22f92b0ce636b66e4f7b5c -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/bluesentinelsec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8532c5adfa689738ad22f92b0ce636b66e4f7b5c -
Trigger Event:
release
-
Statement type:
File details
Details for the file cppboot-0.2.1-py3-none-any.whl.
File metadata
- Download URL: cppboot-0.2.1-py3-none-any.whl
- Upload date:
- Size: 58.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0214d38a8b4e48b9dbdaedb59beabc0c404f17181e7bb4ec1ff06213011a919d
|
|
| MD5 |
579dac9c215d34eb8a47b9a27c5e2b0c
|
|
| BLAKE2b-256 |
47d588ee92b34347393548b56180f07f2be369794faef060f3f98136bd8d863d
|
Provenance
The following attestation bundles were made for cppboot-0.2.1-py3-none-any.whl:
Publisher:
publish.yml on bluesentinelsec/cppboot
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cppboot-0.2.1-py3-none-any.whl -
Subject digest:
0214d38a8b4e48b9dbdaedb59beabc0c404f17181e7bb4ec1ff06213011a919d - Sigstore transparency entry: 2259736948
- Sigstore integration time:
-
Permalink:
bluesentinelsec/cppboot@8532c5adfa689738ad22f92b0ce636b66e4f7b5c -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/bluesentinelsec
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@8532c5adfa689738ad22f92b0ce636b66e4f7b5c -
Trigger Event:
release
-
Statement type: