Commands
diecut new
Section titled “diecut new”Generate a new project from a template.
diecut new <TEMPLATE> [OPTIONS]Arguments
Section titled “Arguments”| Argument | Description |
|---|---|
<TEMPLATE> | Template source — local path, Git URL, or abbreviation (gh:, gl:, bb:, sr:) |
Options
Section titled “Options”| Option | Description |
|---|---|
-o, --output <PATH> | Output directory |
-d, --data <KEY=VALUE> | Override variable values (repeatable) |
--defaults | Use default values without prompting |
--overwrite | Overwrite output directory if it exists |
--no-hooks | Skip running hooks |
Examples
Section titled “Examples”# Local templatediecut new ./my-template --output my-project
# GitHub shorthanddiecut new gh:user/template-repo --output my-project
# Skip prompts with defaultsdiecut new gh:user/repo --defaults --output my-project
# Override specific variablesdiecut new ./my-template -d project_name=foo -d license=MITdiecut check
Section titled “diecut check”Validate a template directory. Reports format detection, variable definitions, and any warnings or errors.
diecut check [PATH]Exits with code 1 if errors are found.
Examples
Section titled “Examples”diecut check ./my-templatediecut ready
Section titled “diecut ready”Check if a template is ready for distribution. Validates template structure and provides distribution-specific warnings.
diecut ready [PATH]Exits with code 1 if issues are found that would prevent distribution.
diecut update
Section titled “diecut update”Update a previously generated project when the upstream template has changed. Reads .diecut-answers.toml from the project to recover original template choices, then performs a three-way merge.
diecut update <PATH> [OPTIONS]Options
Section titled “Options”| Option | Description |
|---|---|
--ref <TAG> | Update to a specific Git ref (tag, branch, or commit) |
How it works
Section titled “How it works”- Reads
.diecut-answers.tomlto find the original template source and variables - Re-renders the template at the original ref (old snapshot)
- Re-renders at the new ref (new snapshot)
- Three-way merges against your actual files
- Reports files updated, added, removed, and any conflicts (saved as
.rejfiles)
diecut migrate
Section titled “diecut migrate”Convert a cookiecutter template to native diecut format.
diecut migrate <PATH> [OPTIONS]Options
Section titled “Options”| Option | Description |
|---|---|
--output <DIR> | Write to a new directory instead of migrating in-place |
--dry-run | Show what would change without writing |
Examples
Section titled “Examples”# Preview changesdiecut migrate ./cookiecutter-template --dry-run
# Migrate to a new directorydiecut migrate ./cookiecutter-template --output ./diecut-templatediecut list
Section titled “diecut list”List all cached templates.
diecut listTemplates cloned from Git are cached at ~/.cache/diecut/templates/ (overridable via DIECUT_CACHE_DIR).