Installation
On this page you build the elci command-line compiler from source and put it on your PATH. You need
Java 25. GraalVM is only needed if you also want the native executable.
Prerequisites
Section titled “Prerequisites”| Tool | Needed for | Notes |
|---|---|---|
| JDK 25 | Building Elci and running the JVM elci | Set JAVA_HOME to it |
| Git | Cloning Elci | |
GraalVM 25 with native-image | Only the native elci executable | Also needs your platform’s C toolchain |
| Node.js and npm | Only formatting with elm-format | Optional |
You don’t need to install Gradle: the project includes the Gradle wrapper (./gradlew). The commands
below are for macOS and Linux shells.
Build from source
Section titled “Build from source”-
Check your Java version. Gradle builds Elci with Java 25:
Terminal window java -versionThe first line of the output should report version 25. If it doesn’t, install a JDK 25 and point
JAVA_HOMEat it. -
Clone Elci.
Terminal window git clone https://github.com/bloxbean/elci-lang.git -
Check the pinned Julc version. Elci’s
gradle.propertiesnames the Julc snapshot it was built and tested with, and the Julc commit it was built from:Terminal window grep '^julc' elci-lang/gradle.propertiesjulcVersion=0.1.0-pre20-ebaf028-SNAPSHOTjulcRevision=ebaf028c982479906a1f9449b9fef68fa7836301The first build downloads that version from the BloxBean Maven repository.
-
Build the Elci CLI.
Terminal window cd elci-lang./gradlew installDistThis creates
build/install/elci/bin/elci, a launcher script that runs the compiler on your Java 25. To run Elci’s own test suite first, use./gradlew test installDist. -
Optional: build the native executable. Point
GRAALVM_HOMEat a GraalVM 25 installation that containsbin/native-image, then run:Terminal window export GRAALVM_HOME=/path/to/graalvm./gradlew nativeCompileThis creates
build/native/elci. It starts fast and doesn’t need Java at runtime, but it only runs on the platform you built it on. -
Put
elcion yourPATH. From theelci-langdirectory, add one of the two builds:Terminal window # The JVM buildexport PATH="$PWD/build/install/elci/bin:$PATH"# Or the native buildexport PATH="$PWD/build/native:$PATH"Add the same line, with the absolute path, to your shell profile (for example
~/.zshrcor~/.bashrc) to keep it in new terminals. -
Check the installation.
Terminal window elci --versionelci 0.1.0-dev / julc 0.1.0-pre20-ebaf028-SNAPSHOTThe first part is the Elci version and the second is the Julc version the compiler is pinned to.
The Julc version in your projects
Section titled “The Julc version in your projects”Every project’s elci.toml records the Julc version it expects:
julc-version = "0.1.0-pre20-ebaf028-SNAPSHOT"It must equal the version that elci --version prints. elci init writes the right value for you. If they
differ, for example after you upgrade Elci, every command stops with:
elci: ELCI4001: Julc version does not match this compiler; expected julc-version = "0.1.0-pre20-ebaf028-SNAPSHOT"Update julc-version in elci.toml, then rebuild and re-run your tests. A new Julc version can change
the generated scripts and their hashes.
Editor setup
Section titled “Editor setup”-
Syntax highlighting: Elci source files use the
.elmextension, so any Elm syntax-highlighting extension works. -
Formatting: Elci code follows elm-format 0.8.8 style. To check your files without installing anything globally:
Terminal window npm exec --yes --package elm-format@0.8.8 -- elm-format src tests --validate -
Diagnostics: the Elm language server doesn’t know Elci’s modules (
Julc.Ledger,Map,Array,Bytes, your Java library imports), so its errors aren’t reliable for Elci code. Useelci check, which reports every error asfile:line:column: ELCIxxxx: message, followed by the source line and any hints. With--report=jsonit prints each error as one JSON object on its own line instead, for editor integrations.elci explain <code>explains a code.
Troubleshooting
Section titled “Troubleshooting”- Could not resolve
org.julclang:...while building Elci. Gradle could not download the pinned Julc snapshot. Check thathttps://repo.bloxbean.org/maven/snapshotsis reachable from your machine (a proxy or firewall can block it), and thatjulcVersioningradle.propertiesis unchanged. - Gradle reports a Java toolchain problem. Elci and Julc need Java 25. Check
java -versionandJAVA_HOME. GRAALVM_HOME must point to a GraalVM installation containing native-image.nativeCompileneedsGRAALVM_HOMEset to a GraalVM installation that containsbin/native-image.elci: command not found. The build directory is not on yourPATH. Run the binary by its full path to confirm the build worked, then fix yourPATH.
Next, create your first project: Your first validator.