This repository contains different templates which are used by the Conductor CLI and other tools.
The templates are written in Mustache.
The CLI template repository is configurable, so you can fork this repo and create your own templates.
Template discovery is done via the manifest (manifest.json file) and the project descriptor file bp.json (bp as in "boilerplate" :)).
The manifest file defines the available templates organized by language and framework. It serves as the catalog that tools use to discover and present available templates to users.
Structure:
{
"languages": [
{
"name": "Language Name",
"frameworks": [
{
"name": "Framework Name",
"templates": [
{
"name": "template-name",
"description": "Template description",
"path": "path/to/template"
}
]
}
]
}
]
}Fields:
languages: Array of supported programming languagesname: Display name of the language (e.g., "Go", "Java", "Python", "Javascript")frameworks: Array of frameworks for this languagename: Framework name (e.g., "core", "spring")templates: Array of available templatesname: Template identifier (e.g., "basic-worker")description: Human-readable description of what the template providespath: Relative path to the template directory from the repository root
Each template directory contains a bp.json file that defines the template's structure and required variables. This file tells the CLI which files to process and what information to collect from the user.
Structure:
{
"files": [
{
"name": "filename.ext",
"fields": [
{
"name": "variable_name",
"prompt": "Question to ask the user:"
}
],
"mode": "0755"
}
]
}Fields:
files: Array of files in the templatename: Filename (can include subdirectories, e.g., "src/main/App.java")fields: (Optional) Array of variables used in this filename: Variable name (used in Mustache template as{{variable_name}})prompt: The question to ask the user when collecting this value
mode: (Optional) Unix file permissions in octal format (e.g., "0755" for executable files)
Note: Files without a fields array are copied as-is without any variable substitution.
Templates use Mustache syntax for variable substitution. Variables are defined in the bp.json file and replaced during template instantiation.
Syntax: {{variable_name}}
Example:
const taskName = "{{taskname}}";
const apiKey = "{{auth_key}}";When the user instantiates this template and provides values:
taskname= "my_task"auth_key= "abc123"
The result will be:
const taskName = "my_task";
const apiKey = "abc123";The templates in this repository commonly use these variables:
appname: Application or project nametaskname: Task definition name for Conductor workersserver_url: Conductor server URLauth_key: Authentication key IDauth_secret: Authentication secret
- Fork this repository
- Create a new template directory following the structure:
language/type/framework/ - Add your template files with Mustache variables where needed
- Create a
bp.jsonfile describing your template's files and variables - Update
manifest.jsonto include your new template - Configure your CLI to point to your forked repository
python/worker/core/
├── bp.json # Template descriptor
├── main.py # File with {{server_url}}, {{auth_key}}, etc.
├── worker.py # File with {{taskname}}
├── requirements.txt # Static file (no variables)
└── README.md # Static file (no variables)