
Pkl Has a Free Configuration Language — Type-Safe Configs That Generate JSON, YAML, and More
Pkl (by Apple) is a configuration language — write type-safe configs and generate JSON, YAML, XML, or any format. What You Get for Free Type safety — catch config errors at build time Validation — constraints on values (ranges, patterns) Modules — reusable config templates Multi-format output — generate JSON, YAML, plist, properties IDE support — IntelliJ and VS Code extensions Packages — share config schemas as packages Templating — inheritance, composition, overrides CLI — evaluate, test, format Pkl files Quick Start brew install pkl // server.pkl host: String = "localhost" port: Int(isBetween(1, 65535)) = 8080 database { url: String = "postgres://localhost/mydb" maxConnections: Int(isPositive) = 10 } pkl eval server.pkl -f json # {"host":"localhost","port":8080,"database":{"url":"postgres://localhost/mydb","maxConnections":10}} pkl eval server.pkl -f yaml # host: localhost # port: 8080 # database: # url: postgres://localhost/mydb # maxConnections: 10 Why Developers Switch from Raw Y
Continue reading on Dev.to DevOps
Opens in a new tab



