Skip to content

CLI Flags

Terminal window
boilerplate [options]
FlagDescription
--template-url URLPath to the template directory. Can be a local path or a remote go-getter URL
--output-folder PATHDirectory where rendered files will be written
FlagDescription
--var NAME=VALUESet a variable value. Can be specified multiple times. Supports YAML syntax for complex types
--var-file PATHLoad variables from a YAML file. Can be specified multiple times
Terminal window
# 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'
FlagDefaultDescription
--non-interactivefalseDon’t prompt for input. All variables must be provided via flags or files
--missing-key-actionerrorHow to handle undefined template variables: error, zero, or invalid
--missing-config-actionexitHow to handle missing boilerplate.yml: exit or ignore
--disable-dependency-promptfalseSkip confirmation prompts for dependencies (keeps variable prompts)
--no-hooksfalseDon’t execute any hooks
--no-shellfalseDon’t execute shell helpers (returns "replace-me" instead)
FlagDescription
--versionPrint the version number
--helpPrint help text
Terminal window
boilerplate \
--template-url ~/templates/go-service \
--output-folder ~/projects/my-service
Terminal window
boilerplate \
--template-url ~/templates/go-service \
--output-folder ~/projects/my-service \
--non-interactive \
--var-file vars.yml
Terminal window
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"
Terminal window
boilerplate \
--template-url ./partial-template \
--output-folder ./output \
--missing-key-action zero \
--missing-config-action ignore