Copier

Open-source CLI tool and library for generating projects from templates with dynamic value replacement and update support. 120 chars max check: counting... 'Open-source CLI tool and library for generating projects from templates with dynamic value replacement and update support.' = 117 chars. Good.

What it is

Copier is a command-line application and Python library that renders project templates into working codebases. It accepts local directory paths or Git repository URLs as template sources and processes any text file using Jinja templating to replace values dynamically. The tool ensures generated output remains clean and avoids overwriting existing files unless explicitly instructed.

Templates define questionnaires through a configuration file that collects user input such as project names, module names, or other parameters. These answers drive the generation process and are stored for future updates. When a template evolves, users can re-run Copier to incorporate upstream changes into their existing projects, enabling long-term code lifecycle management.

The primary audiences are template creators who want to automate repetitive scaffolding and template consumers who need to start new projects quickly or keep them current. Copier supports both simple templates for rapid prototyping and complex templates that handle sophisticated generation logic, offering a smooth learning curve.

Getting started requires Python 3.10 or newer and Git 2.27 or newer. Installation is available via pipx, uv, pip, conda, or Homebrew. Public templates can be discovered on GitHub using the copier-template topic, and creators can tag their own templates for visibility. The project is open source and community-maintained with extensive documentation hosted on ReadTheDocs.

This description was generated by AI from the site's public content and may contain errors.

What you can do there

  • Generate new projects from local or remote templates
  • Update existing projects when templates change
  • Create custom templates with dynamic questionnaires
  • Browse community templates via GitHub topics
  • Use as a CLI tool or import as a Python library

Who it's for

Developers and teams automating project scaffolding and lifecycle management

Frequently asked questions about copier.readthedocs.io

›What is Copier used for?

Copier generates projects from templates by replacing values in text files using Jinja syntax. It works with local paths or Git URLs and supports updating projects when templates change.

›How do I install Copier?

Install via pipx install copier, uv tool install copier, pip install copier, conda install -c conda-forge copier, or brew install copier on macOS and Linux.

›Can Copier update an existing project?

Yes, Copier can update projects when the source template evolves, preserving user changes where possible and reapplying template updates intelligently.

›What template formats does Copier support?

Copier uses Jinja templating inside any text file. Templates are configured with a copier.yml file that defines questions and variables for dynamic generation.

›Where can I find public Copier templates?

Public templates are listed on GitHub under the copier-template topic. Adding this topic to a template repository makes it discoverable.

›Is Copier free to use?

Yes, Copier is open-source software released under a permissive license and free for personal and commercial use.

›Does Copier work with private Git repositories?

Copier can clone from any Git URL, including private repositories, provided the environment has appropriate authentication configured.