Skip to content

Commands

Generate a new project from a template.

Terminal window
diecut new <TEMPLATE> [OPTIONS]
OptionDefaultDescription
<TEMPLATE>Template source: local path, gh:user/repo, gl:user/repo, cb:user/repo, any Git URL, or abbreviation with subpath (gh:user/repo/subdir)
-o, --output <PATH>Output directory
-d, --data <KEY=VALUE>Override variable values (repeatable)
--defaultsfalseUse default values without prompting
--overwritefalseOverwrite output directory if it exists
--no-hooksfalseSkip running hooks
--dry-runfalseShow what would be generated without writing files
-v, --verbosefalseShow file contents (with --dry-run) or detailed output
Terminal window
# From a multi-template repo (subpath)
diecut new gh:raiderrobert/diecut-templates/rust-cli --output my-project
# From a local template
diecut new ./my-template --output my-project
# Use defaults without prompting
diecut new gh:user/repo --defaults --output my-project
# Override specific variables
diecut new ./my-template -d project_name=foo -d license=MIT
# Preview what would be generated
diecut new ./my-template --dry-run --verbose
  • Git-hosted templates are cloned and cached locally on first use.
  • The --data flag can be repeated to set multiple variables.
  • When --defaults is set, any variable without a default value causes an error.
  • Subpaths let you point to a template inside a larger repo (e.g., gh:user/templates/python-pkg).

List cached templates.

Terminal window
diecut list

None.

Terminal window
diecut list
  • Templates are cached at ~/.cache/diecut/templates/. Override with the DIECUT_CACHE_DIR environment variable.