monoceros create-template
Turns a workbench that works into a template, so the next one starts from the
same setup. The template lands next to your other workbench templates, and
monoceros init starts
from it.
monoceros create-template <name> <template> [--description "…"]<name> is the workbench (acme below is a sample workbench name). <template>
is the name of the new template.
| Flag | Content |
|---|---|
--description |
What the template is for, in quotes (--description "Node with Postgres."), or the shell passes only its first word. Written under the comment at the top, where list-components --json reads it from. |
Example
Section titled “Example”You set up the workbench acme for a project: Node, Postgres, RabbitMQ and
Claude Code, each configured the way your team works. The next project needs
the same, and you don’t want to piece it together from init flags again.
Make acme a template called standard:
monoceros create-template acme standard --description "Node with Postgres and RabbitMQ, plus Claude Code."✔ Wrote template 'standard': ~/.monoceros/templates/workbenches/standard.ymlℹ Start a workbench from it: monoceros init <name> --template=standardℹ In a team repository, commit it there.acme itself is unchanged. The next project, shop say, starts from the
template and gets the same setup under its own name:
monoceros init shop --template=standardinit asks for the credentials the setup needs, because the values in
acme.env stay with acme. If ~/.monoceros/templates is your team’s
repository, commit standard.yml, and your colleagues can start from it after
their next pull.
Behavior
Section titled “Behavior”- Replaces the workbench name and the runtime. Wherever the name stands as
a word, in
name:and in the comments, it becomes__MONOCEROS_NAME__. The pinnedruntimeVersionbecomes__MONOCEROS_RUNTIME_VERSION__. Other values stay as they are, so a repository URL that happens to contain the name is never touched. - Copies the yml only. The values in
acme.envstay behind. The template keeps the${VAR}references, andinit --templateasks for the values. - Replaces a carried-over description. A workbench made from a template
still has that template’s description;
--descriptionreplaces it. - Never overwrites a template. If one of that name exists, the command stops and writes nothing.
See also
Section titled “See also”- Reuse and share your setup - the whole story, from the first setup to the team’s shared repository.
monoceros init- starts a workbench from a template.- Workbench template - every field of the file.