A CLI tool for scaffolding projects from local templates.
brandnew <template> <path>
| Argument | Description |
|---|---|
template |
Name of the template to scaffold |
path |
Destination path to scaffold into |
-v |
Print verbose output |
brandnew swift-cli my-new-toolTemplates live in ~/.brandnew/<template-name>/ and must contain a brandnew.toml manifest.
name = "swift-cli"
manifest_version = "1"
[[questions]]
prompt = "Package name"
variable = "{{PACKAGE_NAME}}"
[[questions]]
prompt = "Author"
variable = "{{AUTHOR}}"| Field | Description |
|---|---|
name |
Template name |
manifest_version |
Manifest format version |
questions |
Optional list of prompts whose answers replace variables in template files |
During scaffolding, brandnew walks every file in the template directory, substitutes variable placeholders with the answers you provided, and copies the result to the destination path. The brandnew.toml file itself is not copied.
Build from source with Swift 6.3+:
swift build -c release
cp .build/release/brandnew /usr/local/bin/brandnew- Swift 6.3+
- Linux or macOS