Skip to content

chore: replace copier with cookiecutter for template scaffolding#2962

Merged
crivetimihai merged 4 commits intomainfrom
copier
Feb 16, 2026
Merged

chore: replace copier with cookiecutter for template scaffolding#2962
crivetimihai merged 4 commits intomainfrom
copier

Conversation

@crivetimihai
Copy link
Copy Markdown
Member

@crivetimihai crivetimihai commented Feb 16, 2026

Summary

  • Replaces copier with cookiecutter across all 4 template sets (Go server, Python server, native plugin, external plugin)
  • Updates mcpplugins CLI to use cookiecutter.main.cookiecutter() API with new --template_type flag for plugin template selection
  • Updates scaffold shell scripts, dependencies (pyproject.toml, tox.ini), tests, and documentation

Test plan

  • All 11 CLI unit tests pass (tests/unit/mcpgateway/plugins/tools/test_cli.py)
  • Verify cookiecutter mcp-servers/templates/go generates a working Go MCP server
  • Verify cookiecutter mcp-servers/templates/python generates a working Python MCP server
  • Verify mcpplugins bootstrap --template_type native scaffolds a native plugin
  • Verify mcpplugins bootstrap --template_type external scaffolds an external plugin

Closes #2361

Copier pulled jinja2-ansible-filters (GPL-licensed). Cookiecutter is a
simpler, widely-adopted alternative with no problematic transitive deps.

- Migrate all 4 template sets (Go server, Python server, native plugin,
  external plugin) from copier YAML configs to cookiecutter.json with
  {{cookiecutter.*}} directory conventions
- Update mcpplugins CLI to use cookiecutter.main.cookiecutter() API,
  add --template_type flag to select native/external plugin templates
- Replace copier>=9.11.3 with cookiecutter>=2.6.0 in pyproject.toml
  and tox.ini
- Update scaffold shell scripts to invoke cookiecutter CLI
- Update tests, AGENTS.md, llms docs, and roadmap

Closes #2361

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Template files containing Jinja2 syntax ({{ cookiecutter.* }}, {% set %})
are invalid YAML/TOML/Python from linters' perspective. Add plugin_templates/
to the global exclude in both pre-commit configs and yamllint. Also restore
executable bit on run-server.sh and update uv.lock.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Template go.mod and pyproject.toml contain Jinja2 variables that are
invalid from the perspective of Go tooling and TOML parsers. Skip
template directories in gosec, govulncheck, and tomllint find commands.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
The lint.yml workflow runs tomlcheck directly via find, not through the
Makefile target. Add the same template directory exclusions.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
@crivetimihai crivetimihai merged commit f101724 into main Feb 16, 2026
54 checks passed
@crivetimihai crivetimihai deleted the copier branch February 16, 2026 08:37
suciu-daniel pushed a commit that referenced this pull request Feb 16, 2026
* chore: replace copier with cookiecutter for template scaffolding (#2361)

Copier pulled jinja2-ansible-filters (GPL-licensed). Cookiecutter is a
simpler, widely-adopted alternative with no problematic transitive deps.

- Migrate all 4 template sets (Go server, Python server, native plugin,
  external plugin) from copier YAML configs to cookiecutter.json with
  {{cookiecutter.*}} directory conventions
- Update mcpplugins CLI to use cookiecutter.main.cookiecutter() API,
  add --template_type flag to select native/external plugin templates
- Replace copier>=9.11.3 with cookiecutter>=2.6.0 in pyproject.toml
  and tox.ini
- Update scaffold shell scripts to invoke cookiecutter CLI
- Update tests, AGENTS.md, llms docs, and roadmap

Closes #2361

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter template dirs from pre-commit linting

Template files containing Jinja2 syntax ({{ cookiecutter.* }}, {% set %})
are invalid YAML/TOML/Python from linters' perspective. Add plugin_templates/
to the global exclude in both pre-commit configs and yamllint. Also restore
executable bit on run-server.sh and update uv.lock.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter templates from gosec and tomllint

Template go.mod and pyproject.toml contain Jinja2 variables that are
invalid from the perspective of Go tooling and TOML parsers. Skip
template directories in gosec, govulncheck, and tomllint find commands.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter templates from tomllint CI workflow

The lint.yml workflow runs tomlcheck directly via find, not through the
Makefile target. Add the same template directory exclusions.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
vishu-bh pushed a commit that referenced this pull request Feb 18, 2026
* chore: replace copier with cookiecutter for template scaffolding (#2361)

Copier pulled jinja2-ansible-filters (GPL-licensed). Cookiecutter is a
simpler, widely-adopted alternative with no problematic transitive deps.

- Migrate all 4 template sets (Go server, Python server, native plugin,
  external plugin) from copier YAML configs to cookiecutter.json with
  {{cookiecutter.*}} directory conventions
- Update mcpplugins CLI to use cookiecutter.main.cookiecutter() API,
  add --template_type flag to select native/external plugin templates
- Replace copier>=9.11.3 with cookiecutter>=2.6.0 in pyproject.toml
  and tox.ini
- Update scaffold shell scripts to invoke cookiecutter CLI
- Update tests, AGENTS.md, llms docs, and roadmap

Closes #2361

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter template dirs from pre-commit linting

Template files containing Jinja2 syntax ({{ cookiecutter.* }}, {% set %})
are invalid YAML/TOML/Python from linters' perspective. Add plugin_templates/
to the global exclude in both pre-commit configs and yamllint. Also restore
executable bit on run-server.sh and update uv.lock.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter templates from gosec and tomllint

Template go.mod and pyproject.toml contain Jinja2 variables that are
invalid from the perspective of Go tooling and TOML parsers. Skip
template directories in gosec, govulncheck, and tomllint find commands.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter templates from tomllint CI workflow

The lint.yml workflow runs tomlcheck directly via find, not through the
Makefile target. Add the same template directory exclusions.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Signed-off-by: Vishu Bhatnagar <vishu.bhatnagar@ibm.com>
cafalchio pushed a commit that referenced this pull request Feb 26, 2026
* chore: replace copier with cookiecutter for template scaffolding (#2361)

Copier pulled jinja2-ansible-filters (GPL-licensed). Cookiecutter is a
simpler, widely-adopted alternative with no problematic transitive deps.

- Migrate all 4 template sets (Go server, Python server, native plugin,
  external plugin) from copier YAML configs to cookiecutter.json with
  {{cookiecutter.*}} directory conventions
- Update mcpplugins CLI to use cookiecutter.main.cookiecutter() API,
  add --template_type flag to select native/external plugin templates
- Replace copier>=9.11.3 with cookiecutter>=2.6.0 in pyproject.toml
  and tox.ini
- Update scaffold shell scripts to invoke cookiecutter CLI
- Update tests, AGENTS.md, llms docs, and roadmap

Closes #2361

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter template dirs from pre-commit linting

Template files containing Jinja2 syntax ({{ cookiecutter.* }}, {% set %})
are invalid YAML/TOML/Python from linters' perspective. Add plugin_templates/
to the global exclude in both pre-commit configs and yamllint. Also restore
executable bit on run-server.sh and update uv.lock.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter templates from gosec and tomllint

Template go.mod and pyproject.toml contain Jinja2 variables that are
invalid from the perspective of Go tooling and TOML parsers. Skip
template directories in gosec, govulncheck, and tomllint find commands.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

* fix: exclude cookiecutter templates from tomllint CI workflow

The lint.yml workflow runs tomlcheck directly via find, not through the
Makefile target. Add the same template directory exclusions.

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>

---------

Signed-off-by: Mihai Criveti <crivetimihai@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CHORE]: Replace copier with cookiecutter for template scaffolding

1 participant