Getting Started
Install
Section titled “Install”The quickest way:
curl -fsSL https://raw.githubusercontent.com/raiderrobert/diecut/main/install.sh | shAuto-detects your OS and architecture. Set DIECUT_INSTALL_DIR to change the install location.
Build from source:
cargo install --path crates/diecut-cliOr grab a binary from GitHub Releases.
Your first project
Section titled “Your first project”Use the built-in rust-cli example template:
diecut new ./examples/rust-cli -o my-clidiecut reads the template config and prompts you for five variables:
Project name [my-cli]: my-cliShort description [A command-line application]:Author name: Jane DoeLicense [MIT]: MIT 1. MIT 2. Apache-2.0 3. MIT OR Apache-2.0Rust edition [2021]: 2021 1. 2021 2. 2024Press Enter to accept the defaults. Once done, you get a ready-to-build project:
my-cli/ Cargo.toml src/ main.rs .gitignore .diecut-answers.tomlThe generated Cargo.toml has your variables applied:
[package]name = "my-cli"version = "0.1.0"edition = "2021"description = "A command-line application"authors = ["Jane Doe"]license = "MIT"What just happened?
Section titled “What just happened?”diecut read the diecut.toml config, prompted you for variables, and rendered every .tera file through the Tera template engine. The .tera suffix was stripped from output filenames. Files without .tera were copied as-is. Your answers were saved to .diecut-answers.toml for future updates.
Next steps
Section titled “Next steps” Using Templates Pull templates from GitHub, override variables, update projects.
Creating Templates Build your own templates. It's easier than you think.