Registries
Registry anatomy
A registry is a collection of templates that spin search can read. It is a directory with registry.toml and a templates/ directory.
Directory layout
my-registry/
registry.toml
templates/
go-cli.toml
go-api.toml
rust-cli.toml
registry.toml
id = "official"
name = "Official spin templates"
description = "Curated templates maintained by the spin team"
homepage = "https://github.com/example/spin-registry"
maintainer = "Example Team"
license = "MIT"
Only id and name are required.
templates/*.toml
Each file describes one template:
id = "go-cli"
name = "Go CLI"
description = "Minimal Go CLI starter"
source = "https://github.com/example/go-cli-template.git"
tags = ["go", "cli"]
authors = ["Example Team"]
license = "MIT"
type = "cli"
language = "go"
version = "0.1.0"
updated_at = "2026-01-01"
The id field must match the file basename (without .toml). source is the git URL or local path spin uses to scaffold the template.
Source chaining
A template's source can be another <alias>/<id> shorthand. spin follows at most one redirect, so a chain like official/go-cli → upstream/go-cli → final git URL or local path is allowed:
id = "go-cli"
name = "Go CLI"
source = "upstream/go-cli"
Chains longer than two shorthand hops, including cycles, are rejected.
Register the registry
spin registry add official https://github.com/example/spin-registry.git
Then search it:
spin search go