pkl_elixir

Pkl language integration for Elixir — evaluate Pkl configuration from Elixir and get back native data structures.

Quick Start

{:ok, config} = PklElixir.evaluate("config.pkl")
config["port"]  #=> 4000

{:ok, result} = PklElixir.evaluate_text(~S'name = "hello"')
result["name"]  #=> "hello"

# Generate Elixir structs from Pkl classes at compile time
defmodule MyApp.User do
  use PklElixir.Schema, source: "schema/User.pkl"
end

Installation

Requires the Pkl CLI on your PATH (or set PKL_EXEC).

Add pkl_elixir to your dependencies in mix.exs:

def deps do
  [
    {:pkl_elixir, "~> 0.0.1"}
  ]
end

Documentation

See the Usage Guide for a comprehensive walkthrough — from Pkl basics to custom readers, supervision, and real-world recipes.

API docs: mix docs

License

Apache-2.0