Empowering the “Configuration as Code” paradigm, Apple unveils Pkl (pronounced Pickle), a versatile language for defining configurations.
Versatile Configuration Definition
Pkl, an embedded language, facilitates broad template support and data validation. It scales seamlessly from small to large, simple to complex, addressing specific and recurring configuration tasks.
Open Source and Kotlin Integration
Backed by Kotlin and released under the Apache license, Pkl’s toolkit boasts plugins for IntelliJ, Visual Studio Code, and Neovim. An upcoming Language Server Protocol (LSP) handler will enhance the development experience.
Declarative with Advanced Features
Combining declarative language simplicity with general-purpose language capabilities, Pkl supports type annotations, classes, functions, computational expressions, conditions, and loops.
Flexible Application and Integration
Pkl serves various purposes, from generating static configurations in JSON, YAML, or XML to forming modules for handling configuration formats in applications across different programming languages.
Multi-language Bindings
Integration bindings are available for Java, Kotlin, Go, and Swift, with a dedicated module for Spring framework integration. Developers can use Pkl configuration to create modules and packages, fostering code sharing across projects.
Robust Validation and Conditions
Pkl provides flexible tools for defining conditions and value correctness checks, identifying errors in the configuration before application. Validators help enforce ranges, mandatory fields, and formats.
Streamlined Collaboration and Importing
Pkl allows sharing configuration code between projects by publishing configuration descriptions in repositories, enabling seamless collaboration and dependency importing.
Explore the powerful capabilities of Pkl for configuring applications efficiently and collaboratively, fostering a new era in the “Configuration as Code” landscape.