Skip to content

Commands

Generate a new project from a template.

Terminal window
diecut new <TEMPLATE> [OPTIONS]
ArgumentDescription
<TEMPLATE>Template source — local path, Git URL, or abbreviation (gh:, gl:, bb:, sr:)
OptionDescription
-o, --output <PATH>Output directory
-d, --data <KEY=VALUE>Override variable values (repeatable)
--defaultsUse default values without prompting
--overwriteOverwrite output directory if it exists
--no-hooksSkip running hooks
Terminal window
# Local template
diecut new ./my-template --output my-project
# GitHub shorthand
diecut new gh:user/template-repo --output my-project
# Skip prompts with defaults
diecut new gh:user/repo --defaults --output my-project
# Override specific variables
diecut new ./my-template -d project_name=foo -d license=MIT

Validate a template directory. Reports format detection, variable definitions, and any warnings or errors.

Terminal window
diecut check [PATH]

Exits with code 1 if errors are found.

Terminal window
diecut check ./my-template

Check if a template is ready for distribution. Validates template structure and provides distribution-specific warnings.

Terminal window
diecut ready [PATH]

Exits with code 1 if issues are found that would prevent distribution.


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.

Terminal window
diecut update <PATH> [OPTIONS]
OptionDescription
--ref <TAG>Update to a specific Git ref (tag, branch, or commit)
  1. Reads .diecut-answers.toml to find the original template source and variables
  2. Re-renders the template at the original ref (old snapshot)
  3. Re-renders at the new ref (new snapshot)
  4. Three-way merges against your actual files
  5. Reports files updated, added, removed, and any conflicts (saved as .rej files)

Convert a cookiecutter template to native diecut format.

Terminal window
diecut migrate <PATH> [OPTIONS]
OptionDescription
--output <DIR>Write to a new directory instead of migrating in-place
--dry-runShow what would change without writing
Terminal window
# Preview changes
diecut migrate ./cookiecutter-template --dry-run
# Migrate to a new directory
diecut migrate ./cookiecutter-template --output ./diecut-template

List all cached templates.

Terminal window
diecut list

Templates cloned from Git are cached at ~/.cache/diecut/templates/ (overridable via DIECUT_CACHE_DIR).