The canonical template library does not live in this repository for modern development.
library/ directory is legacy/backward-compatibility content for versions older than 0.2.0.0.2.0+, active template work belongs in the separate GitHub repository boilerplates-library.When answering questions about supported kinds or current template behavior, prefer code under cli/modules/ and runtime logic under cli/core/ over legacy library/ content.
LibraryManager loads configured libraries and discovers templates by kind.
Responsibilities:
template.jsonGit libraries are stored under:
~/.config/boilerplates/libraries/{name}/
Git-based libraries use sparse checkout to avoid cloning unrelated repository content where possible.
Git libraries require:
nametype: giturlbranchdirectoryStatic libraries require:
nametype: staticpathStatic library paths may be absolute or relative to the config file location. Some config entries may include backward-compatible dummy url, branch, and directory fields.
Library priority is determined by config order. Earlier entries have higher priority.
Duplicate behavior:
alloy.default or alloy.localExample:
boilerplates compose show alloy
boilerplates compose show alloy.local
User config is stored at:
~/.config/boilerplates/config.yaml
Example library config:
libraries:
- name: default
type: git
url: https://github.com/user/templates.git
branch: main
directory: library
- name: local
type: static
path: ~/my-templates
url: ''
branch: main
directory: .
Common library commands:
boilerplates repo list
boilerplates repo update
boilerplates repo add local --type static --path ~/my-templates
boilerplates repo remove local
Use DisplayManager for all output in repository/config code. Do not print directly.