Installation & CLI
Requirements
Section titled “Requirements”- Node.js 22+ (or Bun / Deno for executing compiled
.mjsoutput) - TypeScript compiler (
tsc) for building the compiler from source
The core SPL compiler and runtime have zero external npm dependencies.
Building from Source
Section titled “Building from Source”Clone the repository and build the compiler and test suite:
npm run buildnpm testRunning .splx Files
Section titled “Running .splx Files”Use the CLI via node dist/cli.js (or npm run spl -- ...):
# Type-check a file and all imported modulesnode dist/cli.js check examples/01_basics.splx
# Compile and run immediatelynode dist/cli.js run examples/01_basics.splx
# Compile to standalone ES Modules (.mjs)node dist/cli.js build examples/06_prompts_and_schemas.splx -o ./dist-spl
# Extract and print the compile-time JSON Schema for any exported typenode dist/cli.js schema examples/06_prompts_and_schemas.splx SecurityAuditVS Code Extension & Language Server
Section titled “VS Code Extension & Language Server”SPL ships with a zero-dependency JSON-RPC 2.0 Language Server (spl lsp) and a VS Code extension providing .splx syntax highlighting, live diagnostics, hover docs (including live JSON Schema previews), named-argument completions, signature help, go-to-definition, and document symbols.
# Install the VS Code extension into ~/.vscode/extensionsnpm run vscode:install
# Uninstall later if needednpm run vscode:uninstallReload your VS Code window after installing (Developer: Reload Window).