Skip to content

infi/BrandNew

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BrandNew

A CLI tool for scaffolding projects from local templates.

Usage

brandnew <template> <path>
Argument Description
template Name of the template to scaffold
path Destination path to scaffold into
-v Print verbose output

Example

brandnew swift-cli my-new-tool

Templates

Templates live in ~/.brandnew/<template-name>/ and must contain a brandnew.toml manifest.

Manifest (brandnew.toml)

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.

Installation

Build from source with Swift 6.3+:

swift build -c release
cp .build/release/brandnew /usr/local/bin/brandnew

Requirements

  • Swift 6.3+
  • Linux or macOS

About

A CLI tool for scaffolding projects from local templates.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages