CLI Reference¶
Usage¶
Commands¶
mol run¶
Execute a MOL program.
| Flag | Description |
|---|---|
--trace | Force auto-tracing on all pipe chains (default for 3+ stages) |
--no-trace | Disable all pipe tracing |
Examples:
mol parse¶
Display the AST (Abstract Syntax Tree) of a MOL program.
Useful for debugging grammar and parser behavior.
mol transpile¶
Convert MOL source to Python or JavaScript.
| Target | Output |
|---|---|
python | Python 3 source code |
javascript or js | JavaScript (ES6+) |
Examples:
mol repl¶
Start an interactive Read-Eval-Print Loop.
REPL Features:
- Execute MOL code line by line
- Multi-line support with
\continuation - Persistent state between lines
Ctrl+Cto exit
MOL v0.3.0 REPL
Type MOL code. Use \ for multi-line. Ctrl+C to exit.
mol> let x be 42
mol> show x * 2
84
mol> show "hello" |> upper
HELLO
mol version¶
Print the current MOL version.
Exit Codes¶
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Runtime error, guard failure, or file not found |