Getting started
1. Install spin
curl -sSfL https://spincli.pages.dev/install.sh | sh
or with Go
go install github.com/sam0uly/spin@latest
Make sure git is on your $PATH. spin uses it to clone git URLs and registries.
2. Scaffold from a git URL
spin new myapp https://github.com/example/go-cli-template.git
spin clones the template, opens an interactive two-step form, renders the project into ./myapp, and runs any [[post]] steps.
Step 1: params. An interactive form asks for the template's params (project name, license, features, etc.). Use arrow keys to navigate, enter to confirm.
Step 2: hooks review. A scrollable list shows every [[pre]] and [[post]] hook the template will run. Press R to open a Run / Skip / Cancel modal — you review BEFORE any shell commands execute. No blind scripts.

3. Or scaffold from a local template
spin new myapp --template ~/code/templates/go-cli
Local paths are read directly; no clone happens.
4. Pin a template for offline use
spin add https://github.com/example/go-cli-template.git
spin new myapp --template go-cli-template
spin add clones the template into ~/.config/spin/templates/ and records it in pinned.json. After that, spin new can use the short name without network access.

5. Preview before you write
spin new myapp --template go-cli --print-hooks
spin new myapp --template go-cli --print-params
spin new myapp --template go-cli --dry-run
--print-params shows the resolved params as JSON. --dry-run renders to a temp directory and lists the files that would be written.
6. Build your own template
Ready to create a template? Follow the step-by-step tutorial: