lispex
v1.4.0
Published
Local CLI for the Lispex reference interpreter and Lispex Vouch artifact checks. Evaluates .lspx files, verifies receipts and bridge reports, and replays decision corpora; no codegen.
Maintainers
Readme
lispex
A local command-line runner for Lispex — a thin wrapper around the same WebAssembly reference interpreter the browser playground at lispex.com runs. Same core, same results: a program evaluates identically on the CLI and in the browser.
It is an interpreter and Lispex Vouch artifact checker only. Conversion to other languages, where available, is a separate commercial path and is not part of this reference CLI.
Install
npm install -g lispexUse
lispex run hello.lspx # evaluate a file, print its output
lispex hello.lspx # shorthand for "run"
echo '(+ 1 2 3)' | lispex # evaluate source from stdin
lispex verify receipt.json # check a CSK differential receipt artifact
lispex replay gallery --against 1.2.16
# compare a decision gallery against a version pin
lispex --version
lispex --helpExit code is 0 on success, 1 on an evaluation error or artifact mismatch,
and 2 on usage/I/O/JSON errors. Diagnostics (E3xx/W3xx,
recursion-limit, …) are written to stderr in the same format the playground
shows.
$ echo '(define (fact n) (if (= n 0) 1 (* n (fact (- n 1))))) (fact 100)' | lispex
93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000How it works
The CLI loads the wasm-pack (--target nodejs) glue and calls run_lispex(src),
which reads → normalizes → evaluates each top-level form and returns
{ output, diagnostics, ok }. It implements no evaluation of its own — the
WebAssembly module is the reference, so browser/local equivalence is preserved
for free (arbitrary-precision integers, call/cc, multiple values, the
deterministic numeric tower, and the wasm recursion bound all behave identically).
The verify and replay commands are the Lispex Vouch path. They do not load
the WebAssembly module or execute source. They perform offline
artifact-consistency checks over existing csk.differential-receipt/v0 JSON
receipts and decision gallery directories.
License
Apache-2.0
