Spawn Point

A fast, flexible command-line tool for generating project scaffolds from templates.

Spawn Point is a command-line tool, written in Rust, that creates new projects from templates. You pick a template, answer a few prompts and it writes out a project with your names and settings filled in. The crate is spawn_point and the binary it installs is spawnpoint.

Templates tend to rot as dependencies and practices move on. You often only find out a template is broken after generating from it. Spawn Point builds the check into the tool. spawnpoint validate <lang> <template> generates the template into a temporary directory using test variables from its manifest, then runs the install, build, lint and test steps the template defines. A failing step means the template is broken, which you learn before anyone uses it.

Templates stay valid projects in their own right. Instead of {{variable}} markers that break the source, a template uses ordinary placeholder values such as __MY_VAR_PLACEHOLDER__. Its scaffold.yaml manifest maps each one to a variable. From one input Spawn Point can derive other casings (PascalCase, kebab-case and so on), rename files and directories, include or leave out paths based on boolean variables and run preGenerate and postGenerate hooks for things like git init.

spawnpoint list shows the available templates and spawnpoint generate walks you through choosing one. For scripts, --var name=value supplies a variable and --no-input never prompts; an unknown variable name is an error. Supplied values are checked against the template's validation regex like typed ones.

cargo install spawn_point
spawnpoint generate -l rust -t "Rust CLI App v1" -o ./my-cli
spawnpoint validate rust "Rust CLI App v1"

The project is under active development, so expect rough edges and changes. Licensed under MPL-2.0. Source at https://github.com/normano/spawnpoint.