A project is a directory with an elide.pkl. Outputs, dependencies, reports and build state go in .dev/. Run
commands from the project directory, or pass -p PATH.
elide init --templates # java, ktjvm, web-simple, web-demo, workspaceCreate a project without prompts
elide init opens an editor in a terminal. In scripts and CI, pass --plain --skip-defaults, a template and its
parameters as name=value:
elide init --template java --parameters # list parameters and blocks
elide init --template java --parameters --json # the same, as JSON
elide init --plain --skip-defaults --skip-run --template java \
project_name=greeter package=dev.acme greeting="Hi there" tests=falseelide.pkl
src/main/dev/acme/Hello.java| Argument | Effect |
|---|---|
NAME=VALUE or NAME VALUE | Sets a parameter; omitted parameters take their defaults. |
BLOCK=true, BLOCK=false | Turns an optional block on or off: tests (test sources), mcp (.mcp.json). |
--skip-run | Does not run Elide after generating files. |
--overwrite | Replaces existing files. |
| Input | Result |
|---|---|
No terminal, without --plain --skip-defaults | Exit 2: `elide init` needs an interactive terminal. |
| A value that fails validation | Exit 2: Parameter "package" value "1bad" validation failed with error: "Not a valid Java package name. |
A block value other than true/false | Exit 2: Could not parse block "tests" value "maybe" as boolean, it must be true or false |
| An unknown name | Warning No parameter or block "colour" exists, value "red" will be ignored; exit 0 |
Create a JVM project
amends "elide:project.pkl"
name = "hello"
jvm {
main = "sample.HelloKt"
}src/main/kotlin/sample/Hello.kt:
package sample
fun main() {
println("Hello from Kotlin")
}elide install
elide build
elide runsrc/main/kotlin needs no sources block; see Source Sets.
elide build --inspect lists the tasks and their options; see Build Tasks.
Add a script
scripts {
["greet"] = "echo hello"
}elide run greetScripts run under /bin/sh. elide run NAME picks the first match: a file, then elide.pkl scripts, then
package.json or pyproject.toml scripts, then node_modules/.bin.
Add dependencies
Declare Maven, npm and PyPI packages under dependencies; elide install resolves Maven and npm packages, not PyPI
(Python packages). See Dependencies and the
reference.
Create a workspace
A workspace root lists member projects and builds them as one task graph. elide init --template workspace creates
one. See Workspaces.
Inspect a project
elide project info # resolved source sets, dependencies, artifacts
elide project advice # usage advice for coding agents
elide project export # the resolved manifest as JSON
elide project export --format=pom # or intellij
elide classpath # the main compile classpath, `:`-separated
elide classpath test:runtime # [<source-set>:]<usage>-f flags change the export. Formats: Project export formats.
Classpath usages: Source Sets.
Pin the Elide version
elide use 1.6.0 # write .elideversion and install that version
elide use 1.6.0 --no-install # only write the filetoolchain.engines in elide.pkl lists accepted versions; see Toolchain.