copier
updatable project template tool
TLDR
Create project from template
SYNOPSIS
copier command [options] [arguments]
DESCRIPTION
copier is a project templating tool similar to cookiecutter but with a crucial distinction: it can update existing projects when the template evolves. This makes it ideal for maintaining multiple projects based on a shared template, as you can propagate improvements and bug fixes from the template to all derived projects.
The tool uses Jinja2 templating and supports both Git repository URLs and local paths as template sources. Templates are versioned using Git tags, allowing projects to track which template version they were created from and update to newer versions while preserving local customizations.
copier stores metadata about template answers in the generated project, enabling the update command to intelligently merge template changes with your modifications. This addresses a major limitation of traditional project generators where improvements to the template couldn't be applied to existing projects. The tool requires Python 3.10+ and is particularly popular in Python and web development communities.
PARAMETERS
--data key=value
Answer questions non-interactively--vcs-ref ref
Git reference (tag/branch)--trust
Trust template (run tasks)--pretend
Preview without creating files--skip path
Skip specific paths--force
Overwrite without prompting-a, --answers-file file
Load answers from file
COMMANDS
copy template destination
Create new project from templateupdate
Update project from templaterecopy
Regenerate with new answers
TEMPLATE STRUCTURE
Files ending in .jinja are rendered. Others are copied as-is.
├── copier.yml # Config & questions
├── {{project_name}}/ # Dynamic directory
└── README.md.jinja # Templated file
CAVEATS
Requires Python 3.10+ and Git 2.27+. Templates versioned by Git tags. Use --trust for templates with tasks.
SEE ALSO
cookiecutter(1), yeoman(1)
