CLI Reference
The vexel command-line tool is the entry point for compiling, running, and inspecting Vexel programs.
vexel run
JIT-compile a source file and execute it immediately. No output binary is written to disk. This is the fastest way to run a Vexel program during development.
vexel run <file.vx>
Examples
vexel run hello.vx vexel run examples/fib.vx
vexel compile
Compile a source file to a native binary. The binary can be run independently without Vexel installed.
vexel compile <file.vx> [-o <output>] [--sdl2]
Examples
# Produces hello.exe (Windows) or hello (Linux/macOS) vexel compile hello.vx # Custom output name vexel compile hello.vx -o my_program # Compile a game with SDL2 vexel compile game.vx --sdl2 -o game
vexel ir
Print the generated LLVM IR for a source file to stdout. Useful for understanding how Vexel code maps to low-level operations and for debugging codegen issues.
vexel ir <file.vx>
vexel ir hello.vx
vexel parse
Print the Abstract Syntax Tree (AST) for a source file. Runs the lexer and parser but stops before semantic analysis. Useful for debugging parser behavior or understanding how the language is parsed.
vexel parse <file.vx>
vexel lex
Print the full token stream produced by the lexer for a source file. Each token is shown with its type and value. Useful for debugging tokenization issues or understanding how the lexer handles edge cases.
vexel lex <file.vx>
vexel analyze
Run the semantic analyzer on a source file and print all type errors, undefined names, and other analysis errors. Does not produce a binary. Use this to check a file for errors without running it.
vexel analyze <file.vx>