A command-line utility that creates projects from templates.
DKCutter makes it easy to create projects through templates.
DKCutter takes a template provided as a directory structure with template-files. Templates can be located on the file system, such as on a VCS (Git) server like GitHub.
It reads a settings file and interactively prompts the user whether or not to change the settings.
It then takes both and generates an output directory structure from them.
Additionally, the model can provide code (Javascript, Typescript) to be executed before and after generation (pre-generation and post-generation hooks).
This is a directory structure for a simple dkcutter:
You must have:
dkcutter.json
filetemplate/{{dkcutter.projectSlug}}/
directory, where projectSlug
is defined in your dkcutter.json
.Beyond that, you can have whatever files/directories you want.
This is what will be generated locally, in your current directory:
The recommended way to use DKCutter as a command line utility is to execute it with pnpm dlx
, npx
, yarn dlx
or bunx
.
dkcutter.json
prompts.dkcutter.json
.This project is licensed under the MIT License - see the LICENSE file for details