CLI Commands
The Luma CLI is the primary way to interact with and execute your Luma programs. It supports compiling, running, debugging, and exploring your code easily from the command line.
luma [global options] command [command options]Example
luma run app.lumaAvailable Commands
run
Run a .luma file directly.
luma run hello.lumaThis command compiles the Luma source code to Go in-memory and immediately runs it.
tokens
Print all tokens (lexical elements) parsed from a .luma file.
Useful for debugging the lexer and syntax behavior.
luma tokens app.lumacompile
Compile a .luma file and print the equivalent Go code.
Useful for debugging the lexer and syntax behavior.
luma compile app.lumabuild
Compile a .luma file into a standalone Go executable.
luma build app.luma -o appThis generates a main.go, compiles it with Go, and produces a binary (./app or ./app.exe).
repl
Start an interactive REPL session (Read-Eval-Print Loop) for quick experimentation:
luma replType and execute code one line at a time. Great for testing expressions, types, or functions quickly.
help, h
Show a list of all available commands or help for a specific one:
luma help
luma help runExample Workflow
luma compile app.luma # See generated Go code
luma run app.luma # Execute script directly
luma build app.luma # Create Go binary for distribution