Scaffold is the premier project bootstrapping tool for the Yum ecosystem. It provides a robust, template-based generation engine that eliminates boilerplate and ensures consistency across all your projects. Whether you're building a simple CLI tool, a complex web application, or an autonomous agent plugin, Scaffold gets you from zero to code in seconds.
Scaffold is built in Rust. You can install it directly from the source code:
git clone https://github.com/yum-labs/yumlabs-tools.git
cd yumlabs-tools/scaffold
cargo install --path .
Pre-built binaries are available for major platforms on the Releases page.
Scaffold operates in two primary modes: Interactive Wizard for discovery and ease of use, and CLI Mode for automation and power users.
The easiest way to start is to simply calculate the command without arguments. This launches the TUI wizard which guides you through template selection and configuration.
scaffold
What happens next?
npm install or git init).For integration into scripts or pipelines, you can bypass the wizard using specific subcommands and flags.
# List available templates
scaffold list
# Run the forge scaffolding tool specifically
scaffold forge --default --output ./my-agent-plugin
At its heart, Scaffold uses Handlebars for powerful logic-less templating. This allows templates to be flexible and dynamic without being overly complex.
{{project_name}}/src/main.rs).Scaffold isn't limited to a single source. It seamlessly handles:
CodingInCarhartts/yum-scaffold-templates).--templates-dir for developing your own templates locally or working offline.Templates aren't just files; they are workflows. Scaffold supports executing system commands after file generation.
npm install, cargo build, etc.The wizard dynamically builds its UI based on the template.toml definition.
template.toml StructureEvery template must have a template.toml manifest at its root. This defines the metadata, variables, and generation rules.
[metadata]
name = "vite-ts-bun"
description = "Vite + TypeScript + Bun starter"
version = "1.0.0"
tags = ["vite", "typescript", "bun"]
[variables.project_name]
prompt = "Project name"
type = "string"
default = "my-app"
required = true
[variables.use_tailwind]
prompt = "Use Tailwind CSS?"
type = "boolean"
default = true
[[files]]
source = "files/package.json.hbs"
destination = "{{project_name}}/package.json"
[[files]]
source = "files/tailwind.config.js.hbs"
destination = "{{project_name}}/tailwind.config.js"
condition = "use_tailwind"
[[hooks]]
command = "bun"
args = ["install"]
working_dir = "{{project_name}}"
description = "Installing dependencies"
| Field | Type | Description |
|---|---|---|
name | String | Unique identifier for the template. |
description | String | Human-readable summary shown in the list. |
version | String | Semver version string. |
tags | Array | Keywords for categorization. |
author | String | (Optional) Creator of the template. |
Variables are defined under [variables.<name>].
| Field | Type | Description |
|---|---|---|
prompt | String | The question asked to the user. |
type | Enum | string, boolean, array, select. |
default | Any | Default value if the user just hits enter. |
required | Bool | If true, user cannot leave empty. |
options | Array | (For select type) Valid choices. |
Defined as a list of [[files]].
| Field | Type | Description |
|---|---|---|
source | Path | Relative path to the .hbs file in the template files/ dir. |
destination | Path | Where the file should be created. Supports variables. |
condition | String | (Optional) Variable name that must be truthy to include this file. |
Scaffold can be configured globally via a config.toml file.
File Locations (in priority order):
./scaffold.toml$XDG_CONFIG_HOME/scaffold/config.toml (Linux/macOS)~/.config/scaffold/config.toml (Linux/macOS)%APPDATA%\scaffold\config.toml (Windows)[defaults]
# Default base directory for new projects
project_directory = "~/Projects"
# Preferred package manager (bun, npm, yarn, pnpm, cargo)
package_manager = "bun"
[repositories]
# Primary registry URL
primary = "https://github.com/CodingInCarhartts/yum-scaffold-templates"
# Additional custom registries (future support)
custom = []
!NOTE If no configuration file is found, Scaffold uses internal defaults:
bunas the package manager and the official defined primary repository.
Scaffold executes code! Specifically:
repositories.primary URL.[[hooks]] section.
!IMPORTANT Always review the
template.tomlof a third-party template before running it. Scaffold will print a description of the hook before running it, but it does execute automatically.
scaffold (Default)Starts the interactive wizard.
Simulated Output:
π Scaffold-CLI v0.1.0
π Step 1/3: Select Template
βββββββββββββββββββββββββ
βΆ 1. vite-ts-bun - Vite + TypeScript + Bun starter
2. rust-cli - Rust CLI tool with Clap and Tokio
3. python-api - FastAPI + UV starter
Enter selection (1-3): 1
βοΈ Step 2/3: Configure Variables
ββββββββββββββββββββββββββββ
Project name [my-app]: demo-project
Use Tailwind CSS? (yes/no) [yes]: yes
Project description: A demo project
π Step 3/3: Target Directory
βββββββββββββββββββββββββββ
Directory [./demo-project]:
π¦ Generating project...
β
Created 7 files at ./demo-project
π§ Running post-generation hooks...
β³ Installing dependencies
β
Installing dependencies
β³ Initializing git repository
β
Initializing git repository
π Project created successfully at: ./demo-project
Next steps:
cd ./demo-project
bun dev
scaffold listLists all available templates from the active fetcher.
Example:
scaffold list
Output:
π Available templates:
vite-ts-bun - Vite + TypeScript + Bun starter
Tags: vite, typescript, bun
rust-cli - Rust CLI tool with Clap and Tokio
Tags: rust, cli
Use: scaffold (to start wizard)
scaffold clear-cacheForces the removal of all locally cached GitHub templates. Useful if you want to ensure you pull the absolute latest version on the next run.
scaffold forgeSpecialized scaffolder for the Autonomous Coding agent integration.
Flags:
-d, --default: Use the default built-in app spec.-s, --spec <FILE>: Path to a custom app specifiction JSON/TOML.-i, --interactive: Launch the TUI to interactively build the spec.-o, --output <DIR>: Specify output directory.--dry-run: Show what would happen without writing files.Example:
scaffold forge --default --output ./plugins/my-new-plugin