VexaScript CLI

Compile, bundle, run, inspect, and format from the terminal

The vexa CLI covers building, running, providing syntax definitions in different formats, formatting, testing, exploring the AST, LSP and MCP.

Core commands

build <input>

Compile a VexaScript file to JavaScript, with optional bundling and JSX factory overrides.

bundle <input>

Bundle a VexaScript entry file and all referenced modules as ESM output.

run <input>

Transpile and execute a VexaScript file with Node.js.

test [paths...]

Discover and run .test.vx files with the built-in inline helpers.

format <input>

Format a file in place, optionally writing a copy to a separate output path.

tokens <input>
ast <input>

Inspect the tokenizer output or print a simplified AST for debugging parser behavior.

syntax --monaco, --vscode, --textmate, --codemirror

Export editor grammars

Select editor syntax export targets from the syntax command, or use --target <name> for the explicit target id.

lsp

Start the language server. By default using --stdio. This allows editors to get autocompletion and error detection.

mcp

Run the MCP navigation server. This enables agents to do accurate operations on VexaScript codebases.

Useful switches

-o, --out <file>

Available on build, bundle, and format to control the output path.

--target <mode>

Use conservative or optimized transpilation modes on build-oriented commands.

--jsx-factory / --jsx-fragment-factory

Override JSX emit targets for projects that do not use the default React-style factories.

It is possible to define those also in the tsconfig.json file.

--root <dir>

Set the workspace root for the mcp server when resolving files and symbols.

pnpm tsx compiler/cli.ts build src/main.vx --out dist/main.js --target optimized
pnpm tsx compiler/cli.ts syntax --monaco
pnpm tsx compiler/cli.ts test samples/