Installation

Pkl Language Server is distributed both as a CLI and as a JAR, and comes in several flavors:

  • Native macOS executable for aarch64

  • Native Linux executable for amd64

  • Native Linux executable for aarch64

  • Native Windows executable for amd64

  • Java executable

  • Java JAR

The Java executable works on multiple platforms and has a smaller binary size than the native executables. However, it requires a Java 23 or higher runtime on the system path.

Homebrew

On macOS and Linux, release versions can be installed with Homebrew.

To install pkl-lsp, run:

brew install pkl-lsp

To update pkl-lsp, run:

brew update
brew upgrade pkl-lsp   # or just `brew upgrade`

Download

Pkl Language Server can be downloaded and installed manually.

macOS Executable

The macOS executable

curl -L -o pkl-lsp 'https://github.com/apple/pkl-lsp/releases/download/0.9.0/pkl-lsp-macos-aarch64'
chmod +x pkl-lsp
./pkl-lsp --version

This should print something similar to:

pkl-lsp version 0.9.0
We do not publish a native executable for macOS/amd64.

Linux Executable

The Linux executable is dynamically linked against glibc and libstdc++ for the amd64 and aarch64 architectures.

On aarch64:

curl -L -o pkl-lsp 'https://github.com/apple/pkl-lsp/releases/download/0.9.0/pkl-lsp-linux-aarch64'
chmod +x pkl-lsp
./pkl-lsp --version

On amd64:

curl -L -o pkl-lsp 'https://github.com/apple/pkl-lsp/releases/download/0.9.0/pkl-lsp-linux-amd64'
chmod +x pkl-lsp
./pkl-lsp --version

This should print something similar to:

pkl-lsp version 0.9.0

Windows Executable

Invoke-WebRequest 'https://github.com/apple/pkl-lsp/releases/download/0.9.0/pkl-lsp-windows-amd64.exe' -OutFile pkl-lsp.exe
.\pkl-lsp --version

This should print something similar to:

pkl-lsp version 0.9.0
We currently do not support the aarch64 architecture for Windows.

Java Executable

The Java executable is a jar that can be executed directly on macOS, Linux, and Windows.

It requires java to be installed, and available on $PATH.

  • macOS/Linux

  • Windows

curl -L -o pkl-lsp 'https://github.com/apple/pkl-lsp/releases/download/0.9.0/pkl-lsp-java'
chmod +x pkl-lsp
./jpkl-lsp --version
Invoke-WebRequest 'https://github.com/apple/pkl-lsp/releases/download/0.9.0/pkl-lsp-java' -OutFile jpkl-lsp.bat
.\jpkl-lsp --version

This should print something similar to:

pkl-lsp version 0.9.0

Java JAR

Pkl Language Server is published as a regular JAR to Maven Central.

It can be downloaded and executed directly using java -jar.

  • macOS/Linux

  • Windows

curl -L -o pkl-lsp.jar 'https://repo1.maven.org/maven2/org/pkl-lang/pkl-lsp/0.9.0/pkl-lsp-0.9.0.jar'
java -jar pkl-lsp.jar --version
Invoke-WebRequest 'https://repo1.maven.org/maven2/org/pkl-lang/pkl-lsp/0.9.0/pkl-lsp-0.9.0.jar' -OutFile pkl-lsp.jar
java -jar pkl-lsp.jar --version

This should print something similar to:

pkl-lsp version 0.9.0

The Java Executable and the Java JAR are very similar. The only difference between these two are that the Java Executable contains a script preamble to be interpreted by /bin/sh on macOS/Linux, and as a batch file on Windows.