Configuration that is Programmable, Scalable, and Safe

bird.pkl
name = "Swallow"

job {
  title = "Sr. Nest Maker"
  company = "Nests R Us"
  yearsOfExperience = 2
}

{
  "name": "Swallow",
  "job": {
    "title": "Sr. Nest Maker",
    "company": "Nests R Us",
    "yearsOfExperience": 2
  }
}

Generate any static configuration format

Define all your data in Pkl, and generate output for JSON, YAML, Property Lists, and other configuration formats.

Integrated application configuration

Embed Pkl into your applications for runtime configuration, and receive code generation for Java, Kotlin, Swift, and Go.

java logo kotlin logo swift logo go logo

module example.MyAppConfig

/// The hostname for the application
host: String

/// The port to listen on
port: UInt16(this > 1000)
intellij

Incredible IDE Integration

Great tooling for writing Pkl with the same ease as a static typed language. We offer plugins and extensions for IntelliJ, Visual Studio Code and Neovim, and also provide the Pkl Language Server so you can easily your own editor integrations.

Catch errors before deployment

With a rich type and validation system, catch configuration errors before deploying your application.

email: String = "dev-team@company.com"

port: Int(this > 1000) = 80

–– Pkl Error ––
Type constraint `this > 1000` violated.
Value: 80

3 | port: Int(this > 1000) = 80
              ^^^^^^^^^^^
at config#port (config.pkl, line 3)

3 | port: Int(this > 1000) = 80
                             ^^
at config#port (config.pkl, line 3)

106 | text = renderer.renderDocument(value)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^