Quickstart
Run your first Lion expression in under five minutes.
Installation
Add
@lionlang/core to your TypeScript or JavaScript project.Core Concepts
Understand the expression model, evaluation rules, and special forms.
Standard Library
Explore all built-in modules: number, string, array, object, and more.
Host Interop
Call JavaScript methods, construct classes, and bind functions from Lion.
API Reference
Full TypeScript API docs for
run, evaluate, schemas, and types.Why Lion?
Every program is valid JSON
Lion expressions serialize to JSON out of the box. Store programs in databases, send them over HTTP, or generate them from other systems — no custom serialization required.
Embed computation anywhere
Inject Lion into any JavaScript environment by passing a plain object as the environment. Mix native JS functions, class instances, and values with Lion’s evaluation model.
Safe, typed evaluation
Built on Effect, Lion’s evaluator tracks errors as typed values.
ArgumentMismatchError and InvalidFunctionCallError are first-class — no uncaught exceptions.A quick example
["number/add", 1, 2] is plain JSON — an array whose first element names a function and the remaining elements are arguments. Pass it to run with an environment and get back a typed Effect.
Lion is published as
@lionlang/core on npm. See Installation for package manager commands and peer dependency requirements.