CLI Reference

Every Elide command, global option, exit code, and output-stream rule.

elide --help lists everyday commands; elide --help-all adds the Advanced group and every flag. elide help <command> prints that command’s section of this page.

Run and develop

run

Run a file, a named script, or the project entrypoint. Resolution order: Elide for AI Agents.

elide run app.ts -- --port 3000
FlagEffect
-s, --snippet CODERun inline code instead of a file.
-l, --language LANGSnippet language: js (default), ts, or python.
--contexts=<N|auto>Application contexts to prespawn; auto sizes from physical cores. Default 1.
--debugger[=MODE|ADDRESS]Attach a debugger: auto, cdp, dap, or a JDWP address (5005, host:5005).
--debugger-host HOSTDebugger bind host. Default 127.0.0.1.
--debugger-port PORTDebugger port. Default 4711 (DAP) or 1337 (CDP).
--profiler[=PROFILER]Profile: cputracing, cpusampling, or memtracing.
--coverage[=auto]Collect coverage.
--insights INSIGHTSInject Insight scripts.

serve (alias start)

Serve a directory as static files, or a script that exports a fetch handler (Development Server).

elide serve ./public
elide serve server.ts -- --verbose
FlagEffect
--host HOSTBind host. Default 127.0.0.1.
--port PORTBind port. Default 8080.
--contexts=<N|auto>Application contexts to prespawn, as for run.
--no-tuiPlain log output instead of the dashboard.
-- SCRIPT_ARGSArguments for the served script.

dev

Like serve, with file watching and live reload.

FlagEffect
--host HOSTBind host. Default 127.0.0.1.
--port PORTBind port. Default 3000.
--contexts=<N|auto>Application contexts to prespawn, as for run.
--no-tuiPlain log output instead of the dashboard.
--no-watchDisable file watching.
-- SCRIPT_ARGSArguments for the script.

install

Install project dependencies.

FlagEffect
--ecosystems LISTEcosystems to install, e.g. maven,npm. Default maven.
--workspaceInstall every ecosystem the project declares.
--with CLASSIFIERAlso download sources, docs, or javadoc.
--slimDownload classes only.
--freshRe-download everything, refreshing the global cache.
--directCopy artifacts into the project instead of linking them.

repl

Start the interactive REPL. A bare elide in a terminal does the same.

python

Run Python like python; tokens after the script go to the program. Install it first with setup.

elide python script.py --flag-for-the-script
FlagEffect
-c CMDRun a program passed as a string.
-sLeave the user site directory off sys.path.

Interpreter flags (-B, -W, -m, …): Python options.

Build and test

build

Build what elide.pkl declares. Bare tokens name tasks (deps, compile, test, clean; leading : optional). Arguments after -- are passed to the subprocess.

elide build deps compile
FlagEffect
-i, --inspectList the project’s tasks.
--workers=<N>Run at most N tasks at once.
--no-cacheDisable the build cache for this run.
--offlineDo not fetch remote resources.
-f, --flag NAME[=VALUE]Set a manifest build flag (Build Flags).

test

Run tests, limited to any paths given. JVM tests need a test source set in elide.pkl.

FlagEffect
-t, --test-name-pattern REGEXRun tests whose name matches.
--select SELECTORJVM: run what a selector names: class:, method:, or package:. Repeatable.
--include-tag EXPRJVM: run tests matching any include. Repeatable.
--exclude-tag EXPRJVM: skip tests matching any exclude. Repeatable.
--bail[=N]Stop after N failures. Default 1.
--test-timeout MSPer-test timeout. --timeout limits the whole run.
--onlyRun only tests marked .only.
--concurrency NTests at once (JS files, JVM classes). Default 1.
--reporter NAMEconsole, junit, or tap.
--reporter-outfile DIRReporter output directory.

Debugging tests: Debugging.

format (alias fmt)

Format Java and Kotlin sources. Paths and formatter flags follow --: elide format -- src.

FlagEffect
--list-filesPrint each file that fails the check or is changed.
--list-diffs[=N]Print a diff per file in check mode; with N, only when N or fewer fail.

--dry-run (after --) checks without writing and exits 1 if a file would change.

project

CommandPurpose
elide project infoShow resolved project metadata.
elide project adviceShow project advice for coding agents.
elide project exportPrint the project as JSON, a pom.xml, or an IntelliJ model.

Project export formats

elide project export --format=<json|pom|intellij> prints to stdout. Default json.

FormatOutput
jsonThe evaluated manifest. Type discriminators use @type and Pkl type names.
pomCoordinates, dependencies by scope, repositories, compiler levels, source and resource roots.
intellijOne module per source set, with content roots, dependencies, SDK level and Kotlin facet.

pom

<artifactId> is the project name. <groupId> is the workspace root’s name, or the project name outside a workspace. <version> is the manifest’s, or 0.0.0. A workspace root lists members as <modules>; members name it as <parent>.

ManifestMaven scope
packages, modulescompile
compileOnly, devPackages, processorsprovided
runtimeOnlyruntime
testPackagestest

Sibling projects become coordinate dependencies; local JARs become system-scoped. exclusions and kotlinPlugins are omitted. Extra source roots use build-helper-maven-plugin.

intellij

Modules are named <project>.<sourceSet>. Paths are relative to root (the workspace or project root). Libraries resolve from localRepository (default .dev/dependencies/m2); run elide install first. The IntelliJ IDEA plugin imports this model.

JVM toolchain

Elide bundles JDK 25 and Kotlin. Tool arguments follow --; Elide’s flags go before it.

java

Run JVM programs, like java.

elide java -- -jar app.jar

javac

Compile Java, like javac. See Java Compiler.

FlagEffect
--jar JARPack a JAR at this path after compiling.
--manifest MANIFESTManifest for the --jar output.
--max-errors NShow at most N distinct errors; 0 shows all.
--report-used-deps PATHWrite the classpath entries the output uses (Bazel strict-deps).
--persistent_workerRun as a Bazel persistent worker.
--classpath-cacheReuse classpath state across worker compilations. Worker only.
--capabilitiesPrint compiler capabilities as JSON.

kotlinc

Compile Kotlin, like kotlinc. See Kotlin Compiler.

FlagEffect
--incrementalCompile incrementally; state goes in .dev/artifacts/kotlinc/incremental/.
--incremental-cache-dir DIRIncremental state directory.
--plugins LISTBuilt-in plugins: metro, serialization, atomicfu, power-assert.
--metro / --no-metroForce the Metro DI plugin on or off.
--testsEnable test plugins (power-assert).
--abi-onlyEmit only an ABI (header) JAR to -d.
--max-errors NShow at most N distinct errors; 0 shows all.
--report-used-deps PATHWrite the classpath entries the output uses (Bazel strict-deps).
--persistent_workerRun as a Bazel persistent worker.

jar

Build JARs, like jar. See JAR Packaging.

Setup and tooling

elide agent prints guidance for coding agents; see Elide for AI Agents.

init

Create a project from a template. With no flags, opens an editor.

Templates: java, ktjvm, web-demo, web-simple, workspace (Kotlin library plus app).

FlagEffect
--templatesList template IDs.
-t, --template TEMPLATESelect a template.
--parametersList template parameters.
--jsonPrint --templates or --parameters as JSON.
-i, --plainAsk plain questions instead of opening the editor.
-d, --skip-defaultsSkip parameters with defaults. Needs --plain.
-s, --skip-runDo not run Elide after generating.
--overwriteReplace existing files.

adopt

Migrate the project to Elide with an AI coding harness (Adopt Elide). With no flags, it asks for each choice. Ctrl+C exits 130 and keeps the log.

FlagEffect
--build STRATEGYelide (create an Elide build) or existing (keep Maven/Gradle).
--harness HARNESScodex, claude, or omp.
--approval MODEauto-approve, manual-approve, or yolo (bypasses protections).
--logStream harness output as well as logging it.
--prompt-append FILEAppend guidance to the prompt. Repeatable.
--non-interactiveBatch mode. Needs all three choices; not manual-approve.

help

Read this documentation offline. A command name prints its section; a slug or title prints the page; options lists every flag.

elide help — the complete manual, available offline
FlagEffect
--format FORMATauto (default), interactive, or markdown.
-w, --width WIDTHMaximum width. Default 110.
-l, --lang LANGDisplay language.
--languagesList display languages.
--no-animationHide the snow animation; Tab toggles it.

info

Show binary, platform, language, and network-transport details. --cargo-lockfile prints the embedded lockfile.

upgrade

Update Elide.

FlagEffect
--checkReport without applying.
--forceUpdate even when current.
--channel CHANNELrelease or nightly. Default: this build’s channel.

setup

Install an optional component: elide setup python.

FlagEffect
--channel CHANNELrelease or nightly. Default: this build’s channel.
--forceRe-apply an installed component.

setup upgrades Elide first if it is behind the channel; elide upgrade keeps installed components. Package manager installs (Homebrew, apt, RPM, MSI, nix, snap) are refused; use the install script:

curl -sSL --tlsv1.2 elide.sh | bash -s -- --with-python

use

Pin a version in .elideversion and download it: elide use 1.6.0.

FlagEffect
--channel CHANNELrelease or nightly.
--no-installWrite the pin without downloading.

Versions are releases (1.6.0, v1.6.0) or nightly datestamps (20260921). --ignore-version runs this binary anyway.

lsp

Start a Language Server Protocol server over stdio. Serves Java.

mcp

Start a Model Context Protocol server. See MCP.

FlagEffect
--mode MODEstdio (default) or http.
--host HOSTHTTP bind host. Default localhost.
--port PORTHTTP bind port. Default 8125.

Advanced

Listed by elide --help-all.

classpath

Print a resolved classpath for [<sourceSet>:]<usage>, e.g. test:runtime. Usages: toolchain, processor, compile, modules, runtime, provided. Default main:compile; an unknown usage exits 2.

FlagEffect
--offlineDo not fetch remote resources.

javadoc

Generate Javadoc, like javadoc. Arguments follow --.

FlagEffect
--theme THEMEdefault or elide.

javaformat

Format Java with google-java-format. Arguments follow --. See Formatting.

FlagEffect
--list-filesPrint each file that fails the check or is changed.
--list-diffs[=N]Print a diff per file in check mode; with N, only when N or fewer fail.

javap

Disassemble JVM bytecode, like javap. Arguments follow --.

jdeps

Analyze JVM class dependencies, like jdeps. Arguments follow --.

ktfmt

Format Kotlin with ktfmt. Arguments follow --.

FlagEffect
--list-filesPrint each file that fails the check or is changed.
--list-diffs[=N]Print a diff per file in check mode; with N, only when N or fewer fail.

mvn

Run Maven, like mvn: elide mvn -- package. See Native Maven.

Flag (after --)Effect
--flavor NAMEPlugin set, e.g. spring@4.1.0. Detected from pom.xml by default.
--mode=MODEnative (default), mixed, or legacy.
--yesApprove downloads without prompting.
--porcelainStream Maven’s own output.

native-image

Build a JVM program into a native executable. Arguments follow --. See Native Image.

web

Web tooling: elide web build app.ts page.md --out dist builds files without a manifest. See Web Toolchain.

FlagEffect
-o, --out DIROutput directory.

Global options

Accepted before or after the command name, before any --.

Common flags

OptionEffect
-p, --project PATHProject directory.
-f, --flag NAME[=VALUE]Set a manifest build flag.
-q, --quietHide progress. Warnings, errors, and program output still print.
-v, --verbose / --debugMore logging.
--color / --no-colorForce color on or off.
--timeout DURATIONTime limit, e.g. 30s, 5m. Kills child processes and exits 124.
--max-mem SIZEHeap limit, e.g. 512m, 8g. One-shot runs default to 4g.
--limit NAME=COUNTResource limit: workers or fds. Repeatable.
--interopShare one context across languages (Languages).
-V, --versionPrint the version.

Sandbox flags

Guest code runs unconfined until a sandbox flag is given. See Sandbox.

OptionEffect
--sandbox[=PROFILE]Profile: trusted. Bare --sandbox confines filesystem access.
--allow-read[=PATHS]Grant reads; bare grants all.
--allow-write[=PATHS]Grant writes; bare grants all.
--allow-net[=HOSTS]Permit network; bare permits all.
--deny-net=HOSTSDeny hosts; overrides --allow-net.
--allow-run[=CMDS]Permit subprocesses; bare permits all.
--deny-run=CMDSDeny commands; overrides --allow-run.
--allow-env[=NAMES]Variables the manifest may read; bare allows all.
--fs-auditLog each filesystem access decision.
--allow-threadsPermit guest threads. Denied by default.
--allow-native / --no-nativePermit or deny guest native access.

Diagnostics flags

OptionEffect
--debugger[=MODE]Attach a debugger (run, Debugging).
--debugger-host HOST / --debugger-port PORTDebugger bind address.
--profiler[=PROFILER]cputracing, cpusampling, or memtracing.
--coverage[=auto]Collect coverage.
--insights INSIGHTSInject Insight scripts.
--error-format FORMATUncaught errors: auto (default), pretty, or plain.
--abort-on-uncaught-exceptionAbort with SIGABRT on an uncaught exception.
--redirect-warnings FILEWrite warnings to FILE instead of stderr.

Version flags

OptionEffect
--use-version VERSIONRun another installed Elide version.
--ignore-versionIgnore .elideversion and --use-version.

Advanced flags

OptionEffect
--transport TRANSPORTNetwork transport (Network transport).
--locale LOCALECLI locale, e.g. fr.
-X, --vm KEY=VALUESet a VM property.
--safe-closeShut down fully even for one-shot runs.
--pkgst / --no-pkgstUse, or skip, the Pkgst package proxies for elide install.
--help-instrumentsList instrument flags.

Python options

CPython flags. Put them before the script.

OptionEffect
-IIsolated mode.
-BDo not write bytecode files.
-EIgnore PYTHON* environment variables.
-SDo not import site on startup.
-uUnbuffered stdout and stderr.
-PDo not prepend an unsafe path to sys.path.
-OOptimize. Repeatable.
-bWarn on bytes/str comparisons. Repeatable.
-xSkip the first line of the script.
-W ARGWarning control. Repeatable.
-m MODULERun a module as __main__.

Network transport

--transport=Effect
autoDefault: v2 on Linux and macOS, nio elsewhere.
v2Elide’s native transport.
epoll, kqueue, io_uringv2 with that driver. Fails on other platforms.
nioPortable transport.

Instruments

OptionEffect
--jfr FILERecord a JFR file, saved on exit.
--jfr-settings SETTINGSdefault, profile (default), or a .jfc file.
--jitdump DIRWrite JIT metadata for Linux perf.
--heap-dump FILEDump the heap on exit.
--heap-dump-on-oom FILEDump the heap on out-of-memory, then exit 3.
--vmstatMake the process visible to jps, jstat, and jcmd.

Exit codes

CodeMeaning
0Success, help, or version output.
1The command or program failed.
2Invalid usage, unknown run target, or a removed command.
3Out of memory; --heap-dump-on-oom wrote a heap dump.
124--timeout expired.
otherSet by the program or tool.

Output streams

  • Program output, test reports, and machine-readable output go to stdout.
  • Progress and diagnostics go to stderr.
  • Color is off when the stream is not a terminal. --color, FORCE_COLOR, or CLICOLOR_FORCE force it on; --no-color or NO_COLOR turn it off.
  • --quiet hides progress only.