CLI Examples

Surveying Variants

List available template variants from an answers directory:

copiertv survey

This reads the answers directory from your configuration and prints variant names to stdout.

Validating Variants

Validate a single variant:

copiertv validate default

Validate and preserve the generated project for inspection:

copiertv validate --preserve default

Configuration

Create .auxiliary/configuration/copiertv/general.toml in your template repository:

[answers]
directory = "data/copier"

[[commands]]
args = ["hatch", "env", "prune"]

[[commands]]
args = ["hatch", "--env", "develop", "run", "make-all"]

[options]
preserve = false
unsafe = false

Use placeholders in command arguments and working directories:

[[commands]]
args = ["make", "check", "--source", "{project_directory}"]
cwd = "{template_directory}"

Available placeholders: {template_directory}, {project_directory}, {temporary_directory}, {variant}.