spin

command module
v0.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

README

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/sam0uly/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

Documentation

Overview

Command spin is a language-agnostic scaffolder for external templates. `spin new <name> [<template>]` scaffolds a project from any git repo, local path, or pinned template that has a spin.toml + _base/ tree. No built-in templates.

Directories

Path Synopsis
Package cmd wires the spin cobra command tree.
Package cmd wires the spin cobra command tree.
internal
log
Package log provides a project-level charmbracelet/log logger for spin.
Package log provides a project-level charmbracelet/log logger for spin.
params
Package params defines the typed parameter spec for spin.toml.
Package params defines the typed parameter spec for spin.toml.
registry
Package registry is the CLI-side client for the public template registry: search, add (pin locally), list, remove, and refresh.
Package registry is the CLI-side client for the public template registry: search, add (pin locally), list, remove, and refresh.
spec
Package spec classifies template source specs.
Package spec classifies template source specs.
template
Package template handles external templates: detect (spin.toml + _base/), load (clone or read pin), and render via text/template.
Package template handles external templates: detect (spin.toml + _base/), load (clone or read pin), and render via text/template.
version
Package version exposes the spin version string.
Package version exposes the spin version string.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL