Aucune description

ChristianLempa 9b47551b7b feat(generate): support named output paths il y a 3 jours
.assets 6edd149ccb release(v0.2.0): prepare template runtime rollout il y a 2 semaines
.github ef011e9319 fix(release): repair asset alias workflow il y a 1 semaine
.wiki f64137a60f wiki updates and file cleanup il y a 2 semaines
cli 9b47551b7b feat(generate): support named output paths il y a 3 jours
library 6edd149ccb release(v0.2.0): prepare template runtime rollout il y a 2 semaines
scripts 8b11094920 fix(install): support stdin execution il y a 2 semaines
tests 9b47551b7b feat(generate): support named output paths il y a 3 jours
.gitignore 7cf643d078 testing units il y a 4 mois
AGENTS.md 8b73479d9b release(v0.2.0-2): ship follow-up fixes il y a 1 semaine
CHANGELOG.md 8b73479d9b release(v0.2.0-2): ship follow-up fixes il y a 1 semaine
LICENSE 7e7cbc3d4a Initial commit il y a 4 ans
README.md f64137a60f wiki updates and file cleanup il y a 2 semaines
SECURITY.md 52a4363e45 fixed typo il y a 2 ans
flake.lock a4f53cf9aa feat: add flake for nix install (#1405) il y a 6 mois
flake.nix c6feed2f1e fix(nix): add email-validator dependency to flake (#1573) il y a 4 mois
pyproject.toml 355bc9b268 chore(release): bump version to 0.2.1 il y a 3 jours
renovate.json 08de160a27 chore(repo): simplify root project config il y a 2 semaines
requirements.txt 1d9b57e09a chore(deps): update dependency typer to v0.20.0 il y a 6 mois

README.md

Welcome

Create reusable templates and turn them into configurable workloads for homelabs and self-hosted infrastructure. Free and Open-Source.

How it works

Create reusable templates for infrastructure expertise like Docker, Kubernetes, Terraform, Ansible, Python, and more. Use the built-in Jinja2-like templating syntax with << >> variables, <% %> blocks, and <# #> comments to keep configuration modular and conditional. Sync with Git in both directions or manage everything locally. Render templates, configure variables through a guided wizard, and wire up secrets. Copy them to remote servers and environments or any local directory.

✨ Explore 100+ template presets for homelabs and self-hosted infrastructure: https://github.com/ChristianLempa/boilerplates-library

Boilerplates CLI

The Boilerplates CLI is the main interface for working with template libraries locally. It lets you discover available templates, inspect their metadata and variables, validate them, and generate ready-to-use files.

It combines template-defined variables and defaults, guided interactive prompts, CLI variable overrides, and git-backed template libraries into one workflow. In practice, that means you can keep reusable boilerplates in a repository and turn them into concrete, environment-specific configurations with a single command.

⚠️ Boilerplates 0.2.0 introduced the new template format. Legacy template.yaml / template.yml manifests and .j2 template files are no longer supported.

ℹ️ New templates must use template.json, keep renderable content under files/, and use the custom Jinja2-like delimiters << >>, <% %>, and <# #> instead of default Jinja2 syntax.

Installation

Automated installer script

Install the Boilerplates CLI using the automated installer:

# Install latest version
curl -fsSL https://raw.githubusercontent.com/christianlempa/boilerplates/main/scripts/install.sh | bash

# Install specific version
curl -fsSL https://raw.githubusercontent.com/christianlempa/boilerplates/main/scripts/install.sh | bash -s -- --version v1.2.3

The installer uses pipx to create an isolated environment for the CLI tool. Once installed, the boilerplates command will be available in your terminal.

Nixos

If you are using nix flakes

# Run without installing
nix run github:christianlempa/boilerplates -- --help

# Install to your profile
nix profile install github:christianlempa/boilerplates

# Or directly in your flake
{
  inputs.boilerplates.url = "github:christianlempa/boilerplates";

  outputs = { self, nixpkgs, boilerplates }: {
    # Use boilerplates.packages.${system}.default
  };
}

# Use in a temporary shell
nix shell github:christianlempa/boilerplates

Quick Start

# Explore
boilerplates --help

# Update Repository Library
boilerplates repo update

# List all available templates for a docker compose
boilerplates compose list

# Show details about a specific template
boilerplates compose show nginx

# Generate a template (interactive mode)
boilerplates compose generate authentik

# Generate with custom output directory
boilerplates compose generate nginx --output my-nginx-server

# Non-interactive mode with variable overrides
boilerplates compose generate traefik --output my-proxy \
  --var service_name=traefik \
  --var traefik_enabled=true \
  --var traefik_host=proxy.example.com \
  --no-interactive

Managing Defaults

Save time by setting default values for variables you use frequently:

# Set a default value
boilerplates compose defaults set container_timezone="America/New_York"
boilerplates compose defaults set restart_policy="unless-stopped"

Template Libraries

Boilerplates uses git-based libraries to manage templates. You can add custom repositories:

# List configured libraries
boilerplates repo list

# Update all libraries
boilerplates repo update

# Add a custom library
boilerplates repo add my-templates https://github.com/user/templates \
  --directory library \
  --branch main

# Remove a library
boilerplates repo remove my-templates

Contribution

Contributions are welcome. Feel free to open an issue or submit a pull request!

License

This repository is licensed under the MIT License.