spin

command module
v0.0.2-alpha Latest Latest
Warning

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

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

README

spin

Scaffolder that doesn't care what language or framework you use. Point it at a template directory with a spin.toml and a _base/ tree, it asks the template's questions, renders the files, runs the hooks. Done.

spin new myapp https://github.com/spin-templates/charm-tui.git

spin logo

Install

go install github.com/N1xev/spin@latest

# or

curl -sSfL https://spincli.pages.dev/install.sh | sh

Needs git on $PATH. Single static binary, nothing else.

Use

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

spin add https://github.com/me/repo.git             # pin for offline
spin list                                           # show pins
spin update go-cli-template                         # refresh cache
spin remove go-cli-template                         # unpin
spin search tui                                     # search registries
spin registry add official https://...              # register a registry
spin init my-tpl                                    # create a template

Non-interactive:

spin new myapp go-cli --param port=8080 --param name=myapp
spin new myapp go-cli --print-params                # show params, no write
spin new myapp go-cli --dry-run                     # show files, no write
spin new myapp go-cli --no-hooks                    # skip hooks

Template

my-template/
  spin.toml                                         # params, hooks, include rules
  _base/                                            # file tree → project

spin init my-template writes a starter. Full docs: https://spincli.pages.dev

License

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