elide.pkl Reference

Reference for the Elide project manifest

Every native Elide manifest begins with:

amends "elide:project.pkl"

The schema itself lives in protocol/manifest/*.pkl, published at pkl.elide.dev/1.5.4/project.pkl. Pinning that URL in amends evaluates the manifest against exactly that immutable schema version, which Elide caches locally and verifies by SHA-256. A schema version is the Elide version it shipped with, so pinning a version pins the schema exactly as that release defined it.

A pin newer than the schema your Elide ships is not an error: within a major version the schema only ever gains properties, and the defaults of existing ones never change, so Elide evaluates the manifest against its own embedded schema. A project can therefore pin ahead of the binaries that build it. Setting a property that postdates the running Elide still fails, naming the property and telling you to upgrade; a pin from a different major version is refused.

While the elide:project.pkl form is still supported, it is recommended to write URL imports instead, as they allow more control over the manifest version used by a project. The elide: form may be retired in the future.

Use elide manifest to inspect the evaluated manifest as JSON. This page summarizes the main configuration groups; fields that only describe future or specialized build behavior are intentionally omitted.

Project metadata

PropertyPurpose
name, version, descriptionHuman-readable project identity.
entrypointFile used by elide run when no file is supplied.
scriptsNamed commands resolved by elide run NAME.
sourcesNamed source sets and globs.
dependenciesMaven, npm, and PyPI declarations.
jvm, kotlin, javascriptLanguage and compiler settings.
testingTest reports and coverage settings.
artifactsJAR, native executable, static-site, and container outputs.
devDevelopment integration, including MCP settings.

A manifest can also read build.flags while it evaluates: the build flags passed as --flag/-f. See Build Flags.

Sources

import "elide:Sources.pkl" as Sources

sources {
  ["main"] = new Sources.SourceSetSpec {
    paths {
      "src/main/java/**/*.java"
      "src/main/kotlin/**/*.kt"
    }
  }
  ["test"] = new Sources.SourceSetSpec {
    type = "test"
    dependsOn { "main" }
    paths { "src/test/**/*.kt" }
  }
}

Source-set types are source, test, example, and other. Test sets receive test dependencies and participate in elide test.

Dependencies

dependencies {
  npm {
    packages { "react@19.0.0" }
  }
  pypi {
    packages { "requests>=2" }
  }
  maven {
    packages { "com.google.guava:guava:33.5.0-jre" }
    testPackages { "org.junit.jupiter:junit-jupiter:5.13.4" }
  }
}

Maven also supports compileOnly, runtimeOnly, processors, kotlinPlugins, modules, exclusions, repositories, and local JAR paths. The schema accepts PyPI declarations, but current builds cannot install them.

JVM and Kotlin

jvm {
  main = "example.Main"
  target = 25
  java {
    compiler {
      flags { "-Xlint:all" }
    }
  }
}

kotlin {
  compilerOptions {
    allWarningsAsErrors = true
    jvmTarget = 25
  }
}

Common Kotlin options include optIn, progressiveMode, warning controls, freeCompilerArgs, apiVersion, languageVersion, jvmTarget, and incremental compilation.

Artifacts

Import the schema that defines the artifact type:

import "elide:Jvm.pkl" as Jvm

artifacts {
  ["app"] = new Jvm.Jar {
    name = "app.jar"
    main = "example.Main"
    sources { "main" }
  }
}

Other artifact types include sources JARs, Javadoc JARs, native executables, static sites, and container images. Use elide build --inspect to see the tasks produced by the current manifest and binary.

Testing

Coverage is opt-in through --coverage or the manifest. Language-neutral test reports are configured under testing.reports; JVM and JavaScript coverage have separate settings under testing.coverage.

For a complete working project, see Elide Projects.