Skip to content

Repository files navigation

Spin

Go Version Go Report Card Go Reference License Release

A project scaffolding CLI for any language, framework, or stack, enabling developers to bootstrap fully configured projects from reusable templates sourced from GitHub, local directories, or template registries.

spin new myapp https://github.com/user/spin-template.git

Install

go install github.com/N1xev/spin@latest
curl -sSfL https://spincli.pages.dev/install.sh | sh

Single static binary. Needs git on $PATH.

Commands

Command Description
spin new [name] [template] Scaffold a project from a template
spin add [spec] Pin a template locally for offline use
spin list Show pinned templates
spin update [name] Refresh a pin's cache
spin remove [name] Remove a pin (--purge deletes cache)
spin search [query] Search registered registries
spin registry add [name] [url] Register a registry
spin registry list Show registries
spin init [name] Scaffold a new template directory

Template Specs

./templates/go-cli              local path
https://github.com/me/repo.git  git URL
go-cli-template                 pinned name
official/go-cli                 registry shorthand

Template Anatomy

my-template/
  spin.toml      params, hooks, include/exclude rules
  _base/         directory tree rendered into the project
  _pre/          scripts run before rendering
  _post/         scripts run after rendering

License

Spin is licensed under Apache 2.0