All commands, flags, and options for the Lambda CLI.
lambda # Start interactive REPL
lambda <script.ls> [options] # Run a functional script (JIT compiled)
lambda <command> [options] [arguments] # Run a subcommand
| Flag | Description | Default |
|---|---|---|
-h, --help | Show help message | |
--c2mir | Use C2MIR JIT compilation | false |
--optimize=N | MIR JIT optimization level (0–3) | 2 |
--max-errors N | Max type errors before stopping | 10 |
--dry-run | Skip real I/O; fabricated results | false |
run — Run a Procedural ScriptExecutes a Lambda script with a main() procedure entry point.
lambda run [options] <script.ls>
# Example
lambda run server.ls
lambda run --c2mir script.ls
validate — Validate Data Against a SchemaValidates one or more data files against a Lambda schema.
lambda validate [-s <schema>] [-f <format>] [options] <file> [files...]
| Flag | Description | Default |
|---|---|---|
-s <schema> | Schema file (.ls) | Auto |
-f <format> | Input format | Auto-detect |
--strict | All optional fields must be present or null | false |
--max-errors N | Stop after N errors | 100 |
--allow-unknown | Allow fields not defined in schema | false |
Supported formats: json, csv, ini, toml, yaml, xml, markdown, rst, html, latex, rtf, pdf, wiki, asciidoc, man, eml, ics, vcf, textile, mark, text
Built-in schemas (no -s needed): html, eml, ics, vcf, asciidoc, man, markdown, rst, textile, wiki
# Examples
lambda validate data.json -s schema.ls
lambda validate page.html
lambda validate --strict config.yaml -s config_schema.ls
lambda validate file1.json file2.json -s schema.ls
convert — Format ConversionConvert data between supported formats.
lambda convert <input> [-f <from>] -t <to> -o <output> [options]
| Flag | Description | Default |
|---|---|---|
-f <from> | Input format | Auto-detect |
-t <to> | Output format (required) | |
-o <output> | Output file path (required) | |
--full-document | For LaTeX→HTML: generate complete HTML | false |
Output formats: mark, json, xml, html, yaml, toml, ini, css, jsx, mdx, latex, rst, org, wiki, textile, text, markdown
# Examples
lambda convert input.json -t yaml -o output.yaml
lambda convert doc.md -t html -o doc.html
lambda convert formula.tex -t html -o formula.html --full-document
lambda convert data.xml -f xml -t json -o data.json
layout — HTML/CSS Layout AnalysisRun the CSS layout engine and output the computed layout tree.
lambda layout <file> [options]
| Flag | Description | Default |
|---|---|---|
-o, --output | Output file | stdout |
-vw | Viewport width (px) | 1200 |
-vh | Viewport height (px) | 800 |
-c, --css | External CSS file | |
--summary | Print summary statistics |
# Examples
lambda layout page.html
lambda layout page.html -vw 800 -vh 600
lambda layout *.html --output-dir results/ --summary
render — Render to Image or DocumentRender HTML, LaTeX, or diagrams to SVG, PDF, PNG, or JPEG.
lambda render <input> -o <output> [options]
| Flag | Description | Default |
|---|---|---|
-o, --output | Output file (required; format from extension) | |
-vw | Viewport width (px) | Auto-size |
-vh | Viewport height (px) | Auto-size |
-s, --scale | Zoom scale factor | 1.0 |
--pixel-ratio | Device pixel ratio (HiDPI) | 1.0 |
-t, --theme | Color theme for diagrams | zinc-dark |
Input formats: .html, .tex, .ls, .mmd (Mermaid), .d2, .dot/.gv (GraphViz)
Output formats: .svg, .pdf, .png, .jpg/.jpeg
Available themes: tokyo-night, nord, dracula, catppuccin-mocha, one-dark, github-dark, github-light, solarized-light, catppuccin-latte, zinc-dark, zinc-light, dark, light
# Examples
lambda render page.html -o output.svg
lambda render doc.tex -o doc.pdf
lambda render page.html -o screenshot.png -vw 1920 -vh 1080 --pixel-ratio 2.0
lambda render diagram.mmd -o diagram.svg -t github-dark
view — Interactive Document ViewerOpen a document in a native viewer window.
lambda view [document_file] [options]
Supported formats: .pdf, .html, .md, .tex, .ls, .xml, .rst, .wiki, .svg, .mmd, .d2, .dot, .png, .jpg, .gif, .json, .yaml, .toml, .txt, .csv, and more.
Also accepts HTTP/HTTPS URLs.
# Examples
lambda view # opens built-in demo
lambda view page.html
lambda view report.pdf
lambda view https://example.com
lambda view diagram.mmd
fetch — HTTP/HTTPS Downloadlambda fetch <url> [-o <file>] [-t <timeout_ms>] [-v]
# Examples
lambda fetch https://example.com/data.json
lambda fetch https://example.com/data.json -o data.json
lambda fetch https://api.example.com/endpoint -t 5000 -v
js — JavaScript Transpilerlambda js [file.js] [--document page.html]
# Examples
lambda js app.js
lambda js app.js --document index.html
Start with no arguments. Prompt is λ> (or > as fallback).
| Command | Description |
|---|---|
quit, q, exit | Exit the REPL |
help, h | Show help |
clear | Clear history |