Command line

Everything citril can do from a terminal.

Running code

CommandWhat it does
citrilStart the interactive REPL (tree-walking interpreter).
citril <file>Run a .citril / .ctl file on the bytecode VM (default).
citril -c "<code>"Run a snippet of source directly.

Choosing a back end

An optional prefix selects the engine; the VM is the default.

citril --tree <file>Run on the tree-walking interpreter.
citril --interp <file>Alias for --tree.
citril --vm <file>Force the VM (already the default).

These combine with other commands, e.g. citril --tree -c "print(1)".

Tools

citril --bench <file>Time the tree-walker vs the VM and print the speedup.
citril --tokens <file>Dump the lexer's token stream (for debugging the language).

Info

citril --help / -hPrint the command list.
citril --version / -vPrint the version.

File directives

These go at the top of a source file, not on the command line:

#pragma version 6Requires at least that version to run.