create-forge 0.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- create_forge-0.2.0/.gitignore +220 -0
- create_forge-0.2.0/CHANGELOG.md +67 -0
- create_forge-0.2.0/LICENSE +21 -0
- create_forge-0.2.0/PKG-INFO +207 -0
- create_forge-0.2.0/README.md +176 -0
- create_forge-0.2.0/docs/adr/README.md +32 -0
- create_forge-0.2.0/docs/roadmap-v1/README.md +96 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/00-governance-and-principles/README.md +34 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/01-python-core/README.md +23 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/02-developer-experience/README.md +34 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/03-quality-and-ci/README.md +25 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/04-runtime-and-configuration/README.md +63 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/05-security-and-supply-chain/README.md +49 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/06-extension-and-composition-contract/README.md +72 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/07-forge-cli-integration/README.md +78 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/08-reference-archetype-validation/README.md +58 -0
- create_forge-0.2.0/docs/roadmap-v1/roadmap/09-blueprint-compatibility/README.md +25 -0
- create_forge-0.2.0/pyproject.toml +210 -0
- create_forge-0.2.0/src/create_forge/__init__.py +1 -0
- create_forge-0.2.0/src/create_forge/cli.py +824 -0
- create_forge-0.2.0/src/create_forge/compat.py +47 -0
- create_forge-0.2.0/src/create_forge/config.py +126 -0
- create_forge-0.2.0/src/create_forge/engine.py +228 -0
- create_forge-0.2.0/src/create_forge/models.py +142 -0
- create_forge-0.2.0/src/create_forge/pipeline.py +141 -0
- create_forge-0.2.0/src/create_forge/prompts.py +231 -0
- create_forge-0.2.0/src/create_forge/registry.py +36 -0
- create_forge-0.2.0/src/create_forge/runner.py +148 -0
- create_forge-0.2.0/src/create_forge/spec.py +192 -0
- create_forge-0.2.0/src/create_forge/staging.py +180 -0
- create_forge-0.2.0/src/create_forge/templates.toml +121 -0
- create_forge-0.2.0/tests/__init__.py +0 -0
- create_forge-0.2.0/tests/conftest.py +17 -0
- create_forge-0.2.0/tests/test_adr.py +126 -0
- create_forge-0.2.0/tests/test_cli.py +1179 -0
- create_forge-0.2.0/tests/test_config.py +119 -0
- create_forge-0.2.0/tests/test_drift.py +280 -0
- create_forge-0.2.0/tests/test_e2e_generation.py +228 -0
- create_forge-0.2.0/tests/test_engine_adapter.py +356 -0
- create_forge-0.2.0/tests/test_engine_contract.py +381 -0
- create_forge-0.2.0/tests/test_engine_cross_repository.py +178 -0
- create_forge-0.2.0/tests/test_labels.py +131 -0
- create_forge-0.2.0/tests/test_models.py +125 -0
- create_forge-0.2.0/tests/test_pipeline.py +356 -0
- create_forge-0.2.0/tests/test_prompts.py +187 -0
- create_forge-0.2.0/tests/test_registry.py +30 -0
- create_forge-0.2.0/tests/test_runner.py +93 -0
- create_forge-0.2.0/tests/test_spec.py +225 -0
- create_forge-0.2.0/tests/test_staging.py +269 -0
- create_forge-0.2.0/tests/test_update.py +179 -0
- create_forge-0.2.0/tests/test_update_network.py +139 -0
|
@@ -0,0 +1,220 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[codz]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
share/python-wheels/
|
|
24
|
+
*.egg-info/
|
|
25
|
+
.installed.cfg
|
|
26
|
+
*.egg
|
|
27
|
+
MANIFEST
|
|
28
|
+
|
|
29
|
+
# PyInstaller
|
|
30
|
+
# Usually these files are written by a python script from a template
|
|
31
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
32
|
+
*.manifest
|
|
33
|
+
*.spec
|
|
34
|
+
|
|
35
|
+
# Installer logs
|
|
36
|
+
pip-log.txt
|
|
37
|
+
pip-delete-this-directory.txt
|
|
38
|
+
|
|
39
|
+
# Unit test / coverage reports
|
|
40
|
+
htmlcov/
|
|
41
|
+
.tox/
|
|
42
|
+
.nox/
|
|
43
|
+
.coverage
|
|
44
|
+
.coverage.*
|
|
45
|
+
.cache
|
|
46
|
+
nosetests.xml
|
|
47
|
+
coverage.xml
|
|
48
|
+
*.cover
|
|
49
|
+
*.py.cover
|
|
50
|
+
*.lcov
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.pytest_cache/
|
|
53
|
+
cover/
|
|
54
|
+
|
|
55
|
+
# Translations
|
|
56
|
+
*.mo
|
|
57
|
+
*.pot
|
|
58
|
+
|
|
59
|
+
# Django stuff:
|
|
60
|
+
*.log
|
|
61
|
+
local_settings.py
|
|
62
|
+
db.sqlite3
|
|
63
|
+
db.sqlite3-journal
|
|
64
|
+
|
|
65
|
+
# Flask stuff:
|
|
66
|
+
instance/
|
|
67
|
+
.webassets-cache
|
|
68
|
+
|
|
69
|
+
# Scrapy stuff:
|
|
70
|
+
.scrapy
|
|
71
|
+
|
|
72
|
+
# Sphinx documentation
|
|
73
|
+
docs/_build/
|
|
74
|
+
|
|
75
|
+
# PyBuilder
|
|
76
|
+
.pybuilder/
|
|
77
|
+
target/
|
|
78
|
+
|
|
79
|
+
# Jupyter Notebook
|
|
80
|
+
.ipynb_checkpoints
|
|
81
|
+
|
|
82
|
+
# IPython
|
|
83
|
+
profile_default/
|
|
84
|
+
ipython_config.py
|
|
85
|
+
|
|
86
|
+
# pyenv
|
|
87
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
88
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
89
|
+
# .python-version
|
|
90
|
+
|
|
91
|
+
# pipenv
|
|
92
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
93
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
94
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
95
|
+
# install all needed dependencies.
|
|
96
|
+
# Pipfile.lock
|
|
97
|
+
|
|
98
|
+
# UV
|
|
99
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
100
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
101
|
+
# commonly ignored for libraries.
|
|
102
|
+
# uv.lock
|
|
103
|
+
|
|
104
|
+
# poetry
|
|
105
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
106
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
107
|
+
# commonly ignored for libraries.
|
|
108
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
109
|
+
# poetry.lock
|
|
110
|
+
# poetry.toml
|
|
111
|
+
|
|
112
|
+
# pdm
|
|
113
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
114
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
115
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
116
|
+
# pdm.lock
|
|
117
|
+
# pdm.toml
|
|
118
|
+
.pdm-python
|
|
119
|
+
.pdm-build/
|
|
120
|
+
|
|
121
|
+
# pixi
|
|
122
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
123
|
+
# pixi.lock
|
|
124
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
125
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
126
|
+
.pixi/*
|
|
127
|
+
!.pixi/config.toml
|
|
128
|
+
|
|
129
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
130
|
+
__pypackages__/
|
|
131
|
+
|
|
132
|
+
# Celery stuff
|
|
133
|
+
celerybeat-schedule*
|
|
134
|
+
celerybeat.pid
|
|
135
|
+
|
|
136
|
+
# Redis
|
|
137
|
+
*.rdb
|
|
138
|
+
*.aof
|
|
139
|
+
*.pid
|
|
140
|
+
|
|
141
|
+
# RabbitMQ
|
|
142
|
+
mnesia/
|
|
143
|
+
rabbitmq/
|
|
144
|
+
rabbitmq-data/
|
|
145
|
+
|
|
146
|
+
# ActiveMQ
|
|
147
|
+
activemq-data/
|
|
148
|
+
|
|
149
|
+
# SageMath parsed files
|
|
150
|
+
*.sage.py
|
|
151
|
+
|
|
152
|
+
# Environments
|
|
153
|
+
.env
|
|
154
|
+
.envrc
|
|
155
|
+
.venv
|
|
156
|
+
env/
|
|
157
|
+
venv/
|
|
158
|
+
ENV/
|
|
159
|
+
env.bak/
|
|
160
|
+
venv.bak/
|
|
161
|
+
|
|
162
|
+
# Spyder project settings
|
|
163
|
+
.spyderproject
|
|
164
|
+
.spyproject
|
|
165
|
+
|
|
166
|
+
# Rope project settings
|
|
167
|
+
.ropeproject
|
|
168
|
+
|
|
169
|
+
# mkdocs documentation
|
|
170
|
+
/site
|
|
171
|
+
|
|
172
|
+
# mypy
|
|
173
|
+
.mypy_cache/
|
|
174
|
+
.dmypy.json
|
|
175
|
+
dmypy.json
|
|
176
|
+
|
|
177
|
+
# Pyre type checker
|
|
178
|
+
.pyre/
|
|
179
|
+
|
|
180
|
+
# pytype static type analyzer
|
|
181
|
+
.pytype/
|
|
182
|
+
|
|
183
|
+
# Cython debug symbols
|
|
184
|
+
cython_debug/
|
|
185
|
+
|
|
186
|
+
# PyCharm
|
|
187
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
188
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
189
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
190
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
191
|
+
# .idea/
|
|
192
|
+
|
|
193
|
+
# Abstra
|
|
194
|
+
# Abstra is an AI-powered process automation framework.
|
|
195
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
196
|
+
# Learn more at https://abstra.io/docs
|
|
197
|
+
.abstra/
|
|
198
|
+
|
|
199
|
+
# Visual Studio Code
|
|
200
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
201
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
202
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
203
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
204
|
+
# .vscode/
|
|
205
|
+
# Temporary file for partial code execution
|
|
206
|
+
tempCodeRunnerFile.py
|
|
207
|
+
|
|
208
|
+
# Ruff stuff:
|
|
209
|
+
.ruff_cache/
|
|
210
|
+
|
|
211
|
+
# PyPI configuration file
|
|
212
|
+
.pypirc
|
|
213
|
+
|
|
214
|
+
# Marimo
|
|
215
|
+
marimo/_static/
|
|
216
|
+
marimo/_lsp/
|
|
217
|
+
__marimo__/
|
|
218
|
+
|
|
219
|
+
# Streamlit
|
|
220
|
+
.streamlit/secrets.toml
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
Generated by git-cliff from Conventional Commits.
|
|
4
|
+
## [0.2.0] - 2026-08-30
|
|
5
|
+
|
|
6
|
+
### Documentation
|
|
7
|
+
|
|
8
|
+
- Mark v0.1.0 released in CLAUDE.md
|
|
9
|
+
- Sync cross-repository dependency matrix
|
|
10
|
+
- Link canonical Forge terminology
|
|
11
|
+
- Link canonical Foundation scope
|
|
12
|
+
- Link canonical Python support policy
|
|
13
|
+
- Define cross-repository integration policy
|
|
14
|
+
- Close roadmap stage 00
|
|
15
|
+
- Define CLI UX and prompting conventions
|
|
16
|
+
- Document cross-repository contributor workflow
|
|
17
|
+
- Link canonical editor integration strategy
|
|
18
|
+
- Link canonical configuration ownership
|
|
19
|
+
- Link canonical environment-variable conventions
|
|
20
|
+
- Link canonical structured logging contract
|
|
21
|
+
- Define template-engine source and version resolution
|
|
22
|
+
- Define template-engine dependency update policy
|
|
23
|
+
- Link canonical GitHub Action pinning policy
|
|
24
|
+
- Link canonical ProjectSpec protocol
|
|
25
|
+
- Link canonical component manifest contract
|
|
26
|
+
- Link stable template-engine API
|
|
27
|
+
- Link generated-project validation
|
|
28
|
+
- Link canonical Library archetype contract
|
|
29
|
+
- Link canonical CLI application archetype contract
|
|
30
|
+
|
|
31
|
+
### Features
|
|
32
|
+
|
|
33
|
+
- Report engine and version diagnostics in doctor
|
|
34
|
+
- Build the canonical ProjectSpec behind one engine adapter (#79)
|
|
35
|
+
- Implement component discovery adapter
|
|
36
|
+
- Implement the shared create pipeline behind an opt-in engine flag (#83)
|
|
37
|
+
- Stage and finalise generation without leaving partials (#84)
|
|
38
|
+
- Expose the CLI Application archetype through the engine path (#89)
|
|
39
|
+
- Publish to PyPI and assign the first bounded engine range
|
|
40
|
+
|
|
41
|
+
### Testing
|
|
42
|
+
|
|
43
|
+
- Add cross-repository engine contract
|
|
44
|
+
- Generate and check a real project end to end (#86)
|
|
45
|
+
## [0.1.0] - 2026-08-22
|
|
46
|
+
|
|
47
|
+
### Bug Fixes
|
|
48
|
+
|
|
49
|
+
- Drop unasked task_runner prompt, add missing license prompt
|
|
50
|
+
- Fall back to ASCII markers when the console can't encode check marks (#22)
|
|
51
|
+
- Update always failed -- missing overwrite=True (#24)
|
|
52
|
+
|
|
53
|
+
### Documentation
|
|
54
|
+
|
|
55
|
+
- Add Architecture Decision Records (Phase 6) (#21)
|
|
56
|
+
|
|
57
|
+
### Features
|
|
58
|
+
|
|
59
|
+
- Wire config.py into cli.py
|
|
60
|
+
|
|
61
|
+
### Refactor
|
|
62
|
+
|
|
63
|
+
- Extract helpers from cli.new() (#27)
|
|
64
|
+
|
|
65
|
+
### Testing
|
|
66
|
+
|
|
67
|
+
- Add test suite and copier.yml drift guard (#13)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Alex Sands
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: create-forge
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Scaffold modern Python projects from maintained templates.
|
|
5
|
+
Project-URL: Homepage, https://github.com/Sandsy09/create-forge
|
|
6
|
+
Project-URL: Repository, https://github.com/Sandsy09/create-forge
|
|
7
|
+
Project-URL: Issues, https://github.com/Sandsy09/create-forge/issues
|
|
8
|
+
Project-URL: Changelog, https://github.com/Sandsy09/create-forge/blob/main/CHANGELOG.md
|
|
9
|
+
Author: Alex
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: cookiecutter,copier,project,scaffold,template
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Environment :: Console
|
|
15
|
+
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
20
|
+
Classifier: Topic :: Software Development :: Code Generators
|
|
21
|
+
Classifier: Typing :: Typed
|
|
22
|
+
Requires-Python: >=3.11
|
|
23
|
+
Requires-Dist: copier<10,>=9.4
|
|
24
|
+
Requires-Dist: pydantic>=2.10
|
|
25
|
+
Requires-Dist: questionary>=2.0
|
|
26
|
+
Requires-Dist: rich>=13.9
|
|
27
|
+
Requires-Dist: typer>=0.15
|
|
28
|
+
Provides-Extra: engine
|
|
29
|
+
Requires-Dist: forge-template<0.4,>=0.3.1; extra == 'engine'
|
|
30
|
+
Description-Content-Type: text/markdown
|
|
31
|
+
|
|
32
|
+
# create-forge
|
|
33
|
+
|
|
34
|
+
[](https://github.com/Sandsy09/create-forge/actions/workflows/ci.yml)
|
|
35
|
+
|
|
36
|
+
Scaffold modern Python projects from maintained templates — and pull template
|
|
37
|
+
improvements back into projects you generated months ago.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
uvx create-forge new
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
No install step. Requires [uv](https://docs.astral.sh/uv/) and git.
|
|
44
|
+
|
|
45
|
+
## Why
|
|
46
|
+
|
|
47
|
+
Most project generators are fire-and-forget: you scaffold once, and from that
|
|
48
|
+
moment your project drifts away from the template. Six months later the template
|
|
49
|
+
has better lint rules, a security fix in CI, and a newer toolchain — and no path
|
|
50
|
+
to get any of it into projects already in the wild.
|
|
51
|
+
|
|
52
|
+
create-forge is built on [Copier](https://copier.readthedocs.io/), which does a
|
|
53
|
+
three-way merge between the template version your project was generated from and
|
|
54
|
+
the latest one. Local edits survive; template changes arrive.
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
uvx create-forge update
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## What you get
|
|
61
|
+
|
|
62
|
+
Every generated project ships with:
|
|
63
|
+
|
|
64
|
+
- **[uv](https://docs.astral.sh/uv/)** for packaging and dependency management
|
|
65
|
+
- **[Ruff](https://docs.astral.sh/ruff/)** for linting and formatting
|
|
66
|
+
- **mypy** or **pyright** (or both) for type checking
|
|
67
|
+
- **pytest** with coverage
|
|
68
|
+
- **pre-commit** hooks, including Conventional Commits enforcement
|
|
69
|
+
- **GitHub Actions** CI, with a test matrix across your supported Python versions
|
|
70
|
+
- **Renovate** or **Dependabot** for dependency updates
|
|
71
|
+
- `README`, `CONTRIBUTING`, `SECURITY`, `CHANGELOG`, issue and PR templates
|
|
72
|
+
- Optionally: a MkDocs documentation site and ADR scaffolding
|
|
73
|
+
|
|
74
|
+
Choices you make at scaffold time — build backend, versioning strategy, license,
|
|
75
|
+
type checker — are remembered, so updates respect them.
|
|
76
|
+
|
|
77
|
+
## Usage
|
|
78
|
+
|
|
79
|
+
```bash
|
|
80
|
+
# Interactive
|
|
81
|
+
uvx create-forge new
|
|
82
|
+
|
|
83
|
+
# Named up front
|
|
84
|
+
uvx create-forge new "Credit Risk Utils"
|
|
85
|
+
|
|
86
|
+
# Non-interactive, for scripts and CI
|
|
87
|
+
uvx create-forge new "My Lib" --yes \
|
|
88
|
+
--data build_backend=hatchling \
|
|
89
|
+
--data versioning=vcs \
|
|
90
|
+
--data type_checking=both
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
| Command | What it does |
|
|
94
|
+
| --- | --- |
|
|
95
|
+
| `new` | Create a project |
|
|
96
|
+
| `list` | Show available templates |
|
|
97
|
+
| `update` | Pull template changes into an existing project |
|
|
98
|
+
| `doctor` | Check your environment can scaffold and update |
|
|
99
|
+
| `config` | Inspect or initialise your saved configuration |
|
|
100
|
+
|
|
101
|
+
Useful flags on `new`: `--template/-t`, `--path/-p`, `--data/-d`, `--yes/-y`,
|
|
102
|
+
`--ref`, `--dry-run`.
|
|
103
|
+
|
|
104
|
+
## Configuration
|
|
105
|
+
|
|
106
|
+
Optional. Saves retyping the same answers:
|
|
107
|
+
|
|
108
|
+
```toml
|
|
109
|
+
# ~/.config/create-forge/config.toml
|
|
110
|
+
author_name = "Your Name"
|
|
111
|
+
author_email = "you@example.com"
|
|
112
|
+
github_org = "your-org"
|
|
113
|
+
default_template = "library"
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
`create-forge config init` writes a commented starter file at that path
|
|
117
|
+
without overwriting one that already exists. `create-forge config show`
|
|
118
|
+
prints the resolved values and where each came from.
|
|
119
|
+
|
|
120
|
+
`github_org` pre-fills its prompt — you're still asked, just with the answer
|
|
121
|
+
already typed in. `author_name` and `author_email` aren't prompted for at all,
|
|
122
|
+
so a configured value is applied directly. `default_template` picks which
|
|
123
|
+
template `new` offers first, interactively or under `--yes`.
|
|
124
|
+
|
|
125
|
+
Every key can be overridden with an environment variable —
|
|
126
|
+
`FORGE_GITHUB_ORG` and so on — or a command line flag. Precedence is
|
|
127
|
+
config < environment < `--data` < an interactive answer.
|
|
128
|
+
|
|
129
|
+
## Templates
|
|
130
|
+
|
|
131
|
+
Run `create-forge list` for what your installed version offers. The registry is
|
|
132
|
+
bundled with each release, so new templates arrive when you update the tool.
|
|
133
|
+
|
|
134
|
+
To use your own template:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
uvx create-forge new --template-url https://github.com/you/your-template
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
This describes the released v0.1.x architecture. Forge has accepted a future
|
|
141
|
+
[public-engine integration contract](docs/integration-contract.md) in which a
|
|
142
|
+
versioned `forge-template` package owns discovery and rendering. Its strict
|
|
143
|
+
[ProjectSpec protocol v1](https://github.com/Sandsy09/forge-template/blob/main/docs/project-spec.md)
|
|
144
|
+
and [component manifest protocol v1](https://github.com/Sandsy09/forge-template/blob/main/docs/component-manifests.md)
|
|
145
|
+
are now implemented behind the canonical
|
|
146
|
+
[stable template-engine API](https://github.com/Sandsy09/forge-template/blob/main/docs/template-engine-api.md)
|
|
147
|
+
([ADR 0029](https://github.com/Sandsy09/forge-template/blob/main/docs/adr/0029-stable-template-engine-api.md)).
|
|
148
|
+
The accepted
|
|
149
|
+
[Library archetype contract](https://github.com/Sandsy09/forge-template/blob/main/docs/library-archetype.md)
|
|
150
|
+
defines the first production component, implemented on `forge-template/main`
|
|
151
|
+
and released at `0.3.0`. The accepted
|
|
152
|
+
[CLI Application archetype contract](https://github.com/Sandsy09/forge-template/blob/main/docs/cli-application-archetype.md)
|
|
153
|
+
selects the optionless engine-owned `cli` archetype and derives its console
|
|
154
|
+
command from `ProjectSpec.project.repository_name`;
|
|
155
|
+
[FT-08.04](https://github.com/Sandsy09/forge-template/issues/4) implemented
|
|
156
|
+
it in the same `0.3.0` release, and
|
|
157
|
+
[CF-08.02](https://github.com/Sandsy09/create-forge/issues/10) exposes both
|
|
158
|
+
archetypes behind the hidden `new --engine-preview` flag's `--archetype`
|
|
159
|
+
option. Neither change alters this CLI's default `new` answers, registry, or
|
|
160
|
+
released dependency surface.
|
|
161
|
+
The engine now also defines in-memory
|
|
162
|
+
[generated-project validation](https://github.com/Sandsy09/forge-template/blob/main/docs/generated-project-validation.md)
|
|
163
|
+
([ADR 0030](https://github.com/Sandsy09/forge-template/blob/main/docs/adr/0030-generated-project-validation.md))
|
|
164
|
+
before rendered output is returned; `render_project` already calls it before
|
|
165
|
+
`--engine-preview` receives a result.
|
|
166
|
+
This repository now depends on a real, released `forge-template` range —
|
|
167
|
+
`>=0.3.1,<0.4`, published to PyPI as the optional `engine` extra
|
|
168
|
+
(`pip install 'create-forge[engine]'`; [#9](https://github.com/Sandsy09/create-forge/issues/9),
|
|
169
|
+
[ADR 0018](docs/adr/0018-pypi-distribution-and-the-first-engine-range.md)) —
|
|
170
|
+
rather than a development-only pin. That range is reachable only behind
|
|
171
|
+
`--engine-preview`; the current registry and `--template-url` behaviour
|
|
172
|
+
remain unchanged until the complete, tested cutover is released — at which
|
|
173
|
+
point `--engine-source`/`--engine-ref` (see the
|
|
174
|
+
[engine resolution contract](docs/engine-resolution.md)) take over this role,
|
|
175
|
+
not `--template-url`.
|
|
176
|
+
|
|
177
|
+
## Security
|
|
178
|
+
|
|
179
|
+
**create-forge executes code from the template it clones.** Copier templates can
|
|
180
|
+
declare post-generation tasks, and this tool runs them — that is how a generated
|
|
181
|
+
project arrives already git-initialised with hooks installed.
|
|
182
|
+
|
|
183
|
+
The template addresses are compiled into each release rather than fetched at
|
|
184
|
+
runtime or read from user configuration, so the only code trusted by default is
|
|
185
|
+
code published alongside the tool. `--template-url` bypasses that, and prompts
|
|
186
|
+
for confirmation before doing so. Point it only at repositories you trust.
|
|
187
|
+
|
|
188
|
+
Report vulnerabilities per [SECURITY.md](SECURITY.md) rather than in a public
|
|
189
|
+
issue.
|
|
190
|
+
|
|
191
|
+
## Using this at work
|
|
192
|
+
|
|
193
|
+
In v0.1.x, organisations needing custom executable templates can fork this
|
|
194
|
+
repository, point the bundled registry at their own templates, and maintain it
|
|
195
|
+
internally. The accepted target makes a downstream client of the
|
|
196
|
+
`forge-template` public engine the preferred route for organisation defaults
|
|
197
|
+
and constraints. Forks remain appropriate for genuinely custom executable
|
|
198
|
+
template content; see the [integration contract](docs/integration-contract.md).
|
|
199
|
+
|
|
200
|
+
## Contributing
|
|
201
|
+
|
|
202
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Issues and pull requests welcome.
|
|
203
|
+
Significant design decisions are recorded in [docs/adr/](docs/adr/).
|
|
204
|
+
|
|
205
|
+
## License
|
|
206
|
+
|
|
207
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
# create-forge
|
|
2
|
+
|
|
3
|
+
[](https://github.com/Sandsy09/create-forge/actions/workflows/ci.yml)
|
|
4
|
+
|
|
5
|
+
Scaffold modern Python projects from maintained templates — and pull template
|
|
6
|
+
improvements back into projects you generated months ago.
|
|
7
|
+
|
|
8
|
+
```bash
|
|
9
|
+
uvx create-forge new
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
No install step. Requires [uv](https://docs.astral.sh/uv/) and git.
|
|
13
|
+
|
|
14
|
+
## Why
|
|
15
|
+
|
|
16
|
+
Most project generators are fire-and-forget: you scaffold once, and from that
|
|
17
|
+
moment your project drifts away from the template. Six months later the template
|
|
18
|
+
has better lint rules, a security fix in CI, and a newer toolchain — and no path
|
|
19
|
+
to get any of it into projects already in the wild.
|
|
20
|
+
|
|
21
|
+
create-forge is built on [Copier](https://copier.readthedocs.io/), which does a
|
|
22
|
+
three-way merge between the template version your project was generated from and
|
|
23
|
+
the latest one. Local edits survive; template changes arrive.
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
uvx create-forge update
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## What you get
|
|
30
|
+
|
|
31
|
+
Every generated project ships with:
|
|
32
|
+
|
|
33
|
+
- **[uv](https://docs.astral.sh/uv/)** for packaging and dependency management
|
|
34
|
+
- **[Ruff](https://docs.astral.sh/ruff/)** for linting and formatting
|
|
35
|
+
- **mypy** or **pyright** (or both) for type checking
|
|
36
|
+
- **pytest** with coverage
|
|
37
|
+
- **pre-commit** hooks, including Conventional Commits enforcement
|
|
38
|
+
- **GitHub Actions** CI, with a test matrix across your supported Python versions
|
|
39
|
+
- **Renovate** or **Dependabot** for dependency updates
|
|
40
|
+
- `README`, `CONTRIBUTING`, `SECURITY`, `CHANGELOG`, issue and PR templates
|
|
41
|
+
- Optionally: a MkDocs documentation site and ADR scaffolding
|
|
42
|
+
|
|
43
|
+
Choices you make at scaffold time — build backend, versioning strategy, license,
|
|
44
|
+
type checker — are remembered, so updates respect them.
|
|
45
|
+
|
|
46
|
+
## Usage
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
# Interactive
|
|
50
|
+
uvx create-forge new
|
|
51
|
+
|
|
52
|
+
# Named up front
|
|
53
|
+
uvx create-forge new "Credit Risk Utils"
|
|
54
|
+
|
|
55
|
+
# Non-interactive, for scripts and CI
|
|
56
|
+
uvx create-forge new "My Lib" --yes \
|
|
57
|
+
--data build_backend=hatchling \
|
|
58
|
+
--data versioning=vcs \
|
|
59
|
+
--data type_checking=both
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
| Command | What it does |
|
|
63
|
+
| --- | --- |
|
|
64
|
+
| `new` | Create a project |
|
|
65
|
+
| `list` | Show available templates |
|
|
66
|
+
| `update` | Pull template changes into an existing project |
|
|
67
|
+
| `doctor` | Check your environment can scaffold and update |
|
|
68
|
+
| `config` | Inspect or initialise your saved configuration |
|
|
69
|
+
|
|
70
|
+
Useful flags on `new`: `--template/-t`, `--path/-p`, `--data/-d`, `--yes/-y`,
|
|
71
|
+
`--ref`, `--dry-run`.
|
|
72
|
+
|
|
73
|
+
## Configuration
|
|
74
|
+
|
|
75
|
+
Optional. Saves retyping the same answers:
|
|
76
|
+
|
|
77
|
+
```toml
|
|
78
|
+
# ~/.config/create-forge/config.toml
|
|
79
|
+
author_name = "Your Name"
|
|
80
|
+
author_email = "you@example.com"
|
|
81
|
+
github_org = "your-org"
|
|
82
|
+
default_template = "library"
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
`create-forge config init` writes a commented starter file at that path
|
|
86
|
+
without overwriting one that already exists. `create-forge config show`
|
|
87
|
+
prints the resolved values and where each came from.
|
|
88
|
+
|
|
89
|
+
`github_org` pre-fills its prompt — you're still asked, just with the answer
|
|
90
|
+
already typed in. `author_name` and `author_email` aren't prompted for at all,
|
|
91
|
+
so a configured value is applied directly. `default_template` picks which
|
|
92
|
+
template `new` offers first, interactively or under `--yes`.
|
|
93
|
+
|
|
94
|
+
Every key can be overridden with an environment variable —
|
|
95
|
+
`FORGE_GITHUB_ORG` and so on — or a command line flag. Precedence is
|
|
96
|
+
config < environment < `--data` < an interactive answer.
|
|
97
|
+
|
|
98
|
+
## Templates
|
|
99
|
+
|
|
100
|
+
Run `create-forge list` for what your installed version offers. The registry is
|
|
101
|
+
bundled with each release, so new templates arrive when you update the tool.
|
|
102
|
+
|
|
103
|
+
To use your own template:
|
|
104
|
+
|
|
105
|
+
```bash
|
|
106
|
+
uvx create-forge new --template-url https://github.com/you/your-template
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
This describes the released v0.1.x architecture. Forge has accepted a future
|
|
110
|
+
[public-engine integration contract](docs/integration-contract.md) in which a
|
|
111
|
+
versioned `forge-template` package owns discovery and rendering. Its strict
|
|
112
|
+
[ProjectSpec protocol v1](https://github.com/Sandsy09/forge-template/blob/main/docs/project-spec.md)
|
|
113
|
+
and [component manifest protocol v1](https://github.com/Sandsy09/forge-template/blob/main/docs/component-manifests.md)
|
|
114
|
+
are now implemented behind the canonical
|
|
115
|
+
[stable template-engine API](https://github.com/Sandsy09/forge-template/blob/main/docs/template-engine-api.md)
|
|
116
|
+
([ADR 0029](https://github.com/Sandsy09/forge-template/blob/main/docs/adr/0029-stable-template-engine-api.md)).
|
|
117
|
+
The accepted
|
|
118
|
+
[Library archetype contract](https://github.com/Sandsy09/forge-template/blob/main/docs/library-archetype.md)
|
|
119
|
+
defines the first production component, implemented on `forge-template/main`
|
|
120
|
+
and released at `0.3.0`. The accepted
|
|
121
|
+
[CLI Application archetype contract](https://github.com/Sandsy09/forge-template/blob/main/docs/cli-application-archetype.md)
|
|
122
|
+
selects the optionless engine-owned `cli` archetype and derives its console
|
|
123
|
+
command from `ProjectSpec.project.repository_name`;
|
|
124
|
+
[FT-08.04](https://github.com/Sandsy09/forge-template/issues/4) implemented
|
|
125
|
+
it in the same `0.3.0` release, and
|
|
126
|
+
[CF-08.02](https://github.com/Sandsy09/create-forge/issues/10) exposes both
|
|
127
|
+
archetypes behind the hidden `new --engine-preview` flag's `--archetype`
|
|
128
|
+
option. Neither change alters this CLI's default `new` answers, registry, or
|
|
129
|
+
released dependency surface.
|
|
130
|
+
The engine now also defines in-memory
|
|
131
|
+
[generated-project validation](https://github.com/Sandsy09/forge-template/blob/main/docs/generated-project-validation.md)
|
|
132
|
+
([ADR 0030](https://github.com/Sandsy09/forge-template/blob/main/docs/adr/0030-generated-project-validation.md))
|
|
133
|
+
before rendered output is returned; `render_project` already calls it before
|
|
134
|
+
`--engine-preview` receives a result.
|
|
135
|
+
This repository now depends on a real, released `forge-template` range —
|
|
136
|
+
`>=0.3.1,<0.4`, published to PyPI as the optional `engine` extra
|
|
137
|
+
(`pip install 'create-forge[engine]'`; [#9](https://github.com/Sandsy09/create-forge/issues/9),
|
|
138
|
+
[ADR 0018](docs/adr/0018-pypi-distribution-and-the-first-engine-range.md)) —
|
|
139
|
+
rather than a development-only pin. That range is reachable only behind
|
|
140
|
+
`--engine-preview`; the current registry and `--template-url` behaviour
|
|
141
|
+
remain unchanged until the complete, tested cutover is released — at which
|
|
142
|
+
point `--engine-source`/`--engine-ref` (see the
|
|
143
|
+
[engine resolution contract](docs/engine-resolution.md)) take over this role,
|
|
144
|
+
not `--template-url`.
|
|
145
|
+
|
|
146
|
+
## Security
|
|
147
|
+
|
|
148
|
+
**create-forge executes code from the template it clones.** Copier templates can
|
|
149
|
+
declare post-generation tasks, and this tool runs them — that is how a generated
|
|
150
|
+
project arrives already git-initialised with hooks installed.
|
|
151
|
+
|
|
152
|
+
The template addresses are compiled into each release rather than fetched at
|
|
153
|
+
runtime or read from user configuration, so the only code trusted by default is
|
|
154
|
+
code published alongside the tool. `--template-url` bypasses that, and prompts
|
|
155
|
+
for confirmation before doing so. Point it only at repositories you trust.
|
|
156
|
+
|
|
157
|
+
Report vulnerabilities per [SECURITY.md](SECURITY.md) rather than in a public
|
|
158
|
+
issue.
|
|
159
|
+
|
|
160
|
+
## Using this at work
|
|
161
|
+
|
|
162
|
+
In v0.1.x, organisations needing custom executable templates can fork this
|
|
163
|
+
repository, point the bundled registry at their own templates, and maintain it
|
|
164
|
+
internally. The accepted target makes a downstream client of the
|
|
165
|
+
`forge-template` public engine the preferred route for organisation defaults
|
|
166
|
+
and constraints. Forks remain appropriate for genuinely custom executable
|
|
167
|
+
template content; see the [integration contract](docs/integration-contract.md).
|
|
168
|
+
|
|
169
|
+
## Contributing
|
|
170
|
+
|
|
171
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md). Issues and pull requests welcome.
|
|
172
|
+
Significant design decisions are recorded in [docs/adr/](docs/adr/).
|
|
173
|
+
|
|
174
|
+
## License
|
|
175
|
+
|
|
176
|
+
MIT — see [LICENSE](LICENSE).
|