Getting Started
Install
Section titled “Install”The quickest way:
curl -fsSL https://diecut.dev/install.sh | shAuto-detects your OS and architecture. Set DIECUT_INSTALL_DIR to change the install location.
Build from source:
cargo install --path .Or grab a binary from GitHub Releases.
Your first project
Section titled “Your first project”Use one of the starter templates:
diecut new gh:raiderrobert/diecut-templates/rust-cli -o my-clidiecut reads the template config and prompts you for variables:
Project name [my-cli]: my-cliAuthor name: Jane DoeLicense [MIT]: 1. MIT 2. Apache-2.0 3. MIT OR Apache-2.0Press Enter to accept the defaults. Once done, you get a ready-to-build project:
my-cli/ Cargo.toml src/ main.rs .gitignore README.md .diecut-answers.tomlThe generated Cargo.toml has your variables applied:
[package]name = "my-cli"version = "0.1.0"edition = "2021"authors = ["Jane Doe"]license = "MIT"What just happened?
Section titled “What just happened?”diecut cloned the template repo, navigated to the rust-cli subdirectory, read the diecut.toml config, prompted you for variables, and rendered every .die file through the Tera template engine. The .die suffix was stripped from output filenames. Files without .die were copied as-is. Your answers were saved to .diecut-answers.toml.
Next steps
Section titled “Next steps” Using Templates Pull templates from GitHub, override variables, manage the cache.
Creating Templates Build your own templates. It's easier than you think.