YAMLScript.org
Program in YAML — Code is Data
YAMLScript is a new functional programming language with a clean syntax that is also 100% valid YAML. It was designed to be easily embedded into existing YAML files in order to provide the logic, interpolation and data transformation capabilities that many YAML users need. Created by YAML inventor and lead maintainer, Ingy döt Net, YAMLScript solves these needs beautifully for all YAML users and uses.
YAMLScript is now available as a programming language learning track on Exercism. It's a great way to learn YAMLScript and get feedback from experienced mentors. Check it out!
If you work with apps and frameworks that use YAML for configuration, you can simplify your complex YAML files using YAMLScript, even if the app or framework does not support it natively. YAMLScript lets you include data from external files and other sources, make use of hundreds of existing standard functions, and even define your own variables and functions. You can filter, map, merge, reduce, generate, concatenate, interpolate and manipulate your data as you wish. YAMLScript provides these things with syntax that is minimal and unobtrusive, keeping your clean YAML data clean.
Slides and information from Ingy's KubeCon 2024 talk are available here. The highlight was HelmYS a new Helm post-renderer that lets you template Helm charts with YAMLScript (which is actual YAML).
Like many new languages, YAMLScript was built over an existing robust language,
Clojure, which in turn was built over
Java.
The power of Clojure and Java is available to YAMLScript users via the
YAMLScript runtime interpreter, ys
.
However, the ys
command is compiled into a single standalone native binary
executable file.
This means that No Java or JVM installation is required to use
YAMLScript, and startup/execution speed is very fast.
YAMLScript also produces the libyamlscript.so
shared library.
It has binding modules for 10 programming languages including
Go, JavaScript, Python and Rust, with many more on the way.
These modules can be used in your programs to load normal YAML files as well as
YAMLScript enhanced ones.
There are many ways to use YAMLScript:
- Simplify your existing YAML configs
- Works great with CI/CD, Helm, Docker, Ansible, etc.
- Check out HelmYS, a tool for using YAMLScript in Kubernetes Helm chart templates painlessly.
- Load YAMLScript (or YAML) in your programs
- Available in 10 programming languages (and counting)
- Program in YAMLScript
- Learn how at Exercism
- Script Automation with YAMLScript
- Many used in the YAMLScript repository
- Compile YAMLScript to binary executables
- Fast, standalone, no-source software distribution
- Query and Transform YAML (and JSON) data
- Use the
ys
command line tool similar tojq
oryq
YAMLScript Resources
YAMLScript Links
- Nov 2024 KubeCon Talk and Info
- Jun 2024 TPRC Talk
- Apr 2024 OSS/NA Talk
- Mar 2024 TheNewStack Article
- Mar 2024 Seajure Talk