YAML templating tool

用于YAML结构而不是文本的YAML模板工具。「YAML templating tool that works on YAML structure instead of text」

Github stars Tracking Chart

安装。从发布页面抓取预制的二进制文件。

玩。试试在线游乐场

有关注释、数据值、覆盖和其他功能的更多信息,请参见文档页面。

Slack。Kubernetes 中的 #carvel slack

概述

ytt(发音为拼写)是一个了解 YAML 结构的模板工具。它通过可重用的模板和用户提供的值,帮助你轻松配置复杂的软件。Ytt 包括以下功能。

  • 结构化模板:理解YAML结构,因此用户可以专注于他们的配置,而不是与文本模板相关的问题,如YAML值引用或手动模板缩进。
  • 内置编程语言:包括 "功能齐全 "的类似于Python的编程语言Starklark,通过更丰富的功能帮助减轻配置复杂软件的负担。
  • 可重复使用的配置。您可以通过应用环境特定的值,在不同环境中重复使用相同的配置。
  • 自定义验证:加上快速和确定性的执行,让您在创建和测试模板时,可以利用更快的反馈循环。
  • 覆盖:这种高级配置可以帮助用户管理复杂软件所需的定制。更多内容,请看在线游乐场的这个例子
  • 沙盒:为模板的执行提供一个安全的、确定性的环境。

试试吧

要开始使用 ytt 并查看示例,你可以使用在线游戏场或下载二进制文件并在本地运行游戏场。



Main metrics

Overview
Name With Ownercarvel-dev/ytt
Primary LanguageGo
Program languageGo (Language Count: 6)
PlatformLinux, Mac, Windows
License:Apache License 2.0
所有者活动
Created At2019-03-01 00:13:56
Pushed At2025-05-20 12:13:40
Last Commit At
Release Count109
Last Release Namev0.52.0 (Posted on )
First Release Namev0.1.0 (Posted on )
用户参与
Stargazers Count1.8k
Watchers Count29
Fork Count140
Commits Count1.3k
Has Issues Enabled
Issues Count534
Issue Open Count152
Pull Requests Count329
Pull Requests Open Count5
Pull Requests Close Count56
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private

ytt (YAML Templating Tool)

ytt (pronounced spelled out) is a templating tool that understands YAML structure allowing you to focus on your data instead of how to properly escape it.

Features:

  • templating works on YAML structure (instead of text)
    • which eliminates variety of problems such as invalid YAML formatting, escaping, etc.
  • syntactic sugar for single YAML node conditionals and for loops
    • makes it easier to read densely conditioned templates
  • templates are themselves valid YAML files
    • makes them friendly to existing editors and YAML tools
  • includes sandboxed "fully featured" Python-like programming language
  • allows configuration modularization via functions and libraries

Try it

Try out online playground or download latest binaries from Releases page and run it locally:

ytt -f examples/playground/example-demo/
ytt -f examples/playground/example-demo/ --output-directory tmp/

See examples/playground/ for examples shown on get-ytt.io.

Development

Consult docs/dev.md for build instructions, code structure details.