Commands
diecut new
Section titled “diecut new”Generate a new project from a template.
Synopsis
Section titled “Synopsis”diecut new <TEMPLATE> [OPTIONS]Options
Section titled “Options”| Option | Default | Description |
|---|---|---|
<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) |
--defaults | false | Use default values without prompting |
--overwrite | false | Overwrite output directory if it exists |
--no-hooks | false | Skip running hooks |
--dry-run | false | Show what would be generated without writing files |
-v, --verbose | false | Show file contents (with --dry-run) or detailed output |
Examples
Section titled “Examples”# From a multi-template repo (subpath)diecut new gh:raiderrobert/diecut-templates/rust-cli --output my-project
# From a local templatediecut new ./my-template --output my-project
# Use defaults without promptingdiecut new gh:user/repo --defaults --output my-project
# Override specific variablesdiecut new ./my-template -d project_name=foo -d license=MIT
# Preview what would be generateddiecut new ./my-template --dry-run --verbose- Git-hosted templates are cloned and cached locally on first use.
- The
--dataflag can be repeated to set multiple variables. - When
--defaultsis 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).
diecut list
Section titled “diecut list”List cached templates.
Synopsis
Section titled “Synopsis”diecut listOptions
Section titled “Options”None.
Examples
Section titled “Examples”diecut list- Templates are cached at
~/.cache/diecut/templates/. Override with theDIECUT_CACHE_DIRenvironment variable.