Command Line Interface

yarn add --dev @elodin/cli

This package provides the CLI for Elodin with compilation commands.
It requires a valid Elodin configuration to run.


# Single build
# Single build with cleanup
elodin -c
# Single build + build on every change
elodin -w
# Single build with cleanup + build on every change
elodin -c -w
# Build on every change
elodin -w -sib


The CLI comes with a set of configuration options.
One can also use run

elodin --help
elodin -h
for a quick overview of all the configuration options.

--config [path]
./elodin.config.jsThe relative path to your Elodin configuration.
--watch, -w
Enables watch mode to automatically recompile on file changes.
--clean, -c
Remove previously generated files before compilation. Helps to get rid of old files where the Elodin file has been removed.
--skip-initial-build, -sib
Skips the initial build in watch mode.
Only works with watch mode enabled.

Watch Mode

Watch mode (using either

or the shorthand
flag) will automatically recompile all files on detected file changes.
This is very useful for development, where you want to apply changes immediately without having to compile manually again and again.