CLI

The Lucia CLI lets you run and compile programs directly from the terminal.

Running a program

lucia run file.lucia

Runs the file and prints the output to the console. Ideal for development and quick tests.

Compiling a program

lucia compile file.lucia

Get compiler version

lucia --version

Compiles the file without running it. You can specify the output target using the available options.

Main options

  • --version — outputs compiler version
  • --target python — outputs Python code (default)
  • --target javascript — outputs JavaScript code
  • --save — saves the compiled output to a file
  • --out <path> — specifies the output file path
  • --debug — shows internal compilation details

Examples

Run and see the output:

lucia run hello.lucia

Compile to JavaScript and save:

lucia compile hello.lucia --target javascript --save --out hello.js

Inspect the compilation process:

lucia run hello.lucia --debug

Next step

Learn the basic syntax and types of Lucia to write your first programs.