Registries

registry.toml

A registry is a directory that contains a registry.toml file and a templates/ subdirectory. Registries are registered with spin registry add <alias> <source>.

Layout

registry/
  registry.toml
  templates/
    go-cli.toml
    rust-api.toml

spin search and spin add <alias>/<id> read this directory. spin registry update refreshes git registries from upstream.

registry.toml

id = "official"
name = "Official Spin Templates"
description = "Curated templates maintained by the spin team."
homepage = "https://github.com/example/spin-registry"
maintainer = "Spin Team"
license = "MIT"

Fields

FieldRequiredDescription
idyesMachine identifier. Must match the alias used with spin registry add.
nameyesHuman-readable registry name.
descriptionnoShort summary shown in spin registry list.
homepagenoRegistry homepage or repository URL.
maintainernoMaintainer name or contact.
licensenoRegistry metadata license.

templates/*.toml

Each template in the registry gets one TOML file in templates/. The file basename (without .toml) must match the id field.

id = "go-cli"
name = "Go CLI"
description = "Minimal Go CLI with cobra and charmbracelet/log."
source = "https://github.com/example/go-cli-template.git"
tags = ["cli", "go", "charm"]
authors = ["Sam"]
license = "MIT"
homepage = "https://github.com/example/go-cli-template"
type = "cli"
language = "go"
version = "0.2.0"
updated_at = "2026-07-09"

Fields

FieldRequiredDescription
idyesShort template ID. Must match the file basename.
nameyesHuman-readable template name.
descriptionnoShown in search results.
sourceyesWhere the template lives. Can be a git URL, a local path, or another <alias>/<id> shorthand (one level of chaining allowed).
tagsnoSearch keywords.
authorsnoTemplate authors.
licensenoTemplate license.
homepagenoTemplate homepage.
typenocli, tui, lib, etc.
languagenoPrimary language.
versionnoTemplate version.
updated_atnoISO 8601 date.

Chaining

A template's source can point at another registry template using the same <alias>/<id> shorthand:

id = "go-cli-extended"
name = "Go CLI Extended"
source = "official/go-cli"

Only one level of chaining is followed. Cycles are rejected.

Validation

spin registry add refuses a source that does not contain both registry.toml and a templates/ directory. spin search skips individual template files that fail validation, but still indexes the rest of the registry.