-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Problem statement
When using the remote templates feature, files provided by the remote template (such as pyproject.toml) are currently treated as a literal overlay. This means that dynamic templating using Cookiecutter/Jinja variables (e.g., {{ cookiecutter.project_name }}) is not processed within these files.
I've experienced a couple pain points when authoring/using remote templates:
- Static
pyproject.tomlcontent: Key fields like project.name cannot be dynamically set based on user input during create. Additionally, other configurations withinpyproject.toml(e.g.,tool.agent-starter-packsettings, dependencies) cannot be conditionally templated based on selected options. - Inconsistent Experience: This behavior differs significantly from how built-in templates are processed, where
pyproject.tomlis dynamically generated and fully customized.
Current Workaround
Currently, I'm asking users to manually update their pyproject.toml after project creation.
Proposed Solution / Question
Is there any plan to support full Cookiecutter/Jinja2 templating for all files within remote templates? This would allow for dynamic configuration and eliminate the need for manual post-creation edits, providing a much smoother and more consistent user experience.
If full templating is not planned in the near future, are there any recommended workarounds or best practices for remote template creators to achieve dynamic pyproject.toml generation or other conditional file content based on create command options?