cookiecutter / cookiecutter/cookiecutter
Alter context before creating project
- Dominant language
- Python
- Stars
- 25.1k
- Forks
- 2.3k
- PR merge metrics
- No merged PRs in 30d
Description
It would be nice if cookiecutter could run a function into it's context before creating the project. Example:
```
project
-- {{ cookiecutter.repo_name }}/ ...
-- context.py
```
**context.py**
```
def update_context(context):
# do stuff to context
```
Contributor guide
Research direction
Start by tracing Cookiecutter's project-creation flow and how the template context is assembled; the issue's example uses a template-level context.py with update_context(context). Determine the integration point and API needed to modify context before rendering, then verify that a template function can affect the generated project context before creation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100