CLI Flags
boilerplate [options]Required Flags
Section titled “Required Flags”| Flag | Description |
|---|---|
--template-url URL | Path to the template directory. Can be a local path or a remote go-getter URL |
--output-folder PATH | Directory where rendered files will be written |
Variable Input
Section titled “Variable Input”| Flag | Description |
|---|---|
--var NAME=VALUE | Set a variable value. Can be specified multiple times. Supports YAML syntax for complex types |
--var-file PATH | Load variables from a YAML file. Can be specified multiple times |
Complex variable syntax
Section titled “Complex variable syntax”# String--var 'Name=Hello World'
# List (YAML syntax)--var 'Tags=["web", "api", "v2"]'
# Map (YAML syntax)--var 'Config={host: "localhost", port: "8080"}'
# Bool--var 'EnableDocker=true'
# Dependency-specific variable--var 'my-dependency.Port=9090'Behavior Flags
Section titled “Behavior Flags”| Flag | Default | Description |
|---|---|---|
--non-interactive | false | Don’t prompt for input. All variables must be provided via flags or files |
--missing-key-action | error | How to handle undefined template variables: error, zero, or invalid |
--missing-config-action | exit | How to handle missing boilerplate.yml: exit or ignore |
--disable-dependency-prompt | false | Skip confirmation prompts for dependencies (keeps variable prompts) |
--no-hooks | false | Don’t execute any hooks |
--no-shell | false | Don’t execute shell helpers (returns "replace-me" instead) |
--parallelism | Number of CPUs | Maximum number of concurrent parallel operations Boilerplate will perform. Use --parallelism=1 to disable concurrency |
Manifest Flags
Section titled “Manifest Flags”| Flag | Default | Description |
|---|---|---|
--manifest | false | Write a manifest of all generated files (with SHA256 checksums) to the output directory as boilerplate-manifest.yaml |
--manifest-file PATH | Write the manifest to a custom path. Implies --manifest. Format is auto-detected from extension (.yaml/.yml for YAML, otherwise JSON) |
See Manifest for details on the manifest schema and usage.
Info Flags
Section titled “Info Flags”| Flag | Description |
|---|---|
--version | Print the version number |
--help | Print help text |
Examples
Section titled “Examples”Basic interactive usage
Section titled “Basic interactive usage”boilerplate \ --template-url ~/templates/go-service \ --output-folder ~/projects/my-serviceNon-interactive with variable file
Section titled “Non-interactive with variable file”boilerplate \ --template-url ~/templates/go-service \ --output-folder ~/projects/my-service \ --non-interactive \ --var-file vars.ymlRemote template from Git
Section titled “Remote template from Git”boilerplate \ --template-url "git@github.com:myorg/templates.git//go-service?ref=v1.2.0" \ --output-folder ~/projects/my-service \ --non-interactive \ --var ProjectName="my-service"Generate with a manifest
Section titled “Generate with a manifest”# Default YAML manifest in the output folderboilerplate \ --template-url ~/templates/go-service \ --output-folder ~/projects/my-service \ --non-interactive \ --manifest
# Custom YAML manifest pathboilerplate \ --template-url ~/templates/go-service \ --output-folder ~/projects/my-service \ --non-interactive \ --manifest-file ~/projects/my-service/manifest.yamlLenient mode for partial templates
Section titled “Lenient mode for partial templates”boilerplate \ --template-url ./partial-template \ --output-folder ./output \ --missing-key-action zero \ --missing-config-action ignore