Guide
Pin and manage templates
Pin a template locally so spin new can use it by short name and work offline.
Pin a template
spin add https://github.com/example/go-cli-template.git
spin add clones the template into ~/.config/spin/templates/ and records it in ~/.config/spin/pinned.json. The pin name is the repo basename.

You can also pin local paths and registry shorthand:
spin add ~/code/templates/go-cli
spin add official/go-cli
List pinned templates
spin list
Use --json for machine-readable output and --all to include soft-deleted pins.
Update a pinned template
Refresh the on-disk cache from the upstream source:
spin update go-cli-template
Omit the name to refresh every pinned template. spin update snapshots the old cache before refreshing and rolls back on failure.
Remove a pin
spin remove go-cli-template
This soft-deletes the pin: it disappears from spin list and spin new, but the cache stays on disk. To delete the cache too:
spin remove go-cli-template --purge
You can purge a soft-deleted pin later:
spin remove go-cli-template --purge
Storage layout
~/.config/spin/
pinned.json # pin records
templates/ # cached template clones
go-cli-template/