Learn

Contents

Command reference

Everything the elucid8 command does, and the files it reads and writes. To learn it step by step, start with the Deploy tutorial; to call it from Python, JavaScript or the shell, see Using eLucid8 from your code.

A deployment is a folder holding:

Commands

elucid8 run [program.el8|plan.json] [--config deploy.json | --no-config] [--query 'value[…]']... [--output name]... [--rows 'd = a..b, …'] [--out file] [--format jsonl|csv|frame|npz|arrow|parquet|zarr|vega-lite] [--timestamps | --no-timestamps] [--report file [--explain]] [--why file] [--threads N] [--spreadsheet] [--csv-words | --triple] [--allow-outside] [--allow-programs] [--session DIR] [--memory SIZE|none] [--time DURATION|none]
elucid8 check [program.el8|plan.json] [--config deploy.json | --no-config] [--query …]... [--output name]... [--rows …] [--write-config [FILE]] [--force] [--explain [--json]] [--compare-plans[=N]] [--allow-outside] [--allow-programs] [--session DIR]
elucid8 info [program.el8|plan.json] [--json]
elucid8 serve [program.el8|plan.json] [--config deploy.json | --no-config] [--cache-bytes N] [--threads N] [--http HOST:PORT] [--token-file FILE] [--state DIR [--state-fsync]] [--no-player] [--allow-outside] [--allow-programs] [--memory SIZE|none] [--time DURATION|none]
elucid8 mcp [--dir DIR] [--serve-url URL]... [--token-env NAME] [--http HOST:PORT [--token-file FILE]]
elucid8 mcp install claude-desktop [--dir DIR] [--yes] [--dry-run]
elucid8 repl <URL> [--token-file FILE] [--no-open]
elucid8 window [program.el8|plan.json] [--config deploy.json] [--tick DURATION] [--threads N] [--cache-bytes N] [--allow-programs] [--allow-outside] [--record DIR]
elucid8 playground [--dir DIR] [--threads N] [--program DIR]
elucid8 playground --source DIR
elucid8 gallery [--dir DIR] [--program DIR]
elucid8 gallery --list | --source DIR
elucid8 key set [--no-check] | forget | status
elucid8 key limits [--session USD] [--day USD] [--model NAME]
elucid8 compile [program.el8] [-o plan.json] [--compact]
elucid8 init [DIR] [--from PATH]... [--connector JSON]... [--no-inputs] [--output SPEC]... [--no-outputs] [--yes] [--json] [--rows N] [--allow-programs]
elucid8 init <program.el8> [--yes]
elucid8 guide [--short]
elucid8 schema [--window | --settings]
elucid8 --version
elucid8 help [run|check|info|serve|mcp|repl|window|playground|gallery|key|compile|init|guide|schema]

The program, --config and --no-config may be left out from 0.22.0 (the folder's program.el8 and deploy.json are used); 0.21.0 needs the program named, and the configuration given with --config.

Results go to standard output (or to the file --out names); messages go to standard error, warnings among them (a line starting warning:).

The program and configuration in the folder (from 0.22.0). run, check, info and serve with no program named use program.el8 in the current folder (compiled, so an edited program never runs from a stale plan), else plan.json, else they say that neither is there (exit code 2). With no --config, run, check and serve use the deploy.json beside the program, if there is one; --no-config uses none. Naming them chooses others (elucid8 run myplan.json --config mydeploy.json). What was found rather than named is said on standard error, one line: elucid8 run: using program.el8 and deploy.json.

elucid8 run

Computes the queries (those given with --query, else the configuration's), demanding only what each point needs, and writes the results: one line per point, one frame per query, or one query's frame as a NumPy or Arrow file (see Output formats). Then it writes the configuration's outputs: records over a box, a column per dimension and per value, each to its file or program. Then it stops.

./elucid8 run plan.json --config deploy.json
./elucid8 run plan.json --config deploy.json --query 'running[t = 4..5]' --query 'ratio[t = 3]' --format csv

What it computes: with neither --query nor --output, the configuration's queries and every output; with --query, only those queries; with --output (for example --output training_rows), only those outputs (and the queries given with --query, if any).

elucid8 check

Reads the plan, the configuration and every data file it names (asking each program that serves an input for its rows), and checks every binding, query and output, without computing anything. When the deployment can do more than read its data files and write its outputs, it first lists what (Programs need your permission); then it prints a summary (each file, its number of points and its version) or every problem it found, with exit code 3:

plan.json: plan version 26, 1 input, 0 outputs
input "x": data/x.csv (CSV), stored, version d20b5fc4a3d402cb; over t (whole numbers; 6 rows); a missing point is missing data (eod past the last row along t)
  columns: t (coordinate), value (value)
ok

Under each stored input, columns: lists the columns of its file (the fields of a JSON-lines file, the schema of a Parquet or Arrow file) and what each is read as: coordinate (of the dimension named after it, or coordinate t when columns maps it to t), value, timestamps (named by the entry's time, or assumed from the name for a column ts or <input>_ts), kinds, read with the value and errors (an Arrow or Parquet file's <input>_kind and <input>_error), or ignored (ignored: "time": "none" for a column ts under "time": "none"). A file read wide shows each value column's coordinate (north (value at zone = "north")); what comes from no column follows (t from each row's position, timestamps by coordinate along tick). An input bound by convention says so: x.csv (CSV, found beside the program).

Expectations. From 0.26.0. Then check computes the program's -- expect NAME[d = c, …] = OUTCOME lines (-- expect NAME = OUTCOME for a value with no dimensions), the outcome written as the playground prints it (a number to six significant digits, a text in double quotes, true, eod, Error: …), with , at time N ms after it when its timestamp is not 0. An input with a -- table NAME = ROW; ROW; … line (a CSV table, each ; a new line; -- fill NAME = V and -- ragged NAME as the entry's fill and ragged) reads its table; the others read the configuration; with no configuration, check reads every input that has a table from it. Each line that does not hold is written to standard error, program.el8:12: expectation failed: running[t = 4]: expected 25, got 24, then a count on standard output, 3 expectations hold or 1 of 3 expectations does not hold, with exit code 5. A line that cannot be read or asked (a range, a dimension left out, a value the program does not define) gives exit code 3; one whose computing stops with a program error, exit code 1. The documents' other forms (-- expect compile error:, warning:, output) are noted and not run.

--write-config [FILE] saves what check decides as a complete deploy.json (format elucid8-deploy/2, for a program with input and output), then checks it. Every input the program reads has its entry: the configuration's own, kept as written, or the file found by its name (Inputs by convention). An input read from a data file gets the lines the readers assume: "value": "value" when the file has that column (or "value": "x_value"), "time": "ts" for a column ts (or x_ts) that is no dimension's, and, for a CSV file whose fields are separated by ;, a tab or |, its "separator" (and "decimal": "," where its numbers have decimal commas), which it cannot be read without. Markers of missing data the file seems to use (-200, N/A) and numbers written in quotes would change the answers, so they are not written: check names them under the input, with the line to add. An input answered on demand gets the kind of each dimension that another input's data decides ("kinds": {"amount": "number"}). Each output channel gets its file and format ("to": "total.csv", "format": "csv"). Beside the file, each line it added is printed with what it means, in the words columns: uses:

wrote deploy.json
  inputs.readings.from: "readings.csv": the file named after the input, found beside the program
  inputs.readings.value: "value": the column value, by its name
  inputs.readings.time: "ts": the column ts, timestamps, assumed from the name ("time": "none" reads it as an ordinary column)
  outputs.total.to: "total.csv": the file named after the channel, the default
  outputs.total.format: "csv": from the file's name

The file is in a fixed order (format, inputs in the program's order, outputs, then the other sections) and each entry's fields in a fixed order, so writing it again from itself gives the same bytes. It gives the same answers as the configuration it was written from. Without FILE it writes deploy.json beside the program (with --config, beside the configuration); FILE must be in that folder, where the names of its files are relative. An existing file is replaced only with --force (with --config and --force and no FILE, the configuration itself). What cannot be decided (an input nothing binds, a dimension of an input answered on demand whose kind neither the program nor any input's data says) is left out of the file and named on standard error with the line to add, and check exits with code 3. A message from check that names a missing line gives the entry with the line in it, to paste.

Under each input read from a data file, check says what each column is read as (columns: t (coordinate), value (value), ts (timestamps, assumed from the name), note (ignored)), and how the file is written where its entry says so (fields separated by ;, decimal commas, every field quoted and read as unquoted, the markers read as missing data). It warns, with the line to add, where a column of numbers holds numbers written in quotes ("quoted": "read") or a marker the entry does not list ("absent": [-200]).

A query or an output that leaves out a dimension of its value (below) is refused, with exit code 3: it is a mistake in the question, not data. So is a file that lacks a dimension's column, or a file for an input with no dimensions that holds other than one value (What a file lacks).

What the engine chooses: --explain

From 0.24.0. elucid8 check --explain checks the deployment as above, then computes its queries and outputs as elucid8 run would, writing nothing, and says for each value of the program how the engine computes it and over which region:

For a value that runs per element, or that has elements the loop could not give exactly, the reason is in plain words, from this list:

The reasons come from where the engine decides, so they say what stopped it from compiling that value: a value that reads one which runs per element runs per element too, and says which (“reads a value that runs per element: total”). For this program, with x.csv holding t = 0, 1, 2, 4 and 5 (no row at t = 3):

x = input("x", t : 6)
running = x fby.t (running + next.t x)
twice = x * 2
total = sum x over (t) end
share = twice / total
checked = x assert x < 100
output("running") = running
output("share") = share
output("checked") = checked

Open in playground

explain: how each value is computed (the queries and outputs computed, nothing written)
  running: element levels along t (an iteration the compiler's level kernels do not support: running reads running other than at the same t or one step back through fby.t); computed: 6 element levels kept, 6 elements computed one at a time over t = 0..5
    class: iteration of 1 variable (scalar) along t · body neighbourhood · edges, past the last row
  twice: box region; computed: 6 elements per element, read one at a time by values that run per element
    class: flat · body pointwise
  total: per element (a region over the coordinates the data lists); computed: 1 element per element
    class: flat · body aggregate (over the data's coordinates)
  share: per element (reads a value that runs per element: total); computed: 6 elements per element
    class: flat · body pointwise · can fail
  checked: per element (assert); computed: 6 elements per element
    class: flat · body pointwise · can fail

Each value's class: line says what kind of equation it is, read from the program alone: its shape (flat, or an iteration: iteration of 1 variable (field 8 × 8) along t, iteration of 3 variables (2 fields 20 × 40, 1 scalar) along t, from the values that are defined from each other), its body, the strongest operation in its equation (pointwise, neighbourhood, aggregate (fixed, moving, over the data's coordinates, or filtered), choice by time, filter along a dimension, run-time control (a read at a computed position, or a conditional whose branches read different values), effect), any weaker ones as secondary, what it can produce on its own besides values (can fail: a division, assert or a function with a limited domain; edges: reads beside its point, which can fall off a region; past the last row: reads ahead along a dimension the program iterates along), and the guards that turn those back into values (iseod, iserror, skip eod, skip missing). The class decides nothing; it is how the engine's measured costs are organised.

What computed counts is every query and output together: an element read by a value that runs per element is computed per element too (twice above, read by share). When a loop computes a value but some of its elements are not values it can give exactly, those elements are computed per element and said so (189 elements per element, 189 of them not given exactly by the loop, for 25 ticks of the sensor field's alert, whose faulty readings are errors). note: lines say what the engine found while computing (“levels of about one element”: an iteration whose steps hold about one element each, computed per element, which is faster there). --json prints the same as JSON, a list of {"value", "plan", "why", "detail", "computed": {"box", "levels", "sharedTiles", "elementLevels": {"runs", "elements", "region"}, "perElement", "notGivenByLoops"}, "notes", "class": {"shape", "members", "along", "widths", "body", "secondary", "properties", "guards", "line"}}; elucid8 run --report FILE --explain puts the same list in the report as strategies, and it is the same list check --explain --json prints: both compute the deployment the same way (an output's values side by side, sharing what their loops compute, as run writes them), and the report is what that computation chose and did. --explain computes everything the deployment asks, so it takes as long as run; give --query or --output to explain part of it. Without --explain, nothing is collected and nothing is slower.

Checking that the engine's choices change no answer: --compare-plans

From 0.25.0. elucid8 check --compare-plans computes the deployment's queries and outputs as --explain does, writing nothing, several times: with the strategies the engine chooses, with every value computed per element, and with three plans drawn at random from those the engine could have chosen (--compare-plans=N for N of them; each plan is drawn from a seed, 1, 2, 3 by default, or from ELUCID8_PLAN_SEED on, and is said with what it changed). Each is computed at the configured number of threads and at one thread. It compares everything they give, byte for byte: every answer with its timestamp (and an error's chain to where it started), every record of every output and how many were written, each query's and output's program error, warnings and missing points left out (skippedMissing), and every service call (its service, value, context, attempt and result). It says which plans gave the same and shows the first difference of any that did not, with exit code 3: a difference is a fault in the engine, never in the program.

compare plans: 0 answers and 24 records, under the chosen plan at 18 threads (the reference)
  the chosen plan, 1 thread: the same
  all per element, 18 threads: the same
  …
  random plan (seed 3) (box regions off: half), 1 thread: the same
compare plans: all 9 gave the same

Only a resource limit may differ: every value per element may reach the demand depth limit on a history that the chosen plan computes by levels, and that is said rather than counted as a difference. Statistics and times are not compared. ELUCID8_PLAN=fixed makes the engine choose its plan from the program and the options alone (it does today in any case). It computes the deployment once per plan and thread count, so it takes that many times as long as run.

Why an answer is what it is: --why

From 0.26.0. elucid8 run --why FILE writes, beside the answers, why each of the query's answers is what it is: for each point asked for, the tree of every value its answer was computed from, as the playground's Why? shows it. Each node gives the value and its point (ref), how its outcome was obtained (how: computed; memoized for a value already computed in this query, cache-hit for one kept from an earlier query; source-read for data read from an input, source-memo and source-cache for data read before; vectorised for a step of an iteration computed together; called and replayed for a service's answer, asked or reused), its outcome, and the values it read, in the order it read them (children). Follow an error down the tree to the point where it started, or an unexpected number to the data it was computed from.

./elucid8 run plan.json --config deploy.json --query 'running[t = 1]' --why why.json

why.json is one JSON document, here laid out over lines: running at t = 1 is 4, computed from running at t = 0 (3, computed from x at t = 0) and x at t = 1.

{"name": "running", "trace": [
  {"ref": {"name": "running", "context": {"t": 1}}, "how": "computed", "outcome": {"kind": "value", "value": 4, "ts": 0}, "children": [
    {"ref": {"name": "running", "context": {"t": 0}}, "how": "computed", "outcome": {"kind": "value", "value": 3, "ts": 0}, "children": [
      {"ref": {"name": "x", "context": {"t": 0}}, "how": "source-read", "outcome": {"kind": "value", "value": 3, "ts": 0}, "children": []}]},
    {"ref": {"name": "x", "context": {"t": 1}}, "how": "source-read", "outcome": {"kind": "value", "value": 1, "ts": 0}, "children": []}]}]}

trace holds one tree per point of the query, in the query's order. A query that stopped (the demand depth limit, say) gives programError instead. The trees hold at most 1,000,000 values; past that, traceCut gives the number left out. The file holds one query: with several, put {n} (the query's number, from 1) or {name} (its value's name) in the file's name (--why why-{n}.json). A run with no query (outputs only) is refused. The answers are the same with --why; the query is computed the way the playground computes it, value by value, so it can take longer, and its trees grow with every value it computes: ask about a few points.

elucid8 init

Starts a deployment from its data: elucid8 init [DIR] reads the data files there (or those --from names, or a connector), proposes how each is read, asks what comes out where (--yes takes every proposal), and writes deploy.json, a starting program.el8, bindings.json and README.txt. It proposes how a file written by another tool is read (A file written by another tool): its separator and decimal commas, a file whose every field is quoted ("quoted": "read"), markers of missing data ("absent"), and the format of dates and times, also a time written in two columns (Dates and times written another way). It writes nothing when the deployment it would write is refused, and says why. A column with no name in the header is left out, and said.

Each output is asked as NAME, NAME:DIM,DIM (its dimensions) or NAME=FILE (also --output SPEC), and, from 0.22.0, how its file is written, as its entry in deploy.json says it: wide=DIM, row=DIM or skip=eod after a space (--output 'all:t,quantity=all.csv wide=quantity skip=eod'; see An output written wide). The same fields go with an output given to the MCP tool write_deployment.

elucid8 init program.el8 starts from a program instead. It binds each input the program reads to a data file in the program's folder: the file named after it, else the one file whose columns hold the input's dimensions. It asks only what it cannot work out: a file or a provider for an input with none (a file's name, sum_service, or a from as JSON; Enter leaves it out), and the kind of a dimension of an input answered on demand that no data decides. Then it writes deploy.json beside the program as check --write-config writes it (starting from the deploy.json there, if any), runs elucid8 check and asks the first points. With --yes it asks nothing: an input with no file is left out (and named), and a kind no data decides is "number".

$ elucid8 init p.el8
p.el8 reads 3 inputs and writes 2 output channels.
input x: x.csv (named after it)
input w: weather.csv (its columns hold day, site)

input m (over amount) has no file beside the program.
Its data: a file, sum_service, a from as JSON ({"builtin": "simulated", …}), or Enter to leave it out> sum_service

elucid8 info

From 0.23.0, with a configuration (--config, or the deploy.json beside the program), info --json also gives capabilities: what the deployment can start and where it writes (startsPrograms, programs with each command, role and env names, connectors, writesOutside, listens, and the hash that .elucid8-allowed records), the list check prints.

Lists what a plan declares and what a configuration must give an entry for: its dimensions (each with the kind of coordinates it holds: whole numbers, texts, or as the data decides), its inputs as the program writes them (x = input("x", t : 6)), its output channels with their rows, its values with the dimensions each varies along (running over (t)), and the compiler's warnings, if the plan has any (each read of a coordinate its context does not supply, with its line and column in the program). --json prints the same as one JSON object, for programs (the warnings as warnings, only when there are any).

elucid8 serve

Keeps the deployment loaded and answers queries sent as JSON lines on its standard input, one at a time, reusing what earlier queries computed, while new data arrives (new versions of inputs). Subscriptions are queries it answers again whenever the data they read changes. --cache-bytes N sets a memory budget for its caches (256M, 1G, or a number of bytes). Every answer is what a fresh run of the same query gives. With --http HOST:PORT it also answers over HTTP, from several clients (Over HTTP). The long-running service describes it in full.

elucid8 mcp

From release 0.18.0.

Speaks the Model Context Protocol (MCP) on its standard input and output, so that an AI assistant (Claude Desktop, Claude Code, Cursor) can compile, check and run programs on your machine: its tools compile, check, run, query, advance, stats and explain give what the commands on this page give (and, from 0.19.0, show opens the eLucid8 Player in your browser on a program's values, starting elucid8 serve on this machine), its resources are the reference for AI tools and this page, and its prompt write_program writes a program from a description and compiles it until the compiler accepts it. From 0.20.0, propose_bindings and write_deployment (and the prompt start_program) start a deployment from its data, as elucid8 init does. Configure it in the assistant as the command elucid8 mcp (for Claude Code, claude mcp add elucid8 -- elucid8 mcp). It compiles with the compiler in the command, offline (from 0.19.0; with 0.18.0, with the site's compile endpoint, or the compiler ELUCID8_COMPILER names); reads only the files a tool is given; and writes only temporary files, which it removes. Using eLucid8 with AI coding agents says how to configure each assistant, and shows a conversation. From 0.19.0, --http HOST:PORT serves the same over MCP's Streamable HTTP transport, at /mcp, for assistants that add servers by address: only on a loopback address unless --token-file FILE names a bearer token (Over HTTP).

From 0.26.0. check takes the program as text (program), with its inputs by channel as run takes them (inputs: files in the server's folder, or small inline tables), so an assistant whose files the server cannot see still gets check's answer and, with explain, how many elements of each value its queries computed (for the playground's Mandelbrot example, 123 for the one pixel n_steps[k = 30, x = 92, y = 103] and 4,460,928 for the whole grid n_steps[k = 30, x = 0..191, y = 0..191]). show opens a value over a dimension it iterates along (k) and two others (x, y) as a picture of x across and y down at k's last step, paused, with a slider; play: true plays from the first step, play: "k" plays along k, and at: { "k": 12 } fixes k at 12 (any dimension may be fixed; none that is fixed is played). A tool's arguments that it cannot take are refused with what to write instead. The tools carry MCP's annotations: language_reference, command_reference, compile, explain, query and stats are marked read-only; check, propose_bindings, run, show, advance, write_deployment and save_program are not (check and propose_bindings can start a program or connector that reads a deployment's input, once you have allowed it), and only write_deployment and save_program, which replace files in your folder, are marked destructive. When a tool's result is an error, the server's log (its standard error, which Claude Desktop keeps in mcp-server-elucid8.log) says why: an argument it could not take, a compile error by its line and column, or the command's exit code, never the program's text or its data.

From 0.26.0. elucid8 mcp install claude-desktop adds eLucid8 to Claude Desktop's settings, so that nobody has to edit them by hand: on macOS ~/Library/Application Support/Claude/claude_desktop_config.json, on Windows %APPDATA%\Claude\claude_desktop_config.json (Claude Desktop runs on those two only, and elsewhere the command says so and changes nothing). It adds, or replaces, only the entry mcpServers.elucid8, as { "command": "<this elucid8's full path>", "args": ["mcp", "--dir", "<folder>"] } (the bundled command's path when it is run as python3 -m elucid8 or through the Python package's elucid8), and keeps every other setting and the file's layout as they are. It shows what it will change and asks before writing (--yes writes without asking, --dry-run only shows); it makes the file if there is none, and first copies an existing one beside itself (claude_desktop_config.json.bak-20261115-161015Z, the time in UTC). A file that is not valid JSON is never overwritten: the command says where it is broken (not valid JSON at line 4, column 3) and writes nothing. The folder is where the tools read and write files (--dir of elucid8 mcp): elucid8 in your home folder unless --dir PATH names another, made if missing (the command says which, and makes it only when it writes the settings). Run again with the same folder, it says that the settings already run this elucid8, and changes nothing; with another folder, it replaces the entry. Then quit Claude Desktop completely and open it again, and choose "Always allow" when Claude first asks to use an eLucid8 tool.

elucid8 repl

A prompt for asking a running elucid8 serve --http at URL (for example http://127.0.0.1:8080) for values, in the language's notation (total[t = last]), with plain answers: one point's value, or a line per point naming its coordinates; eod as eod, an Error in words. watch QUERY prints the points that change as data arrives, until Ctrl-C; show QUERY opens the eLucid8 Player on the query; spark QUERY draws a row as a sparkline or a small grid as shaded blocks; describe, stats, help and quit. Piped, it reads one query a line, with no prompt. It only asks, through the service's public HTTP endpoints, and starts no service. --token-file FILE names the file holding the service's token (else ELUCID8_SERVE_TOKEN); --no-open prints show's link without opening it. From a terminal has a session.

elucid8 window

From 0.23.0.

Programs in a window teaches how to write a program for a window, step by step; this section and the next give every option, part and field. The window is drawn by the system's web view: WebKit on macOS and on Linux's desktop build, Microsoft's WebView2 Runtime on Windows (part of Windows 11; where it is missing, the window prints one line saying so, with the address of Microsoft's page for it, and exits with code 3).

Opens the window that deploy.json's "window" section describes (below): a tree of nodes, every property a constant or a value of the program, each value at its newest turn, redrawn when an input changes. A picture shows a value over its across and up dimensions (as the Player lays it out: the second dimension runs up from the bottom, as in a plot; a text's lines run down), at the newest coordinate of the dimension it plays along, in the Player's colours. The deployment is loaded as elucid8 serve loads it, in this one process: no HTTP. Without a "window" section, elucid8 window says to give one.

The section's "input" names the input the window's events go to (NAME below). The pointer over a plot is sent to it as the Player's link with input=NAME sends it: a press, a move to another cell while pressed, and a release, each a turn of NAME with a row for each field it lists (the picture's across and up coordinates; kind: "press", "move", "release"; shown: the coordinate shown along the dimension played). Declare the input as pen = input("pen", t : inf, f : {"x", "y", "kind"}). The events that arrive while a frame is computed go together, as one advance, each its own turn. An input that lists neither the across nor the up field (keys = input("keys", t : inf, f : {"kind", "key", "cmd"})) takes only keys, text typed and ticks: the pointer sends it nothing, and its other events carry no cell.

An input whose fields include key is also sent the keys pressed in the window: each key one more turn of the input, with kind "key" and key the key's name, as a browser's KeyboardEvent.key names it ("c", "C", "Escape", "ArrowLeft", "Enter", " " for the space bar), and the cell the pointer is over (x and y; off the picture, the cell it was over last). A key held down is one event (its repeats are not sent); a modifier alone (Shift, Alt) is none. What a key means is the program's: key = pen[f = "key"], then for example clear = kind == "key" and key == "c". Declare the input as pen = input("pen", t : inf, f : {"x", "y", "kind", "key"}).

The section's "tick" ("30ms", "0.1s", or a number of milliseconds; --tick DURATION overrides it) also sends the input a turn every DURATION, with kind "tick", the modifiers held (each field listed) and the cell the pointer was over last, pressed or not, so a program can move by itself and follow the pointer, for example a rocket that turns towards the pointer and moves a little each tick. Ticks start when the window opens: until the pointer has been over the picture a tick carries the picture's first cell (the first coordinate along each axis: 0, 0 for a picture from 0), and after that the cell it was over last. One that comes late is sent once, and the next is due a whole period after it. The input must list kind.

Some keys are the window's and are never sent: Ctrl-C ends the window, as Cmd-Q and Cmd-W do on macOS; any other key with Ctrl or Cmd held does nothing. Cmd-+ and Cmd-− (Ctrl-+ and Ctrl-− on Windows and Linux) make its text, controls and layout larger or smaller, in steps from 80% to 250% (80, 90, 100, 110, 125, 150, 175, 200 and 250%), and Cmd-0 (Ctrl-0) goes back to 100%; the window keeps its size and its layout fits the window it has, each fitted picture at most the size it has at 100% in that window, smaller only so that the controls beside or below it stay in the window (never below its minWidth and minHeight, which are in the window's pixels whatever the text size), and the size is remembered for your next window, which opens at a size that holds it, all of it on the screen. Only you resize the window. For an input that lists key, Escape and Enter are sent like any other key; for one that does not, Enter clicks the cell under the pointer (as in the Player) and other keys do nothing.

An input may also list these fields; each is sent with every event (pointer and keys) only when the input lists it, so an input that lists none of them gets the rows above and nothing more:

fieldvaluemeaning
shift, alt, ctrl, metatrue or falsethe modifiers held at the event: alt is Option on macOS; meta is Command on macOS and the Windows key elsewhere
cmdtrue or falsethe platform's command modifier: Command on macOS, Ctrl on Windows and Linux, so that cmd and key == "z" undoes on every system
repeattrue or falsewith a key's turn: true for a system repeat of a key held down

A row of one reads as a boolean: 5,"shift",true. With a modifier listed, key is the key with no modifier applied: "z" for Shift-Cmd-Z, "1" for Shift-Ctrl-1, "o" for Option-o. With cmd, ctrl or meta listed, keys with Ctrl or Cmd held reach the program too (Ctrl-C, Cmd-Q and Cmd-W still end the window). With repeat listed, each repeat of a held key is its own turn, none dropped: repeats that arrive while a frame is computed go together in the next advance, each its own turn. For example pen = input("pen", t : inf, f : {"x", "y", "kind", "key", "shift", "cmd"}), then undo = kind == "key" and key == "z" and cmd == true, and a Shift-drag can draw differently (shift == true).

Every field, every event. Each event the window sends (elucid8 window, and the Player for the same input) gives every field its input lists, so no point of an event is missing. A field the event does not concern comes as the empty text (kind, key, node, next, prev, text, error), false (shift, alt, ctrl, meta, cmd, repeat, takes) or 0 (length, code, shown, item, value, and a view's scroll, left, rows, cols, dy, dx); a cell (x, y, a text's line and col) the one the pointer was over last, or the picture's first cell before it has been over it; shown the tick shown last. Before the first event the input has no row at all, so along its turns (declared inf) it is eod at that turn (the window's first frame asks it). A field the window gives no meaning to (one no node sends) is not sent.

A text node's "chars": NAME names a second input, the characters typed into it: declare it as chars = input("chars", t : inf, i : inf) (a turn, and an index from 0). A key that types text with neither Ctrl nor Cmd held, and no control character, is then one turn of the events input with kind "typed", length the number of characters it typed, code the first one's code point (97 for a, 65 for Shift-a, 248 for Option-o, 32 for the space bar) and text the text, each when listed; and its characters' code points are rows of NAME at that turn (7,0,248: the turn, the index, the code point, in that order, so the input's file has the header t,i,value), sent in the same advance as the turn's event, so no frame sees one without the other. Every other key is kind "key", among them Enter and Tab (never code 10 or 9) and every key with Ctrl or Cmd held, named with no modifier applied; one key press is one turn, never both. With chars, keys with Ctrl or Cmd held and repeats are always sent, and Ctrl-C in the window is the program's (on Windows and Linux it is Copy); Cmd-Q and Cmd-W, Ctrl-C in the terminal, SIGTERM and closing the window still end it. The events input must list kind. chars and a tick may be taken together: text typed is kind "typed", a tick kind "tick". Input methods and dead keys are not sent yet. The platform's paste key (Cmd-V on macOS, Ctrl-V elsewhere, with Shift or not, without Option or Alt) is kind "paste" with key "v", the modifiers held, and the clipboard's text attached: length its number of characters and text the text, when listed, and its code points as rows of the focused text's characters input at that turn, as for text typed; each line break is one code 10 (\r\n and a lone \r too), an empty clipboard has length 0 and no characters, and past 1,000,000 characters nothing is attached (length 0; standard error says why). The clipboard is read only at that key, never otherwise; a script's paste TEXT step (\n, \r, \t and \\ written so) pastes TEXT, and its paste key an empty clipboard.

In the folder of the Player's drawing example (program.el8 and its deploy.json):

elucid8 window program.el8

Closing the window, Ctrl-C (in the window or the terminal) or SIGTERM end it. The value must have a bound along its across and up dimensions (restrict canvas to (x : 512, y : 384) end). On Linux the window opens with the desktop build, from the Download page or in the Python package on glibc (pip install elucid8), which needs glibc 2.35 or later (Ubuntu 22.04, Debian 12, Fedora 36 and newer) and WebKitGTK 4.1 (sudo apt install libwebkit2gtk-4.1-0 on Debian and Ubuntu, webkit2gtk4.1 on Fedora, webkit2gtk-4.1 on Arch); the static build cannot load the libraries a window needs, and there elucid8 window says so.

--record DIR keeps the session: the folder (new, empty, or an earlier session's, which it replaces) gets session.json ("format": "elucid8-session/1"), a CSV file for each input the window feeds (its rows, each with its event's time) and rows.tsv (every row in the order sent). elucid8 run program.el8 --session DIR --query … then answers as the window did. Testing an app without a screen shows how to run a window with no screen at all.

A window of several nodes: the window section

elucid8 window program.el8 lays out the tree that deploy.json's "window" section describes: containers (row, column, grid, overlay, scroll) and leaves (plot, text, label, button, radio, checkbox, slider, choice), each an object with its kind as a key:

"window": {
  "title": "drawing", "input": "pen", "focus": "{focus}",
  "column": [
    { "row": [
        { "column": [
            { "radio": "{tool}", "items": [["pen", 1], ["rectangle", 2]] },
            { "slider": "{pen_size}", "min": 1, "max": 9, "step": 1 },
            { "checkbox": "{grid_on}", "label": "Grid" },
            { "button": "Clear", "id": "clear" }
          ], "width": "160px" },
        { "plot": "{canvas}", "scale": "fit", "grow": 1 }
      ], "grow": 1 },
    { "label": "{strokes} strokes", "input": null }
  ]
}

Every property is a constant or a value of the program written in braces, "{name}"; any other string is literal text ("show": "{map_on}", "scroll": "{first_line}"; a label is a template, "label": "{n} lines"). A scroll container holds one node under its key ({ "scroll": { "column": […] }, "position": "{page_top}" }) and shows it from "position" and "left", its first pixel row and column shown. A text's "scroll" and "left" are its first line and column shown, as a plot's are its first row and column shown, and its "top" the value its set has, which "palette" "classic", "viridis" and the reserved loops draw black ("top": "{steps}"). A value is asked at its newest turn; properties are asked in one request after each step, only those whose inputs moved. A property may be over the dimensions events play along, never over a dimension of texts. A node's size is width and height ("160px", a number of cells for a text, or a value), min… and max…, and grow; containers take gap and align; a row or column takes direction, a value whose text, "row" or "column", lays its children out across or down at each turn (any other value keeps the direction its key says), so a window can put two columns side by side when it is wide and one above the other when it is narrow ("direction": "{main_dir}" with main_dir = if wide then "row" else "column"); any node takes show, enabled, id and input. The window takes title (a template), input (where events go unless a node names another; null: none), focus (the value saying which node, by id, keys go to; without it, the first node that takes focus), view (an input for the wheel and resizes; with each change of the text size each text's lines and columns that fit are sent to it again, kind "resize"), textSize (a value of the program, in percent: when it changes the window takes it as its text size, the nearest of the steps Cmd-+ and Cmd-− go through; its value when the window opens, and eod, change nothing; any input that lists the field textSize is sent the window's text size, in percent, with every event) and padding (the margin between the window's edge and its content, in logical pixels, 12 by default, 0 allowed; on macOS the margin is widened where a label or control would sit in a rounded corner's curve) and tick ("30ms": a turn with kind "tick" sent to the window's input this often from when the window opens, as --tick sends one, which overrides it; with the modifiers held and, once the pointer has been over a picture taking that input, the cell of it the pointer was over last, its node that picture; before that, no cell and no node; the input must list kind). size ([1280, 800], logical pixels at 100%) is the size a window opens at when the screen has room, grown with the text size and never below the window's natural size. view is also sent a text's lines and columns whenever they change because the window laid itself out again (a value's show, a size), in the window. A plot's scale is a number of logical pixels a cell, or "fit": the largest whole number of the screen's pixels a cell that fits the picture's rectangle (at least one), centred there (with "align": "start", at the top of its rectangle and centred across, the spare height below it, so that it sits right under the controls above it; with "end", at the bottom), chosen again whenever the window is resized; a picture that grows and gives no scale is fitted. A window with a fitted plot opens with each fitted plot at most 576 × 384 logical pixels, and is no smaller than every control at its size with the fitted pictures at a pixel a cell. A plot's colours are constants of the deployment: "colors" maps values as written in the data ("0", "2.5", "true", "false", a text, "eod", "error") to colours ("#rrggbb" or "#rgb"), {"colors": {"0": "#fafaf8", "1": "#203478"}}, and a cell whose value is not listed keeps the window's scale (numbers from a pale to a strong accent over the picture's range, booleans, texts, eod and errors in colours of their own). For smooth amounts "colors" may be a gradient, {"gradient": [[0, "#1b1b1f"], [0.5, "#4f8cff"], [1, "#ffffff"]]}: colours at values in ascending order, blended linearly in Oklab (so equal steps of value look like equal steps of colour), clamped beyond the first and last stops; with "domain": "data" the stops are stretched over the numbers the picture shows now, else they are at their values; "values" beside a gradient lists colours for single values. "colorsDark" (the same form) gives the dark theme's; values it does not list keep their "colors". A plot's "palette" names the scale its numbers are drawn on, the same as the playground's and the Player's Colours menu: "single" (the window's scale, the default), "classic" (deep blue, white, gold and near black, cycling over the square root of the value; the greatest number shown is black), "viridis" (dark purple to yellow over the numbers shown) or "diverging" (blue below 0, red above, from −M to +M where M is the largest magnitude shown; white at 0 in light, dark grey in dark); numbers "colors" lists keep their colours, and a gradient in "colors" and a palette are not given together; "fire", "ocean", "twilight" and "earth" are reserved. Error cells are hatched (thin lines in the window's colour over their red) once a cell is 6 pixels or more, and every picture has a 1-pixel frame round its cells. check prints each picture's colours and refuses, with the place (window.row[0].colors.3), a colour or stop that does not parse or stops out of order; check --write-config keeps them. A label takes "style": "heading" (semibold, with space above) or "muted" (smaller, in a lighter colour); a column of controls is drawn as a panel (its own surface, 16 pixels inside its edge), which "panel": false turns off and "panel": true turns on for any row or column. The focused control shows a ring only after Tab has moved the focus; a press hides it. In the window, what does not fit scrolls: a container given a height scrolls what does not fit in it, the window itself scrolls when its content is larger, and the focused node and a text's cursor are scrolled into sight; a text that says how many lines its document has shows a scroll bar when they do not all fit, and lets the wheel scroll what holds it when they do.

Each event is a turn of its input, one row per field the input lists, with node the id of the node it happened on (a node's id is its id, else the value it shows):

nodesends
plot, textthe pointer, as above (kind "press", "move", "release"; the cell; takes true on a press that takes focus); keys and typed characters while focused (kind "key" and "typed")
button, checkbox, a radio item, a choice itemkind "activate" (activated), with item the item's number for a radio or choice; Space and Enter on the focused control too
sliderkind "press", "move", "release" as it is pressed, dragged and released, with value the value under the pointer (a press anywhere on its track or its thumb lands, at its ends min and max)
the window, when it opens (a window with "asks" only)kind "start" on the window's input: its first turn, before any event of the person's, so a program can ask what it needs to start there (if kind == "start" then …) and the first click stays the person's
Tab and Shift-Tabkind "key" with key "Tab", next and prev the ids of the nodes after and before the focused one; the program moves the focus (the standard library's tab_focus does it)
the wheel, a resizeto the window's view input, on turns of its own: kind "wheel" (with dy and dx in lines and columns) or "resize", node, and scroll, left, rows and cols of the text or plot as it was drawn (scroll its first line or row); when the window starts, a kind "resize" turn for each text, with the lines and columns that fit

Each event's time. When an input's file has a time column (the binding's time, or a column ts), and it is the file's last column (t,f,value,ts), every row the window sends to that input ends with the time of its event: whole milliseconds since the window started, the same for every row of a turn (characters typed and a file's lines carry their event's), increasing from event to event, on one clock for every input. So rows on different inputs (a key on keys, a scroll on view) are ordered by their timestamps, as the standard library's follow needs. An input the window sends its events to needs no file: its entry, if it has one, gives no from (only fill, kinds, ragged and time), and its rows carry their times, unless the entry says "time": "none"; a <channel>.csv lying beside the configuration is read by the convention (a session recorded and replayed by elucid8 run). A file with no time column gets rows with no time (every row's timestamp 0). A window playing a script counts events instead: the k-th at k × 10 ms. A time column that is not the file's last is refused when the window starts.

A text shows a value over lines and columns (doc = restrict … to (line : 500, col : 80) end) whose cells are code points, drawn in IBM Plex Mono, built into the command (fontSize sets a size from 6 to 96 logical pixels for that text); labels and controls are drawn in IBM Plex Sans (13 px, lines 18 px high), also built in, so the window looks the same on every system. A character Plex lacks is drawn in one of the system's fonts. A tab (code point 9) is drawn as spaces to the next multiple of 4 columns, counted from the first column shown; it is still one cell, so a press anywhere in that run lands on it. A text with lines numbers only its first lines lines (the rows shown past them are no lines). chars names the input its typed characters go to (above, at the same turn as the event); cursor and anchor are pairs of values [line, column] (the selection runs between them); marks are up to three values over the same lines and columns, true where a cell is marked (the first on pale yellow, the second on deeper yellow, the third on pale red), and a mark written {"value": "{bad_line}", "style": "error"} draws its cells' characters in the error colour on a faint red, with the line's number in the error colour too, while "style": "errorCell" draws them in the error colour inside an outline of the cell (an error's line and its column; both at a contrast of at least 4.5:1 in the light and dark themes); scroll and left the first line and column shown; copy a value true at the step that copies the selection to the system's clipboard: the selection the text had at the step before (its cursor and anchor and its lines one step back along the dimension it plays), so Cmd-C copies the selection shown and a cut (Cmd-X, whose step has no selection left) copies what it cut, asked of the program whole, whatever part of the text is shown; "lines": 1 makes a one-line field (its value over lines and columns, or over columns alone). "placeholder": "Describe it here" shows those words in a lighter colour at the start of a text that holds no character yet; they are never part of its value, and the first character typed replaces them. A text's width is a number of columns, or "width": "fill": the space the window's layout gives it, so it widens with the window. It is then as wide as its least (minWidth, else 10 columns) before it grows, and a text grows as the window does unless its grow is 0. The columns it shows are what its rectangle holds; they are sent to the view input at every resize (cols, kind "resize"), for the program to wrap its lines at. A text is asked at each frame only for the lines and columns that fit in its rectangle as last laid out (and one more of each, for a line or column shown in part), from scroll and left; before its first layout, at most 200 lines and 400 columns. Input methods are not sent yet; paste is kind "paste" (above).

A text can open and save a file, as copy copies: the program says what and when with values, and the window turns a file into cells and cells into a file. "file" names a value of code points (a one-line field's) giving the file's name, its first line up to its first eod; "open" and "save" are values true at the step that reads or writes it; "fileLines" names the input a file read is sent to, over a turn, a line and a column (file_text = input("file_text", t : inf, line : inf, col : inf), its file's header t,line,col,value). At a step where open is true the window reads the file and sends one more turn on the text's input with kind "file-opened" and length its number of lines, and the file's characters as code points in fileLines at that turn by line and column, in the same advance. Line breaks split lines (\r\n is one break; no cell holds code 10), a file ending with a line break has an empty last line, and an empty file one empty line. At a step where save is true the window writes the text's value at that step (its lines lines when it gives them, else up to the last line holding a character; each line up to its first eod, joined by \n, as UTF-8; it asks the program for each band of columns only of the lines whose text has not yet ended) to the file, atomically (a temporary file in the directory, renamed over it), and sends a turn with kind "file-saved". A refusal is the same turn with length 0 and error its short code: no name (the name is empty, opening or saving), no such file, not allowed, too large, not text (opening), not allowed, cannot write (saving); success sends error as "". Only files in the directory elucid8 window was started from or its subfolders, named by a relative path with / between its parts (projects/x/program.el8): no absolute path, no \, no . or .. part, no part starting with -, at most 1,024 bytes (255 a part), never through a link leading out of the directory (a link to a file is refused wherever it points); a regular file, or a new one for a save in a folder that exists; at most 1 MB and 10,000 lines to open; UTF-8 only. Saving and opening at one step save first. A file's turn is a step of its own: it opens or saves no further file.

"lengths" names a value giving each line's length in characters, over the text's lines and the dimension it plays (in an editor, the len it keeps anyway). With it, a save and a copy ask each line only up to its length and one cell more, not in bands of columns: a document of 10,000 lines one of which is 16,000 characters wide is asked about as many cells as it holds. The length is a hint: a line's text still ends at its first cell that is not a character, and a line whose length is eod, an error or not a whole number from 0 to the text's width, or whose cell just past its length is still a character, is read as without "lengths". So the file written and the text copied are the same either way. It needs "save" or "copy". In an editor ("editor": true), a file opened is a change of the editor's document (kind "edit", by "file"), \r\n a line break as \n is (no line ends in a \r; a lone \r inside a line stays a character; a file with a line wider than 16,384 characters is too large), with no fileLines; each line's break is remembered and a save writes the editor's document with them, so a file opened and saved comes back byte for byte (a line changed keeps its break; a new line takes the break most lines have); the editor also sends where its cursor is (kind "cursor": line, col, anchorLine, anchorCol). "wrap" (true, or a value) wraps an editor's long lines to its width: display only, so the document keeps its lines, a save writes them as they are, line numbers and the cursor's line and col count real lines, End and Home act on the row shown and Cmd-→ and Cmd-← go to the real line's end and start; without it long lines scroll across. A one-line text that is an editor ("lines": 1 with "editor": true) is drawn as the system's own text field, which owns the typing, the caret, the selection, copy and paste, input methods and undo: each change is a row of kind "edit" with the whole line, the caret a row of kind "cursor", and the program reads the field's text from its input, as any editor's (name = input("name", t : inf, line : inf, col : inf)); Enter, Tab, Escape and command keys other than the field's own editing go to the program as keys. An editor whose text is the program's own (not its document input) may name, in "changed", three values giving the program text's last change at each step: the first line it replaced, how many lines, and how many took their place (0 and 0 when the text did not change); the window then reads only those lines of the text to keep its document, and reads the whole text when the values are not given, not asked at that step, or do not fit the text's lines.

The About panel. F1 opens a panel over the window (on macOS also Cmd-?, the app menu's About ‹name› and the Help menu's ‹name› Help): the program's name, what the "window" section's "about" says, and the elucid8 build it runs on (its version, the commit it was built from and that commit's date, the program's file and the first eight characters of its source's hash, and the platform), with Copy details, which puts four lines on the clipboard for a bug report (the name, the build, the program and its configuration file, the system and the window's size; no folder path). While it is open nothing reaches the program (no pointer, keys, text or wheel), ticks pause and resume a whole period after it closes, and a resize is still sent; Escape, Enter, Space, Close, a click outside it or F1 again close it. Pressed during a drag, F1 opens it at the release. "about" is constants only:

"about": {
  "title": "Moon lander", "version": "1.2", "date": "2026-11-02",
  "text": ["Bring the lander down on the green pad, upright and gently.", "Each burst of the engine uses fuel."],
  "keys": [["Space or ↑", "a burst of the engine"], ["← or →", "turn"], ["R", "start again"]],
  "atStart": "once"
}
fieldwhat it is
titlethe name shown, at most 60 characters (else the window's title when a constant, else the program's folder's name)
versionat most 24 characters, shown with the date under the name
dateYYYY-MM-DD, a real date
texta paragraph, or a list of at most 8; at most 1,200 characters in all; plain text (no line breaks or tabs)
keysat most 16 rows [keys, meaning]: the keys as written ("Space or ↑", "Cmd+Z", drawn as caps, Cmd as ⌘ on macOS and Ctrl elsewhere, Option with ←, →, Backspace or Delete (by words) as ⌥ on macOS and Ctrl elsewhere), at most 32 characters; the meaning at most 120
atStart"once" (the default): the panel opens over the first frame the first time you run a program with these words (its title, version, date, text and keys); "always": at every start; "never"

On Windows and Linux, which have no menu bar, the panel also holds Appearance: Automatic, Light, Dark (below).

Light and dark. The window is drawn light or dark as the computer's appearance is, and follows it when it changes while the window is open: controls, panels, labels, texts and the About panel are drawn again, and each picture is coloured again with its "colorsDark" (or "colors"). The rows the window sends do not change. The choice can be fixed: on macOS the View menu's Appearance ▸ Automatic / Light / Dark (the current one checked), on Windows and Linux the same three in the About panel. No key changes it (keys are the program's). The choice is remembered for every window of this user, in a file of one line, appearance light, appearance dark or appearance auto: ~/Library/Application Support/elucid8/window on macOS, %APPDATA%\elucid8\window on Windows, $XDG_CONFIG_HOME/elucid8/window (or ~/.config/elucid8/window) on Linux. It is written only when you choose; a file that is missing or cannot be read means Automatic. The same file remembers which About panels you have seen, a line seen and 16 hexadecimal digits for each set of words (the newest 256 kept), so that "atStart": "once" opens a panel the first time only: again when its words change, not when the program is edited or its folder copied. It also remembers your text size (a line text-size 125, in percent). A run that is --headless or scripted (--script, --tree-script) neither reads nor writes the file: it opens at 100% in the computer's appearance, a choice made in it is not remembered, and it never opens a panel at start with "once".

A row of buttons can be tabs: "selected" names a value true for the tab chosen now ({"button": "Data", "id": "tab_data", "selected": "{data_tab}"}, or a constant), and the window marks it as the selected tab (and tells assistive technology it is pressed); it changes how the button looks, never what it sends.

A button with "opens": "about" ({"button": "?", "opens": "about"}) opens the panel and sends nothing; give your app one so that people can find its help again, and the panel's footer names it (it says that the ? button, ⌘? or F1 opens the panel again). Without "about" the panel says the program gives no help text, with the build lines, and does not open at start. check prints the about line, with when the panel opens and how it is found again (about: Moon lander, version 1.2, 2026-11-02, 2 paragraphs, 3 keys, shown the first time it runs; the ? button opens it) and refuses a mistake with its place (window.about.keys[2]: the keys' text is 33 characters long, more than 32); check --write-config keeps "about" as written. A one-picture window that can be resized opens at least 352 × 300 points, so that the panel fits, its picture centred.

Each frame redraws only what changed: a stroke on a plot presents only the plot's rows, a label that changes its words redraws itself, and the tree is laid out again only when a property that sizes or shows a node changes or the window is resized.

Asking a process: asks

A window's "asks" names processes the window sends requests to, as it opens and saves files: the program says what to ask and when with values, and each reply comes back as a turn of its own, so the window keeps answering while a process works. Each entry of "asks", by its name:

fieldwhat it is
processthe command and its arguments. ["elucid8", "playground-runner"] and ["elucid8", "playground-writer"], the playground's own, start in the window's folder without asking; any other is a program the deployment starts, allowed as Programs need your permission says, and checked again at every start
requestan output channel whose value is over the window input's turn and a list of fields (output("run") = run_request). A turn asks when some field is not eod there; the fields are sent as one line of JSON (numbers, booleans and texts as they are, eod as null), and a field that is an error is not sent: the reply says refused
replythe input the reply comes back on, over the same turn and a list of fields that includes asked and error; its entry in inputs needs no other setting: at a turn with no reply its fields are missing, and past the last reply they are eod
texts, replyTexts, replyCellstexts sent with the request ({"program": "doc"}: a block's name and a value over lines and columns); the inputs a reply's texts (by turn, block, line and column) and its cells (by turn, two positions, value and code) come back on
cancela value true at a turn that ends what is out on this entry: each request's reply says stopped, and the process is started again for the next
timeoutMsthe most a request may take, 60,000 by default: its reply says timeout
tickWhileOut"250ms": ticks (kind "tick") while a request is out, for a "Running… 4 s"
keytrue only with elucid8 playground-writer: the window gives it your Anthropic API key (ELUCID8_API_KEY, else the one elucid8 key set stored) on the first line of its input, never in a request, a row, a file or a reply

A request reads only turns up to its own: a value it sends that reads a later turn (next.t, a sum over every turn) is refused when the window opens, naming the read.

The turns. A window with asks gets these turns on its own input:

For example, a window asking the playground's runner for its examples when it opens, and again at each press of Ask again:

ev = input("ev", t : inf, f : {"node", "kind", "ask"})
reply = input("reply", t : inf, f : {"asked", "error", "count"})
kind = ev[f = "kind"]
asking = kind == "start" or (kind == "activate" and ev[f = "node"] == "again")
request = restrict if asking and #f == "op" then "examples" else eod to (f : {"op"}) end
output("examples") = request
n_examples = if kind == "reply" and reply[f = "error"] == "" then reply[f = "count"] else (0 fby.t n_examples)

Open in playground

{
  "format": "elucid8-deploy/2",
  "inputs": { "ev": { "from": "ev.csv" }, "reply": { "from": "reply.csv" } },
  "window": {
    "title": "Examples", "input": "ev",
    "column": [ { "button": "Ask again", "id": "again" }, { "label": "{n_examples} examples" } ],
    "asks": { "examples": { "process": ["elucid8", "playground-runner"], "request": "examples", "reply": "reply" } }
  }
}

ev.csv and reply.csv hold only their header, t,f,value. elucid8 window program.el8 opens it: the label says how many examples the runner has.

elucid8 playground

From 0.26.0, on macOS, Windows and Linux (the desktop build, with WebKitGTK 4.1). The playground on your computer shows how to use it.

Opens the playground in a window, on a new blank program (new_1, new_2, …; on a later start, the program you left, when it has work): describe what you want to compute and press Generate program (on your own Anthropic API key, elucid8 key below, or the window's Settings ▸ Add key…), choose one of the 34 programs in Examples ▾, or write the program yourself; run it, ask for any value at any point, see the view around it and every demand behind it, and keep every version. New program and Open ▾ (search, open, duplicate, delete) keep your projects, and Cmd-S (Ctrl-S) saves.

Each program you run may use up to half the computer's memory (the variable ELUCID8_CHILD_MEMORY_MB sets another limit, in megabytes); one that needs more is stopped and the playground says so. A project whose deploy.json starts programs is asked about in the window, for that project only (Programs need your permission). A project keeps its results on your computer, in its own folder: in the playground it never writes files elsewhere or sends its output over the network, even when a description or its data asks it to, and --allow-outside does not change that. To write elsewhere or send results to a service, run the project with elucid8 run, where its deploy.json says so explicitly.

elucid8 key

From 0.26.0, on macOS, Windows and the Linux desktop build. Your Anthropic API key, for writing programs from a description in elucid8 playground, on your own account with Anthropic.

The variable ELUCID8_API_KEY, when set, is used before the stored key; ANTHROPIC_API_KEY is never read. The key is sent only to Anthropic's API.

elucid8 compile

Available from 0.19.0.

Compiles a program to its plan, offline, with nothing else installed: the plan the website and the repository's compiler give, byte for byte, but for its engineVersion (elucid8-rs/…), which names the compiler. It writes the plan to standard output, or to the file -o names; --compact writes it on one line. A compile error is printed as file:line:column: message, with exit code 1, and a warning as file:line:column: warning: message.

./elucid8 compile program.el8 -o plan.json

From 0.22.0, with no program named, elucid8 compile compiles program.el8 in the current folder and writes its plan to plan.json beside it (or to the file -o names), saying so on standard error: elucid8 compile: compiled program.el8 into plan.json.

run, check, info and serve (and its reload) take the program itself where they take a plan: given a file whose name ends in .el8, they compile it first, and a compile error stops them with exit code 3, before anything is read or computed.

elucid8 guide

Available from 0.26.0.

Prints the guide to eLucid8 for AI agents, in Markdown: the text https://elucid8-lang.org/llms-full.txt serves (the language, the command and deploy.json, with worked examples). --short prints the short guide instead, the text https://elucid8-lang.org/llms.txt serves (under 60,000 bytes, for small context windows). Both are built into the command, so an agent with only the command, in a terminal or in a chat's sandbox after pip install elucid8, reads the guide without the web; elucid8 help names it at the top. From Python, python -m elucid8 guide prints it and elucid8.guide() returns it (Python).

./elucid8 guide > llms-full.txt

elucid8 schema

Available from 0.26.0.

Prints the JSON Schema (2020-12) of deploy.json, offline: the text https://elucid8-lang.org/schema/elucid8-deploy-2.json serves, made from the table of fields the command's reader uses (The configuration file). Name it in a deploy.json as "$schema" and an editor completes and checks its fields as you type; an agent can generate against it. elucid8 check stays the authority: it also checks the rules between fields, and against the program and its data.

./elucid8 schema > elucid8-deploy-2.json

--window prints the schema of a window's own file (window.json, format elucid8-window/1, published at https://elucid8-lang.org/schema/elucid8-window-1.json), and --settings that of a settings file (elucid8-settings/1, at https://elucid8-lang.org/schema/elucid8-settings-1.json). Sections reserved for a later release (code in deploy.json; microphone and camera in a window) are listed with what they will be for, and the command refuses them as not built in this release.

elucid8 --version and elucid8 help

--version prints the command's version, the plan versions it reads, its maths library and the configuration formats it reads (configuration: elucid8-deploy/2). From 0.26.0 the compiler writes plan version 26 for every program, and the command reads that version (plan versions: 26): a plan belongs to the release that compiled it, and a plan of any other version is refused with a message to compile the program again (or download it again from the playground). The program (.el8) is what to keep. The release notes say what changed in each release. help prints the usage; help run (or check, info, serve) a command's options.

Reserved for a later release

Refused as not built in this release, with exit code 2, so that no other meaning is given to them:

Command-line options

optionshortmeaning
--config <file>-cthe configuration; paths in it are relative to its folder. From 0.22.0, without it, run, check and serve use the deploy.json beside the program, if there is one
--no-configfrom 0.22.0, with run, check and serve: no configuration, even a deploy.json beside the program
--query <query>-qa query (below). Repeat it for several. Replaces the configuration's queries; the configuration's outputs are then not written unless --output names them
--output <name>with run and check: an output (below): a channel the program writes, or a file or group of channels the configuration writes side by side (a channel written into such a file writes the whole file). Repeat it for several. Only the outputs named are written, and the configuration's queries are computed only if --query is given too
--rows <rows>with run and check, beside --output: write only part of the outputs' rows, written as an output's over is (customer = 0..9999, zone = {"north", "east"}, several dimensions separated by commas). Along each dimension it names, the rows must lie inside the output's own, or the run is refused; the other dimensions keep their rows. For writing a large output in pieces, a run each (below)
--format jsonl|csv|frame|npz|arrow|parquet|zarr|vega-litethe output format: JSON lines (the default), CSV, frames, NumPy .npz, an Apache Arrow stream, Apache Parquet, a Zarr store or a Vega-Lite chart. Overrides the configuration's output
--out <file>-owrite the results to this file instead of standard output; - is standard output. A name ending in .csv, .npz, .arrows, .parquet, .zarr or .vl.json means CSV, NumPy, Arrow, Parquet, Zarr or Vega-Lite unless --format says otherwise; from 0.22.0, .arrow and .feather mean Arrow too, written in Arrow's file format (before, such a name was written as JSON lines). NumPy, Arrow and Parquet are binary: they need --out (--out - for standard output, which must not be a terminal); a Zarr store is a directory, so never standard output. For NumPy, Arrow, Parquet, Zarr and Vega-Lite, a name with {n} or {name} writes a file per query (below)
--timestamps, --no-timestampswith run: write each cell's timestamp in every file the run writes (a <value>_ts column or array, a ts field in JSON lines), or leave it out of every one. Without either, CSV carries no timestamps and the other formats do (Timestamps in files). Overrides "timestamps" in the configuration
--allow-programsfrom 0.23.0, with run, check, serve, window and init: start the programs and connectors the deployment names without asking (Programs need your permission)
--allow-outsidewith run, check, serve and window: write outputs wherever the configuration says, also outside its folder (Outputs inside the deployment's folder)
--memory SIZE|nonefrom 0.26.0, with run and serve: the most memory the command may use (8G, 512M, a number of bytes, or none); by default half the computer's memory (Limits on memory and time)
--time DURATION|nonefrom 0.26.0, with run: the longest the run may take; with serve: the longest each request may take (90s, 30m, 2h, a number of milliseconds, or none); by default an hour (Limits on memory and time)
--spreadsheetwith run: guard every CSV file the run writes (its queries' results and its CSV outputs) for spreadsheets (CSV guarded for spreadsheets). Refused when the run writes no CSV
--report <file>also write a report, as JSON: the versions of the data used, and for each query its time, its counts and every question asked on demand, and with unlisted, rows naming a text coordinate the program's list lacks, when there are any
--why <file>from 0.26.0, with run: also write why the query's answers are what they are, the tree of values each was computed from (above)
--jsonwith info: print JSON; with check --explain: the explain report as JSON
--write-config [FILE]with check: write a complete deploy.json from what check decides (above)
--explainwith check: compute the queries and outputs, writing nothing, and say how each value is computed and why per element (above); with run --report: the same in the report, as strategies
--compare-plans[=N]from 0.25.0, with check: compute the queries and outputs under the engine's plan, every value per element and N random plans (3 by default), at the configured threads and at one, and compare everything they give (above)
--forcewith check --write-config: replace the file when it exists
--yeswith init: ask nothing, and take every proposal
--cache-bytes <N>with serve and window: the memory budget for its caches
--record <dir>from 0.26.0, with window: keep the session in the folder dir, every row the window sends to each input it feeds, with its event's time (Testing an app without a screen)
--session <dir>from 0.26.0, with run and check: read the inputs a window feeds from the session elucid8 window --record <dir> kept, so each answer is the one the window showed
--threads <N>with run, serve and window: the most threads to use, 1 or more. Overrides the configuration's threads option
--http <HOST:PORT>with serve: also answer requests over HTTP there (Over HTTP). Without a token, only a loopback address. Overrides the configuration's http.address
--token-file <file>with serve --http: the file holding the bearer token every endpoint but /health needs. Overrides http.tokenFile. With repl: the file holding the token of the service it asks
--no-openwith repl: show prints the Player's link without opening it in the browser
--no-playerwith serve --http: no eLucid8 Player at GET /player (from 0.19.0; Over HTTP). As http.player: false
--state <DIR>with serve: keeps the data clients send (every advance taken, rows included) in the folder DIR, and sends it again when the service starts with the same folder, so a service stopped and started again, with its program changed or not, answers as if it had never stopped. An advance whose input's entry in the configuration (any field) or file has changed, or whose input the program no longer reads, is left out; the start line says which and why, and the file before is kept in the folder. A reload follows the same rule. One service at a time per folder. Overrides the configuration's state.dir
--state-fsyncwith serve --state: each advance is also synced to the disk before its reply, so a power cut or a system crash keeps it too (slower: about 4 ms an advance on macOS). Without it, a service killed or crashed keeps every advance it answered. As state.fsync: true
--dir <DIR>with mcp: the folder relative paths in the tools' arguments are taken from. Default: the folder the assistant starts it in
--serve-url <URL>with mcp: a running elucid8 serve --http its query, advance and stats tools may reach (repeat it for several; also the environment variable ELUCID8_SERVE_URL). A service on this machine (localhost) needs none
--token-env <NAME>with mcp: the environment variable holding that service's token (default ELUCID8_SERVE_TOKEN). The token is sent to the service only, never shown

Queries

A query names a value and the coordinates to compute it at, written as a program writes a point, in square brackets:

querypoints
running[t = 4]one
running[t = 0..5]six: a range includes both ends
heat[time = 5, x = 0..15, y = 0..15]256, the last dimension varying fastest
sales[zone = "north", day = 1]a text, in double quotes as in a program
sales[zone = {"north", "east"}, day = 1]two: a list of coordinates, in its order
centrea value with no dimensions (or centre[])
level[time = last]one: the newest data on time (below)
level[time = last - 9 .. last]ten: the newest ten

last stands for the newest coordinate on a dimension, and may be written in place of an integer, alone or with an offset (last - 9, last + 1), as a coordinate or either end of a range (0..last):

It is turned into a number before the query runs, so the answer is the same as with the number written in; the results show the coordinates. A query whose last has no value is invalid (exit 3): a clock given by everyMs (it has a timestamp for every tick), or no source listing a point on the dimension. last is always a number; the text "last", quoted, is a coordinate like any other. elucid8 serve reads last the same way, as of each request (the long-running service).

A query names every dimension of its value. One that leaves one out, such as distance[x = 0..3] for a distance over x and y, is refused before anything is computed, in check and run (exit code 3), serve and everywhere a query is asked, naming the value, what it leaves out and the form to write: query 1 (distance): the query leaves out dimension y of distance: a query names every dimension of its value, as in distance[x = …, y = …]. A query that names a dimension its value does not have is unchanged: the coordinate is dropped. One rule holds for outputs: an output whose over leaves out a dimension of its value is refused the same way, nothing written, with the form to write (the output's dimensions in the order it writes them, each left out with the rows it writes by default): output plain (level): the output leaves out dimension station of level: an output names every dimension of its value, as in "over": "hour = …, station = *".

Quote a query in the shell (--query 'running[t = 0..5]'), since it holds spaces and brackets. Each query is computed as one run: its points share what they compute. Queries in one run share the caches when the options turn them on.

How a query is read. The rules, which elucid8 and the playground share:

Messages and answers name a point the same way, running[t = 4] (dimensions sorted by name, in UTF-16 code units; texts quoted as JSON, a value with no dimensions by its name alone); in the place dimension of a recursive function, its place code, f[n = 4, π = [2 ×4, 1]].

A query is computed as one block (0.6.0). A query written as text is a box, and the whole box is computed together: where a value is computed a level at a time (an iteration of one value, or of several), each level of the whole box is computed once. Point by point, the same box would start the levels again from many single points: the whole of a 512 × 512 plate at step 1,000 took 6 seconds as a block, and had not finished after 31 minutes point by point. The answers are the same either way. To ask for a box point by point, give the query in the configuration with "tile": false (below). One difference can show: a run that stops at the demand-depth limit (exit code 1) point by point may complete as a block, or, rarely, the reverse, since the limit is a limit on resources, like memory, not part of the answer.

Size. A query may hold up to 1,000,000,000 points; a larger one is invalid (exit code 3), to catch a mistyped range: split it into several queries. Memory does not grow with the number of points for JSON lines and CSV, which are written as they are computed; frames, NumPy and Arrow hold the box until the query ends, about 9 bytes a point for numbers (8 for the value, 1 for its kind). Values computed along the way are kept only while a later point still reads them.

Limits on memory and time

From 0.26.0, run and serve are held to a memory limit, half the computer's memory unless --memory sets another (--memory 8G, --memory none for none), and to a time limit, an hour unless --time sets another (--time 30m, --time none). Like the demand-depth limit, they are limits on resources, never part of an answer: a run within them gives the same answers, files and exit codes as with none.

Exit codes

Exit codes are frozen: each keeps the meaning below, and a new one may only be added after them.

codemeaning
0every query completed. Results may be eod or errors: those are results, not failures
1a query stopped with a program error (for example the demand-depth limit). The other queries' results are still written
2a usage error: an unknown option, or no plan
3an invalid plan, configuration, data file or query. Nothing is computed
4the results or the report could not be written
5check: an -- expect line of the program does not hold; each is named on standard error with what was computed

On Linux and Windows

The command is offered for macOS (Apple silicon and Intel), Linux (x86-64 and ARM64) and Windows (x86-64). Every build gives the same results, and writes the same bytes, from the same plan, configuration and data. Where the platforms differ (the Windows notes are unverified by a person: the Windows build passes our tests on Windows, but nobody has followed these steps yet):

The configuration file: deploy.json

{ "$schema": "https://elucid8-lang.org/schema/elucid8-deploy-2.json",
  "format": "elucid8-deploy/2",
  "inputs":  { "x": { "from": "x.csv" },
               "sum_service": { "from": { "builtin": "sum_service", "latencyMs": 5 }, "kinds": { "a": "real" } } },
  "options": { "pointCache": false },
  "queries": [ "alert[t = 0..1]" ],
  "output":  { "format": "jsonl", "path": "results.jsonl" },
  "outputs": { "alerts.csv": {"channels": ["alert", "level"]} } }

Output files in short

What an output file holds, and how to make it the file you want; outputs gives every field. elucid8 check prints each output's file, rows and columns before anything is computed.

Inputs by convention

A program whose files are named after its inputs needs no configuration:

count.el8      x = input("x", t : 3)
               y = x * 2
x.csv          t,value
               0,1
               1,2
               2,3

elucid8 run count.el8 --query "y[t = 0..2]" reads x.csv as the input x. The rules:

Outputs inside the deployment's folder

A deployment writes its files inside the folder holding its deploy.json (with no configuration, the folder it runs in), so a folder you download cannot write elsewhere on your computer without saying so. Every file an output writes (its to, a partition's folder, each of its parts, a stream's file), an input's record file and the output section's path are checked when the deployment is read, after .., absolute paths and symbolic links: one that would be written outside is refused (exit code 3), naming the output and the path, by run, check, serve and window alike.

elucid8: deploy.json: output report would be written to ../report.csv, outside this deployment's folder (/Users/ann/app): a deployment writes inside its own folder unless it says otherwise; if that is what you want, give outputs.report "outside": true, or pass --allow-outside

To write outside it, the output's entry says "outside": true (an input's entry for its record; the output section for its path), or you pass --allow-outside. From 0.26.0, "outside": true also needs your permission, as programs do: check lists it (write outside its folder: …), and run, serve and window refuse it with exit code 3 and the list until you allow it, at a terminal by answering yes once (recorded in .elucid8-allowed, so a deploy.json that later writes elsewhere is asked about again), elsewhere with --allow-outside. A file you name on the command line (--out) is yours to choose, anywhere.

An input may read a file anywhere your account can. When one reads outside the deployment's folder, run, check and serve say so on standard error, one line each: warning: input "x" reads /data/x.csv, outside the deployment's folder (/Users/ann/app). It is read as before. Standard output, programs and connectors are not files here. elucid8 window keeps the files it opens and saves in its own folder.

Programs need your permission

From 0.23.0. A deploy.json can start programs: an input or output bound to {"process": [...]}, an input answered on demand by a program, a connector ({"connector": …}, a Python program). They run with your rights, so elucid8 starts none until you allow them. check lists, before anything else, what the deployment can do beyond reading its data files and writing its outputs, made from deploy.json alone:

this deployment can:
  start a program: node scorer.js (answering input "score" on demand; env SCORER_KEY)
  run a connector: postgres (serving input "sales"'s rows; env DATABASE_URL), a Python program
  write outside its folder: ../shared/total.csv (output "total")
  listen on: 127.0.0.1:8080 (its http section)

run, serve, window and init refuse such a deployment (exit code 3, with the list) until you allow it. At a terminal they ask once; a yes is recorded in .elucid8-allowed beside deploy.json, with a fingerprint of the list (the hash info --json gives), so a deploy.json that later starts anything else, or the same with other arguments, settings or env names, is asked about again. From 0.26.0 the file's first line after its comments is format elucid8-allowed/1; a file with another format, or none, records nothing, and the refusal says so (delete it to be asked again). Elsewhere (in a script, a service manager, CI) pass --allow-programs. check reads every stored input, which for an input served by a program or a connector means starting it: for such a deployment check prints the list, says it checked nothing else, and exits with code 3, unless you allowed them (it does not ask). A deployment that starts nothing (the examples, the samples, a playground Download) runs with no question. Under elucid8 serve, a reload whose deploy.json lists more than what was allowed is refused (invalid), and the service goes on as it was.

Through elucid8 mcp, no tool argument allows programs: check, run and show run such a deployment only once its folder has .elucid8-allowed, or (in the 2026-07-28 revision of MCP, where the assistant's app supports it) after you answered yes when the app asked you. The tools read and write only inside the folder the server works in (--dir), including every file a deploy.json names; write_deployment writes no program, and only connectors you named to propose_bindings.

No credentials, ever

A configuration, a plan and a program never hold a key, a token or a password. A field whose name looks like one (apiKey, token, …) is rejected with a message saying so. A program that needs credentials runs as a separate program and reads them from its own environment; the configuration may name the environment variables it receives ("env": ["ANTHROPIC_API_KEY"]), never their values.

inputs

Each channel the program reads with input("channel", …) has an entry. from says where its values come from: stored data (a file, versions of a file, a connector, a program serving rows), or a program answering on demand (a built-in, a recording, or a program of yours). The program is the same whichever it is.

"inputs": {
  "x":     { "from": "data/x.csv" },
  "field": { "from": "field.jsonl" },
  "clicks": { "from": "clicks.csv", "fill": { "missing": 0 } },
  "y":     { "from": { "versions": [ { "from": "y-monday.csv", "label": "monday" },
                                     { "from": "y-tuesday.csv", "label": "tuesday" } ],
                       "pin": "tuesday" } } }
fieldformeaning
fromalla file path, its format from its name's ending (.csv, .jsonl or .ndjson, .parquet, .arrows or .arrow or .feather) or from format (Data files); { "versions": [ { "from": path, "label": optional name }, … ], "pin": label }, several files as versions of the input (Versions); { "connector": NAME, "settings": {…} } (Connectors by name); { "process": [...] }, a program that serves the rows (below), or, with "answers": true, one that answers on demand; { "builtin": … } or { "recording": "calls.json" } (answered on demand, below); { "builtin": "clock", … } or { "builtin": "replay", … }, rows given over time by elucid8 serve (below)
formatfiles"csv", "jsonl" (JSON lines), "parquet" or "arrow", when the ending does not say: the words of the endings ("CSV" and the other earlier names are refused, naming the word to write)
fillallwhat a point that is missing data reads instead: {"missing": 0} reads 0 at every point with no row inside the data, every empty or null cell, and every answer "nothing here" from an input answered on demand, for sparse data where no row means nothing happened. The value is a number, true or false ({"missing": false}, for a modifier elucid8 window does not send at a turn), or a text ({"missing": "0"} is the text 0). Without fill (the default), such a point is missing data: the error "input x has no data at this point", of kind missing. A filled point is a value: operators combine it, aggregates count it, and searches and windows over the input take it as a candidate. It keeps the timestamp of what it fills: on an input whose times come from a coordinate ("time": {"dimension": …}), that coordinate's time; an empty cell, its row's time; otherwise 0. A fill reaches only points inside the data: past the last row along a dimension declared inf (with whole numbers as its coordinates; with "ragged": true, past each line's own last row) a point is eod whatever fill says, and a row whose value is eod is still eod. Or an object by coordinate of one of the input's dimensions declared with a list or a count, for an input whose fields have different kinds (an events input): {"missing": {"cmd": false, "length": 0, "key": ""}} (here f : {"kind", "key", "length", "cmd"}; a count's coordinates written as their digits) gives each coordinate it names the value a point with no row there reads, and "*", if written, the value for every coordinate not named; a coordinate not named, with no "*", stays missing data. Keys naming no dimension's coordinates, or those of two dimensions, are refused. missing is the only kind a deployment fills: eod is end of data, and other errors are the program's to fill (default(x, 1, "late")). An entry that writes "missing", as releases before 0.26.0 did, is refused with the fill to write. The same for rows a connector or a program serves
raggedstoredtrue for an input whose lines are lists of different lengths (a symbol's trades, a turn's characters): each line (the input's other coordinates fixed) ends at its own last row along each dimension declared inf, so past a symbol's last trade the input is eod, not missing data. Without it, the data end at the input's last row along such a dimension, and a shorter line's points before it are missing. Refused for an input with no dimension declared inf
kindsallthe kind of a dimension nothing else decides: { "amount": "number" } (whole numbers), "text" or "real" (any finite number, for a dimension that is only looked up, never counted or moved along), checked against every coordinate sent
valuestoredthe CSV column (or JSON-lines field) holding the input's values, when it is not value: with "value": "size", a file with the columns sym,i,value,ts,size serves both price ({ "from": "trades.csv", "time": "ts" }) and size ({ "from": "trades.csv", "time": "ts", "value": "size" }). The other columns are ignored. Not a dimension's name, the time column, or outcome
widestoredone of the input's dimensions whose coordinates are the names of the file's value columns: each row gives a point per value column (A file with a column per coordinate). With "wide": "quantity", a file t,temperature,humidity serves readings = input("readings", t : inf, quantity : {"temperature", "humidity"}). Not with value
columnsstoredfor some of the input's dimensions, the column (or field) that holds it, when it is not named after it: { "t": "minute" }; or { "day": { "column": "date", "as": "days" } }, a column of dates YYYY-MM-DD read as whole days since 1970-01-01 (in Parquet and Arrow also a timestamp column, by the UTC day each time falls on); with "format": "dd/mm/yyyy", dates written in that form (Dates and times written another way). Not a dimension read through a name map or as rows' positions, and not for an input whose rows come from a connector or a program
timestoredthe data's timestamps (Values and timestamps): "ts", the name of the CSV column (or JSON-lines field) holding each row's time in whole milliseconds (an empty cell or null for none); or times by coordinate, when an input's times are a function of one of its coordinates: { "dimension": "tick", "everyMs": 1000 } (the point at tick k has time k × 1000), or "timestamps": [...], "csv" or "jsonl" instead of everyMs, listing one time per coordinate (Times by coordinate, below). Without time, a column (or field) named ts is the timestamps without being named (What a file lacks), and without one the data have timestamp 0. "time": "none" reads no timestamps from the file: every point's timestamp is 0, a column ts is ignored like any other column, and a JSON line's outcome keeps no timestamp of its own (for a time column named none, write { "column": "none" }). { "column": "when", "format": "iso8601" } reads a time column of ISO 8601 texts (2024-10-24, 2024-10-24T09:30:00Z, 2024-10-24 09:30:00.250+02:00): UTC unless a text gives its offset, milliseconds from the first three digits of a fraction (any more are dropped), times before 1970 refused; "format": "ms" (the default) is whole milliseconds, as a plain name reads them. { "column": "Date", "format": "dd/mm/yyyy" } reads times written in that form, UTC, and { "column": ["Date", "Time"], "format": "dd/mm/yyyy HH.MM.SS" } a time written in two columns, joined by a space (Dates and times written another way)
separator, decimal, thousandsCSVhow a CSV file written by another tool separates its fields and writes its numbers: "separator": ";" (or "\t", "|"; not a letter, digit or space), "decimal": "," (2,6 is 2.6), "thousands": "." (1.234,5 is 1234.5; also ,, a space, ' or _). The decimal mark applies to values and real-number coordinates, never to whole-number coordinates or millisecond time columns; it may not be the separator, nor the thousands mark the decimal mark or the separator (A file written by another tool)
quotedCSVhow quoted fields are read: "auto" (the default: a file that quotes every field, as many exports do, is read as if unquoted; in any other file a quoted field is text), "read" (quoted fields are read as unquoted ones are) or "text" (a quoted field is always text)
absentCSVcells that mean missing data, besides the empty cell, NA and null: ["N/A", "-"], or numbers, [-200], which match any cell that reads as that number (-200, -200.0, -200,0 with a decimal comma). Not allowed in a coordinate or time column
namesstoredwhich column holds the names of a dimension that has a map (Names instead of numbers): { "sym": "symbol" } reads them from the column symbol; { "sym": false } means this file holds the numbers. Default: the column named after the dimension
rowstoredone of the input's dimensions that no column holds: each row's position in the file is its coordinate (A file with no column for its rows). With "row": "i", a file name,city,age serves people = input("people", i : inf, column : {"name", "city", "age"}) read "wide": "column"
env, timeoutMs, overprocess, connectorthe environment variables a program receives (names only), how long it may take, and the box it is asked for (below)

Inputs given rows over time

Three built-in providers give an input new rows while elucid8 serve runs, so that a live service needs no script feeding it. The input is stored data like any other: new rows are appended as advance with rows would append them, so versions, subscriptions, last and the Player's live mode follow them. elucid8 run, which computes once, refuses a clock or a replay (exit 3, saying it needs elucid8 serve), and reads a followed file as it is now; elucid8 check describes each; and an advance of such an input is refused (its rows are the provider's).

"inputs": {
  "clock":    { "from": { "builtin": "clock", "every": "100ms" } },
  "readings": { "from": { "builtin": "replay", "file": "readings.csv", "every": "1s", "loop": true } },
  "change":   { "from": { "builtin": "follow", "file": "live.csv" } }
}
frommeaning
{ "builtin": "clock", "every": "100ms" }for an input over one dimension of whole numbers (clock = input("clock", t : inf)): a row a tick, at t = 0, 1, 2, …, its value and its timestamp the tick's time in milliseconds, start + t × every. Tick 0 is in the input when the service starts; tick t is appended t × every after it. every is a whole number of milliseconds ("100ms", "1s", "2m", "1h", or a number of milliseconds). "start": the time of tick 0, whole milliseconds (default: when the deployment was loaded, in milliseconds since 1970). "until": a number of ticks (300), or a duration ("1m": the ticks at times less than it after tick 0); without it, the clock ticks until the service stops
{ "builtin": "replay", "file": "readings.csv", "every": "1s" }a CSV or JSON-lines file's rows, one coordinate of the input's first dimension (whole numbers) a tick, in ascending order of it; a coordinate the file does not list takes no tick, and its rows keep the file's order. The file is read as an input's file is (value, time, columns, format and fill as in the table above), all of it when the service starts, so a row it cannot read is found then, with its line. "loop": true: after the last coordinate it starts again, every coordinate moved on by their span (the largest less the smallest, plus 1) at each pass, and the times in a time column moved on by the same share of the file's times (whole milliseconds; not ISO 8601 times), so that the data keep growing
{ "builtin": "follow", "file": "live.csv" }a CSV or JSON-lines file another program appends to. The input's first version is the file as it is when the service loads it, read as an input's file is (value, time, columns, format and fill as in the table above). Then the service looks at the file every every (default "250ms"): the complete lines added at its end (each ending in a line break) are appended as rows, so a version's id is the id of the file's bytes up to its last line break; a line not yet ended waits for the next look. A file that got shorter, or whose bytes already read changed (a correction), is read again whole as a new version, as advance with a whole file; the values that read what changed are recomputed. A file removed, or that cannot be read, leaves the data as they were (the log says so once, {"event":"follow","status":"gone"}), and is followed again when it comes back. Rows the version cannot take (a point listed twice, say) are refused, said once in the log, and the data stay as they were

elucid8 mcp's show takes these inputs too, and follows them live in the Player (Using eLucid8 with AI coding agents). A reload that leaves such an input's entry unchanged lets it go on where it got to; one that changes it starts it again, from tick 0 (a followed file: from the file as it is then), its data with it.

To tell lines appended from a rewrite, the service hashes again, at each look that finds the file changed, the bytes its newest version holds, while they are at most 16 MiB; beyond that it compares their first and last 64 KiB (and, on Unix, the file's inode), so a rewrite of a large file that changes only bytes in between is taken for an append.

Inputs answered on demand

An input whose from is a program answering on demand is asked at each point a value reads it at (model[amount = payments] asks model at amount = payments): once per query and point, only where an answer is wanted, never speculatively. A question starts at the latest timestamp of the coordinates it is asked at; its answer is stamped with the time it completed (Data services describes the built-in ones):

frommeaning
{ "builtin": "sum_service", "latencyMs": 5 }the playground's stand-in, built into the command: it adds the coordinates it is asked at, answering after latencyMs
{ "builtin": "anomaly_detector" }a deterministic anomaly detector, built in (not in the playground)
{ "builtin": "simulated", "answer": "mean", "latencyMs": 5, "latencyMaxMs": 30, "failRate": 0.1, "failCode": "overloaded", "seed": 1 }the playground's simulated program, built in: it answers the sum, mean or max of the numbers among its question's inputs, a score from 0 to 100, or {"formula": "x1 * 2 - x2"} (over the inputs x1, x2, …, with + - * /, parentheses, abs, min and max), after latencyMs (or a time drawn up to latencyMaxMs), and fails failRate (0 to 0.5) of its attempts with failCode. Times, failures and scores are drawn from the question's inputs and attempt, and seed, so the same question always gives the same answer
{ "recording": "calls.json" }answers replayed from a file of recorded questions
{ "process": ["node", "scorer.js"] }, with "answers": truea separate program that answers questions, one JSON line per request and reply

And these fields, besides fill and kinds:

fieldmeaning
argumentsthe input's dimensions whose coordinates are a question's inputs, in order (default: every dimension, in order); a built-in's sums, formulas and draws are over these
deadlineMsthe deadline: how long an answer may take, from the question's start; an answer or failure after it is the error late. Without it, there is no deadline
retry{ "codes": ["overloaded", "rate_limited"], "attempts": 3 }: the error codes to try again, and the attempts in all (1 to 10, the first included). Only for a program whose questions can be repeated ("idempotent": true)
reuse"successes": a successful answer is reused by later queries (with a point cache); "never" (the default): each query asks again. A failure is never reused
idempotent, configwhether questions may be repeated; a configuration sent with every question
recorda file the run's answers are recorded to, replayable with "from": { "recording": … }; inside the configuration's folder, unless the entry says "outside": true (below)

Two inputs may be answered by the same program with different settings, so one program can give two kinds of question two deadlines:

"inputs": {
  "score":   { "from": { "process": ["node", "scorer.js"] }, "answers": true, "idempotent": true, "deadlineMs": 2000 },
  "hurried": { "from": { "process": ["node", "scorer.js"] }, "answers": true, "idempotent": true, "deadlineMs": 200 }
}

For a program run separately:

Refused when the configuration is read: answered settings on stored data, file fields (wide, columns, value, time, row) on an input answered on demand, columns on an input whose rows come from a connector or a program (rename the columns in its settings, or in the program), and an input whose dimension's kind nothing decides ("kinds" gives it).

names

fieldmeaning
csv or jsonlthe map of one dimension: a file pairing each name with its number, CSV with the columns name,coordinate, or one {"name": "AAPL", "coordinate": 0} per line (Names instead of numbers)
unknownwhat a name the map does not list is: "error" (the default: the file is refused, naming its line) or "number" (it gets the next number)
savewith "unknown": "number" and a CSV map: true writes the map back with the names it numbered

Times by coordinate

When an input's times are a function of one of its coordinates, its entry's time is { "dimension": d, … } with one of these, giving the time of each coordinate k of d, in whole milliseconds:

fieldmeaning
everyMsa fixed period: coordinate k at k × P ms
timestampsthe times inline: [0, 100, 200] (coordinate i at the i-th)
csva file with the header tick,ms, then one row per coordinate: 0 to n − 1, each once, in any order, with times strictly increasing
jsonlone {"tick": 0, "ms": 0} per line, with the same rules

A list (timestamps, csv or jsonl) gives a time to coordinates 0 to n − 1 only, so it must reach every coordinate the data have rows at: a file with a row past the list's end is refused when it is loaded, naming the list's length and the first such tick (inputs.x.time lists 4 timestamps (ticks 0 to 3), but the data have a row at tick 6, which has no time: list a time for every tick the data have (to tick 6)). Rows appended to a running service and a connector's rows are held to the same rule. Along a dimension the program declares finite (t : 10, or a list such as t : {0, 1, 5}), the list must reach every tick declared, whether the data have a row there or not, or the deployment is refused when it is loaded, from a file or a connector alike: inputs.x.time lists 4 timestamps (ticks 0 to 3), but the input declares t : 10, so tick 4 has no time: list a time for every tick the input declares (to tick 9). everyMs gives every tick a time.

options

optiondefaultmeaning
pointCachefalsekeep computed values across the run's queries (or a service's requests), and reuse each one while the data it read is unchanged. Values a box query computes in loops are not kept (boxKernels)
sourceCachefalsekeep data read from files across queries
cacheBytesnonea memory budget, in bytes, for those caches. When they grow past it, entries are removed until they fit. A removed value is computed again when needed, with the same answer. elucid8 serve --cache-bytes overrides it
maxDepth1,000,000how deep a chain of demands may go before the query stops with a program error (a chain of demands that never ends)
maxAggregate1,000,000the most elements one aggregate may combine before the query stops with a program error
retain"auto"how a long query frees memory it no longer needs: auto (keep everything, then free what will not be used again once the query holds many values), all (keep everything), static or retire. Never changes an answer
autoRetainAt, sweepFloor65,536when auto starts freeing memory, as a number of values (setting autoRetainAt turns off the default autoRetainBytes); how many values are held before older ones are freed
autoRetainBytes1,073,741,824 (1 GiB)when auto starts freeing memory, as a number of bytes: once the values a query holds take about this much memory. A query that stays under it keeps everything, which is faster. On a machine with little memory, set it lower
groupstruecompute values that depend on each other step by step (a training loop's parameters) a whole step at a time, which is much faster. Not used with pointCache: then the default is false, and true is an error
singleIterationstruecompute iterations of one variable (a value defined from its own previous step, such as a heat field from the step before) a whole step at a time too, with compiled loops, where its equation allows (a conditional is fine: both branches are computed and each cell takes its own). An iteration whose steps are about one cell each is computed one value at a time. Not used with pointCache: then the default is false, and true is an error
checkRetentionfalsecheck the memory freeing by recomputing: slower, for testing
boxKernelstruecompute a query over a box, and the values it reads (alignments included), a whole block at a time in loops, where a value is not part of an iteration; elements a loop cannot give exactly (an error, a value of another type) are computed one at a time. With pointCache, a box of 4,096 cells or more is computed this way and what its loops compute is not cached (computing it again costs less than keeping it); a smaller box is computed one value at a time and cached. false caches every value, one at a time
checkBoxKernelsfalsecheck those loops by computing every element they give one at a time as well: slower, for testing
boxCells4,194,304the most cells of a query's box computed in loops at once; a larger box is computed in slabs along the query's first dimension, each freed before the next. Loops hold about 9 bytes a cell for each value they compute
auditRecomputefalsecount what the run computes more than once: the --report then has recompute, with every value at a point computed (computed, in loops kernelElements and one at a time evaluations), how many of them are distinct, and the computations after a value's first (recomputes), by cause: overlap (a block that covered only part of what was asked, in the same query), afterRelease (freed, then needed again), acrossQueries (another query, or another value of an output, had computed it) and perElement (computed one value at a time again). Slower, for measuring
threadsas many as the machine hasthe most threads to use. Loops over a box, a level of an iteration, or the data an alignment reads are split across them; each element is computed on one thread, and sums are exact, so the answers are the same, bit for bit, with any number (approx_sum and approx_mean may differ in the last bits). 1 uses one thread. Reading data files (several at once) and writing NumPy and Arrow files use them too. Each extra thread holds a few chunks of 2,048 elements of each value it computes. On a machine shared with other work, set it lower
elementLevelstrue (false with pointCache)for values that iterate along a dimension, alone or together, but cannot run in compiled loops (a text editor's document, cursor and undo stack, turn by turn; a value that compares a text) or whose steps are one element each: compute them a whole step at a time, element by element, and keep the newest historyDepth steps, and those read at an earlier step, within a query and, under elucid8 serve and elucid8 window, between requests, so an event computes only its own step. false computes each point where it is asked, as before
historyDepth100for a value computed level by level whose levels share tiles (a canvas that changes only where something happened at each step): how many of its newest steps are held, within a query and, under elucid8 serve, between requests. Asking for one of them again is answered at once; an older step is computed again from the data. A held step costs only the tiles of 64 × 64 cells it changed. A whole number, 1 or more

None of the options changes an answer; they change how fast it comes and how much memory it takes. maxDepth, maxAggregate and cacheBytes are limits on resources, like memory: a query that passes one stops with a program error, never with a different answer.

queries

"queries": [
  "running[t = 0..5]",
  { "query": "running[t = 0..5]", "snapshot": { "x": "monday" } },
  { "value": "heat", "points": [ { "time": 5, "x": 8, "y": 8 } ], "tile": true } ]

http

"http": { "address": "127.0.0.1:8080", "tokenFile": "token.txt" }: read by elucid8 serve alone, where it listens for HTTP requests, the file holding its token (relative to the configuration; never the token itself), and its limits: maxBodyBytes, maxConnections, maxSubscriptions and budgetMs (Over HTTP). --http and --token-file override address and tokenFile. values names the values GET /values answers in Prometheus's text format, for Grafana: each a metric's name (letters, digits and _, not starting with a digit) and a query over a box of at most 10,000 cells ("values": { "sensor_level": "level[t = last, s = 0..2]" }; Seeing your results). "player": false turns off the eLucid8 Player the service serves at GET /player (from 0.19.0), as --no-player does.

"state": { "dir": "state", "fsync": false }: read by elucid8 serve alone, which keeps the data clients send (every advance taken) in the folder dir (relative to the configuration) and sends it again at its next start, as --state DIR does (--state overrides dir, relative to where the command runs). "fsync": true syncs each advance to the disk before its reply, as --state-fsync does. check reports a mistake in the section.

output

"output": { "format": "jsonl", "path": "results.jsonl" }: the format (jsonl, csv, frame, npz, arrow, parquet, zarr or vega-lite) and a file. Both are optional; --format and --out override them. The default is JSON lines on standard output. "timestamps": true (or false) writes each point's timestamp in the results, or leaves it out; without it, CSV has none and the other formats have them (Timestamps in files). --timestamps and --no-timestamps override it. "spreadsheet": true guards CSV results for spreadsheets (CSV guarded for spreadsheets), and "outside": true lets path be outside the configuration's folder; --out is always yours to choose.

outputs

Each channel the program writes with output("channel") = e is written by default to <channel>.csv beside the configuration (with the ending of its entry's format when it gives one: "scores": { "format": "jsonl" } writes scores.jsonl), one record per point of the value's rows, with a column per dimension, then the channel's value, <channel>_value (scores_value), and with timestamps <channel>_ts. An entry says otherwise:

"outputs": {
  "decisions":      { "to": "out/decisions.csv", "timestamps": true },
  "report.parquet": {"channels": ["running", "ratio"]},
  "signals":        { "to": "signals.jsonl", "every": "1s", "until": 1000 } }
fieldmeaning
toa file path (its folder is created when it is not there, as a partition's is); "-" for standard output; { "connector": NAME, "settings": {…} }; { "process": [...] }, a program receiving records (below)
format"csv", "jsonl" (JSON lines), "parquet", "arrow", "npz" (NumPy), "zarr" (a directory), "frame", "vega-lite", or "txt" (each value written plainly, a line each: Constant), the words --format and output.format take (and txt, for outputs only); from the file's ending when not given (.csv, .jsonl or .ndjson, .parquet, .arrows (an Arrow stream), .arrow or .feather (Arrow's file format, from 0.22.0), .npz, .zarr, .frames.jsonl, .vl.json, .txt); a file whose ending says another format is refused, and, from 0.22.0, so is a file whose ending says no format (or that has none) when format is not given. "format": "arrow" writes Arrow's file format to a file ending in .arrow or .feather, a stream to any other
timestampstrue writes each value's timestamp beside it, false leaves it out. Without it, a CSV file has none and the other formats have them (Timestamps in files); --timestamps and --no-timestamps override it. Records sent to a program always carry them
orderthe columns in order: ["subject", "student", "grades_value"] (the value columns may be left out; they come last). Default: the dimensions sorted by name, then the value. It renames no column; written wide, it names the wide dimension too (["day", "col"])
widefrom 0.22.0: one of the output's dimensions written as columns, one per coordinate, a row per coordinate of the others (An output written wide). CSV, Arrow or Parquet; not for channels side by side, a stream's dimension, the row, nor a dimension partition, parts or rows cuts
skipfrom 0.22.0: "eod" leaves out the records whose value is eod (channels side by side: whose every channel is eod; written wide: rows whose every cell is eod). Errors are always written. Not for NumPy or Zarr, which are grids over the rows (Leaving out eod records)
rowa dimension written as the records' order, with no column of its own (CSV, JSON lines, Arrow or Parquet), as a file read with "row" is (A file with no column for its rows)
overthe rows written, as a query writes a box without the value's name, naming every dimension: "t = 0..99"; "day = 0..last", every day from 0 to the newest the data lists, those it skips included; * for the coordinates the data lists
rowsthe part of the rows this run writes, as --rows gives it: "customer = 0..9999"; inside the output's own rows, or the run is refused. Not for a stream's dimension
partitionwrites the output as a folder of parts, to naming the folder: {"customer": 10000}, a part per 10,000 coordinates; {"zone": "values"}, a part per coordinate; several dimensions together (a folder of parts, below). Not for a stream's dimension, nor one --rows or rows names
partswrites the output as several files in one run, each with its own rows and file: [{"rows": "customer = 0..9999", "to": "part-0.parquet"}, {"rows": "customer = 10000..19999", "to": "part-1.parquet"}] (below). Not with to, rows, partition or --rows, nor for a stream
until, everyfor a stream (an output over a dimension with no end, reading no data along it): the last coordinate written, and the pace ("1s": tick t not before t seconds after the start)
env, timeoutMs, attempts, batchfor a connector or a program, as for inputs
outsidetrue lets its files (to, a partition's folder, parts, a stream's file) be written outside the configuration's folder, which is refused otherwise (Outputs inside the deployment's folder)
spreadsheettrue guards a CSV file for spreadsheets: a text cell that a spreadsheet would read as a formula is written with a ' before it (CSV guarded for spreadsheets). CSV only; refused for other formats

Outputs named in the program

A program names what it gives out, output("running") = running, one value per channel (Tutorial); the configuration chooses only where each goes and how, never what is in it.

A copy through CSV. A program that reads a CSV file and writes it back writes the same headings and cells: CSV carries no timestamps unless asked, and a file with no column for its rows is written back without one:

"inputs":  { "people": { "from": "people.csv", "wide": "column", "row": "i" } },
"outputs": { "people_out.csv": { "channels": ["name", "city", "age"], "row": "i" } }

for people = input("people", i : inf, column : {"name", "city", "age"}), name = people[column = "name"] (and city, age), and output("name") = name, output("city") = city, output("age") = age. From 0.22.0 the same copy is one channel written wide, output("people") = people with "people": { "to": "people_out.csv", "row": "i", "wide": "column" } (An output written wide).

elucid8 serve follows a program's output only as an output subscription, when the configuration gives it a program to send its records to.

Names instead of numbers

A coordinate is a whole number or a text, so data may carry names, such as stock symbols or sensor ids, and a program may write them (price[sym = "AAPL"]). A map is for a program that numbers them instead (sym : 3). A map file pairs each name with its number, in the columns name,coordinate. Point the configuration at it, under names, and eLucid8 reads the names in your files, computes with the numbers, and writes the names back in its results.

A program over three symbols and two days:

price = input("prices", sym : 3, day : 2)

Open in playground

The map, symbols.csv:

name,coordinate
AAPL,0
MSFT,1
IBM,2

The data, prices.csv:

sym,day,value
AAPL,0,187.5
MSFT,0,402
IBM,1,191

In deploy.json:

"names": { "sym": { "csv": "symbols.csv" } },
"inputs": { "prices": { "from": "prices.csv" } }
./elucid8 run plan.json --config deploy.json --query 'price[sym = 0..2, day = 0]'
{"name":"price","context":{"sym":"AAPL","day":0},"outcome":{"kind":"value","value":187.5,"ts":0}}
{"name":"price","context":{"sym":"MSFT","day":0},"outcome":{"kind":"value","value":402,"ts":0}}
{"name":"price","context":{"sym":"IBM","day":0},"outcome":{"kind":"error","error":"missing","message":"input prices has no data at this point","origin":{"name":"price","context":{"sym":"IBM","day":0}},"ts":0}}

IBM has no row for day 0, before its last row along day, so its price there is missing data.

Programs as sources and sinks

Not in the WebAssembly module. An input's rows can come from a program, and an output's records can go to one: a database, a message queue or another system is connected by a small program in any language, which talks to elucid8 in lines of JSON on its standard input and output, as a program answering on demand does. Each message is one JSON object on one line, with an id; each reply carries the same id. Connecting eLucid8 to your data has a template and recipes that run (SQLite, PostgreSQL, a REST API, a webhook, a live stream).

Such a program runs in the configuration's folder; a bare command name (python3) is found on the PATH; it receives only the environment variables its entry's env names (and ELUCID8_CONNECTOR_PROTOCOL, which says elucid8-connector/1; on Windows, also SystemRoot), so it reads its own credentials from them; timeoutMs (default 30,000) bounds how long a reply may take. A program that stops, does not answer in time or answers what is not a reply is stopped, and started again for its next message.

A program as an input

"inputs": { "spend": { "from": { "process": ["python3", "sqlite_source.py", "shop.db", "spend"] },
                        "over": "customer = 0..99999, hour = 0..8759" } }

Before each query (and, in elucid8 serve, before each request), elucid8 asks the program for the input's rows:

{"id":1,"op":"read","source":"spend","dimensions":["customer","hour"],"box":[{"name":"customer","range":[0,99999]},{"name":"hour","range":[0,8759]}],"have":null}

A program as a destination

"outputs": { "training_rows": { "channels": ["orders_7", "churned"], "over": "customer = 0..99, day = 0..364",
                                "to": { "process": ["node", "sqlite_sink.ts", "features.db", "training"], "batch": 1000 } } }

elucid8 sends begin (format, the form of the records, "elucid8-table/1", which a sink refuses if it does not know it; the record's dimensions and channels; names, the program's value each channel holds, which an error that started at a record names as its origin; and how many records there are), then the records in the order of the rows (the last dimension fastest), batch at a time (default 1,000), then end:

{"id":1,"op":"begin","format":"elucid8-table/1","output":"training_rows","dimensions":["customer","day"],"values":["orders_7","churned"],"names":["orders_7","churned"],"records":36500}
{"id":2,"op":"records","output":"training_rows","records":[{"context":{"customer":0,"day":0},"outcomes":{"orders_7":{"kind":"eod","ts":0},"churned":{"kind":"value","value":false,"ts":0}}}]}
{"id":3,"op":"end","output":"training_rows","records":36500}

Connectors by name

The Python package elucid8 (pip install elucid8) has connectors for systems you may already use, each a program of the kind above, with its client library as an extra (pip install "elucid8[postgres]"). An input's from, or an output's to, names one with connector and gives its settings:

"inputs": { "reading": { "from": { "connector": "postgres", "settings": { "table": "readings" } }, "env": ["DATABASE_URL"] } },
"outputs": { "results": { "channels": ["total", "alarm"], "over": "sensor = 0..2, t = 0..9",
                          "to": { "connector": "postgres", "settings": { "table": "results" }, "env": ["DATABASE_URL"] } } }

Data files

An input's data is a CSV file, a JSON-lines file, a Parquet file or an Arrow file. The rules for CSV are the ones the playground's table mode uses too, so a table that works in the playground works here; a Parquet or Arrow file is read as the CSV of the same rows would be.

Sample files: from 0.20.0, the Download page offers one zip, elucid8-samples-<version>.zip, with a file of every kind elucid8 reads, each in a folder with a program that reads it, its deploy.json and expected.jsonl, the answers elucid8 run gives; its README lists every file.

CSV

A header naming each of the input's dimensions and value (or <input>_value, as eLucid8 writes it), then one row per point. Other columns are ignored, and the columns may come in any order.

t,x,value
0,0,12.5
0,1,
0,2,error: sensor fault
1,0,"text, with a comma"
cellread as
empty, NA or null (as written), or one of the entry's absent markersmissing data (an error of kind missing, which aggregates leave out)
eod (any case)eod, only where data can end: as the last row of a line along a dimension of whole numbers declared inf (below); undefined, its old word, is refused: write eod
starting with the word error (any case), for example error: sensor faultan error with that message (error alone: the message "error")
true, falsea boolean
a number as JavaScript reads it: 12.5, -3, 1e3, .5, 0x1F, Infinitya number (NaN is not a number here: it is text)
anything elsetext
a quoted field ("12", "a, b", "NA")text, unless the whole file is quoted (then read as if unquoted) or the entry says "quoted": "read"

A file written by another tool

From 0.24.0. A CSV file exported by a spreadsheet, a database or a statistics package is read as it is served, with a few fields in its entry; elucid8 init and elucid8 check --write-config write them from what they see in the file. The air-quality readings of the UCI repository separate fields with ;, write decimal commas, mark a missing reading -200, and give each time in two columns:

Date;Time;CO(GT);NMHC(GT);C6H6(GT);…;T;RH;AH;;
10/03/2004;18.00.00;2,6;150;11,9;…;13,6;48,9;0,7578;;
"AirQualityUCI": {
  "from": "AirQualityUCI.csv",
  "separator": ";", "decimal": ",", "absent": [-200],
  "time": { "column": ["Date", "Time"], "format": "dd/mm/yyyy HH.MM.SS" },
  "row": "t", "wide": "column"
}

Dates and times written another way

A time or date column may give a format, made of yyyy (year), mm (month), dd (day), HH (hour, 00–23), MM (minute), SS (second) and fff (fractions of a second, read to the millisecond), with any other characters between them: "dd/mm/yyyy", "mm/dd/yyyy HH:MM", "yyyy.mm.dd", "dd/mm/yyyy HH.MM.SS". Times are UTC. A month or day may be written with one digit (1/3/2004) unless another number follows it directly. A format giving a part twice, without the year, month or day, a minute without an hour, or another letter is refused, saying what to write; a cell that does not read in the format is refused with its line.

JSON lines

One JSON object per line:

{"t": 0, "x": 0, "value": 12.5}
{"t": 0, "x": 1, "value": null}
{"t": 0, "x": 2, "outcome": {"kind": "error", "error": "data", "message": "sensor fault", "ts": 0}}
{"t": 1, "x": 0, "value": "text"}

Parquet and Arrow

Read from 0.16.0. An input may read an Apache Parquet file ("from": "x.parquet") or an Apache Arrow IPC file ("from": "x.arrows", a stream, or "x.arrow", the file format, also called Feather, uncompressed), as pyarrow (and so pandas) and DuckDB write them. The table is the one the CSV of the same rows gives:

Every format

What a file lacks

A file must fit the program: it gives each of the input's dimensions a column, and an input with no dimensions one value. A file that does not fit is refused where it is read (check, run, serve and its reload), with exit code 3 and a message naming what is missing and what the file has. Name the column with columns, use the rows' positions with row, or give the program the file it reads.

A file with no column for its rows

From 0.19.0. A file whose rows are not numbered (a spreadsheet's name,city,age) is read with each row's position as one of the input's dimensions, named by the entry's row:

"name": { "from": "people.csv", "value": "name", "row": "i" }

for name = input("name", i : inf). The first row after the header is i = 0, the next i = 1, and so on: rows are counted, not lines, so blank lines and comments do not count. In JSON lines the first line is row 0; in Parquet and Arrow, the file's rows in order, across row groups and batches.

A file with a column per coordinate

A file that holds one column per quantity (t,temperature,humidity) is read with the columns' names as the coordinates of one of the input's dimensions, named by the entry's wide:

"inputs": { "readings": { "from": "readings.csv", "wide": "quantity" } }

for readings = input("readings", t : inf, quantity : {"temperature", "humidity"}). The row 3,21.5,40 gives readings[t = 3, quantity = "temperature"] = 21.5 and readings[t = 3, quantity = "humidity"] = 40: the points the same data written long (t,quantity,value, a row per point) gives, with the same outcomes and timestamps.

An output written wide

From 0.22.0. An output with "wide": "col" is written a row per coordinate of its other dimensions and a column per coordinate of col, the shape a file read wide has, so a table read wide comes back as it was read:

"inputs":  { "data": { "from": "data.csv", "row": "row", "wide": "col" } },
"outputs": { "data": { "to": "echo.csv", "row": "row", "wide": "col" } }

for data = input("data", row : inf, col : inf) and output("data") = data: the file a,b,c with rows 1,2,3 and 4,5,6 is written back byte for byte.

Leaving out eod records

From 0.22.0. An output with "skip": "eod" leaves out the records whose value is eod: a program whose rows follow the data (passed = amount wvr.t pass, over the ten rows of amount) writes only its passed rows, not the rows past the last amount that passes as eod.

Columns named after their channel

Every file eLucid8 writes as a table names a channel's columns after it: <channel>_value, and where they are written <channel>_ts, <channel>_kind and <channel>_error, whether the channel is written alone or beside others, in CSV, Arrow, Parquet, NumPy and Zarr, as records, in a folder of parts and as a stream. A query's results are named after the value queried (ratio_value). Coordinates keep their dimensions' names, so a dimension named value or ts has a column of its own beside the channel's.

So a file one program writes is read back, with no entry saying how, by an input of the same name: output("readings") = … writes readings.csv with readings_value (and readings_ts), and readings = input("readings", t : inf) beside it reads that column as its values and readings_ts as their timestamps. An Arrow or Parquet file's <channel>_error column gives back each Error, and <channel>_kind is read with the value.

Versions

Every data file has a version: a fingerprint of its bytes, written as 16 hexadecimal digits (d20b5fc4a3d402cb). Change anything in the file, even a comment, and it has a new version; two files with identical bytes are one version. check and the --report list each version.

The fingerprint is a tree of XXH64 hashes (64 bits, seed 0): the file's bytes are cut into blocks of 65,536 bytes, the last one shorter; each block is hashed; and the id is the XXH64 hash of the blocks' hashes, each as 8 little-endian bytes, followed by the file's length as 8 little-endian bytes. It is the same on every platform, whatever the number of threads. It names versions of the data a deployment was given; it is not a cryptographic hash. Releases up to 0.14.0 used another hash (FNV-1a), so a file has another id under them.

Output formats

Timestamps in files

From 0.19.0. Every answer has a timestamp (Values and timestamps). Whether a file carries it depends on who reads the file:

JSON lines

The default: one line per point, in the order of the query's points. For ratio[t = 2..7] with the Deploy tutorial's running sum:

{"name":"ratio","context":{"t":2},"outcome":{"kind":"value","value":2,"ts":0}}
{"name":"ratio","context":{"t":3},"outcome":{"kind":"error","error":"division","message":"division by zero","origin":{"name":"ratio","context":{"t":3}},"ts":0}}
{"name":"ratio","context":{"t":4},"outcome":{"kind":"value","value":2.6,"ts":0}}
{"name":"ratio","context":{"t":5},"outcome":{"kind":"value","value":2.4444444444444446,"ts":0}}
{"name":"ratio","context":{"t":6},"outcome":{"kind":"eod","ts":0}}
{"name":"ratio","context":{"t":7},"outcome":{"kind":"eod","ts":0}}

CSV

The same query with --format csv:

name,t,ratio_value,ratio_kind,ratio_message
ratio,2,2,value,
ratio,3,,error division,division by zero
ratio,4,2.6,value,
ratio,5,2.4444444444444446,value,
ratio,6,,eod,
ratio,7,,eod,

CSV guarded for spreadsheets

A spreadsheet (Excel, LibreOffice, Google Sheets) reads a CSV cell starting with =, +, -, @, a tab or a carriage return as a formula, so text from data you do not trust can run as one when the file is opened there. An output's "spreadsheet": true (or --spreadsheet for everything run writes as CSV, its queries' results included) writes each such text with a ' before it: text values, text coordinates, and the column names a file written wide takes from the data. Numbers are never touched (-3 stays -3). Off by default, so a CSV file reads back, by eLucid8 or by pandas, exactly as it was written; a guarded file reads back with the '. For untrusted data going into other programs, prefer Parquet or Arrow, which carry text as text.

t,report_value,report_kind,report_message
0,'=1+1,value,
1,-3,value,
2,'@SUM(C1),value,
3,plain,value,

Frames

Needs elucid8 0.3.0 or later. A frame is the answer to a query over a box (a row, a grid, a cube), as one JSON object, instead of one line per point. --format frame writes one frame per query, one per line. With the Deploy tutorial's running sum, where x is 0 at t = 3 and the data ends at t = 5:

./elucid8 run plan.json --config deploy.json --query 'ratio[t = 2..7]' --format frame
{"name":"ratio","axes":[{"name":"t","range":[2,7]}],"type":"number","values":[2,null,2.6,2.4444444444444446,null,null],"kinds":[0,2,0,0,1,1],"kindNames":["value","eod","error"],"ts":{"axis":"t","values":[0,0,0,0,0,0]},"errors":{"1":{"error":"division","message":"division by zero"}}}

With names as coordinates (sales = input("sales", zone : {"north", "south"}, day : 4) and growth = sales - sales[day = #day - 1], where the south's report for day 2 is error: late report and day 0 has no row, so it is missing data), and a value with no dimensions, two frames from one run:

./elucid8 run plan.json --config deploy.json --query 'growth[zone = "south", day = 1..3]' --query opening --format frame
{"name":"growth","axes":[{"name":"zone","labels":["south"]},{"name":"day","range":[1,3]}],"type":"none","values":[null,null,null],"kinds":[2,2,2],"kindNames":["value","eod","error"],"ts":{"axis":"zone","values":[0]},"errors":{"0":{"error":"missing","message":"input sales has no data at this point","origin":{"name":"sales","context":{"zone":"south","day":0}},"via":{"length":1,"path":[{"name":"sales","context":{"zone":"south","day":0}}]}},"1":{"error":"data","message":"late report","origin":{"name":"sales","context":{"zone":"south","day":2}},"via":{"length":1,"path":[{"name":"sales","context":{"zone":"south","day":2}}]}},"2":{"error":"data","message":"late report","origin":{"name":"sales","context":{"zone":"south","day":2}},"via":{"length":1,"path":[{"name":"sales","context":{"zone":"south","day":2}}]}}}}
{"name":"opening","axes":[],"type":"number","values":[10],"kinds":[0],"kindNames":["value","eod","error"],"ts":[0],"errors":{}}
fieldmeaning
namethe value queried
axesone per dimension, in the order the query names them: {"name": "t", "range": [lo, hi]} for integers (both ends included; a single coordinate is [c, c]) or {"name": "zone", "labels": [...]}. The cells run through the box with the last axis varying fastest, the order of the JSON lines for the same query. heat[time = 5, x = 0..15, y = 0..15] is 1 × 16 × 16 cells. No axes: one cell
typenumber, boolean or text when every value has that type; json when they mix or include a list; none when no cell is a value
valuesone per cell, written as in JSON lines: a number, true or false, text, a list as an array, and the numbers JSON cannot hold as {"special": "-0"}, "NaN", "Infinity" or "-Infinity". A cell that is not a value is null, never NaN or 0
kindsone per cell: 0 a value, 1 eod, 2 an error
kindNamesthe words of the codes in kinds: ["value", "eod", "error"]
tsthe timestamps: where every cell's timestamp is a function of its coordinate on one axis, {"axis": "t", "values": […]}, one per coordinate of that axis; otherwise a list, one per cell
errorseach error cell's index (as text) and its error, as JSON lines write it. Empty when there are none
programErroronly when a program error stopped the query (below)

Using eLucid8 from your code reads frames into Python lists, NumPy arrays, pandas tables and JavaScript.

NumPy (.npz)

Needs elucid8 0.4.0 or later. --format npz writes one query's frame as a NumPy .npz file, which numpy.load reads with no other package. A name ending in .npz chooses it:

./elucid8 run plan.json --config deploy.json --query 'ratio[t = 2..7]' --out ratio.npz

What numpy.load("ratio.npz") holds, for the running sum's ratio:

ratio_value  float64, shape (6,): [2.0, 0.0, 2.6, 2.4444444444444446, 0.0, 0.0]
ratio_kind   uint8, shape (6,): [0, 2, 0, 0, 1, 1]
ratio_error  uint8, shape (6,): [0, 4, 0, 0, 0, 0]
ratio_ts     int64, shape (6,): [0, 0, 0, 0, 0, 0]
axes.json    [{"name":"t","range":[2,7]}]
frame.json   {"name":"ratio","type":"number","tsAxis":"t","format":"elucid8-table/1","kinds":["value","eod","error"],"errors":[null,"missing","late","failed","division","non-finite","empty","assert","type","index","data","raised","version"]}
errors.json  {"1":{"error":"division","message":"division by zero"}}
memberwhat it holds
<value>_value (ratio_value.npy)one value per cell, shaped by the axes in the order the query names them (heat[time = 5, x = 0..15, y = 0..15] is 1 × 16 × 16): float64 for numbers, bool for booleans, a NumPy text array (<U…) for text. A cell that is not a value holds 0, false or empty text, never NaN: <value>_kind says which cells those are
<value>_kind (ratio_kind.npy)uint8, the same shape: 0 a value, 1 eod, 2 an error (the words in frame.json's kinds)
<value>_error (ratio_error.npy)only when there are errors: uint8, the same shape, each cell's error kind: 0 where the cell is not an error, else the kind's place in frame.json's errors (null, missing, late, failed, division, non-finite, empty, assert, type, index, data, raised, version)
<value>_ts (ratio_ts.npy)int64, the timestamps (left out with --no-timestamps). Where they are a function of one axis's coordinate, frame.json names that axis (tsAxis), and <value>_ts has size 1 along every other axis, so it broadcasts against <value>_value; otherwise it has its shape
axes.jsonthe axes, as in a frame
frame.jsonthe value's name, the frame's type, tsAxis (above), programError when one stopped the query, then the legend: format (elucid8-table/1), kinds and errors, the words of the two code arrays
errors.jsononly when there are errors: each error cell's index in the flattened array (as text) and its error (its kind, message, where it started when it was passed on, its detail and chain), as in a frame

Apache Arrow

Needs elucid8 0.4.0 or later. --format arrow writes one query's frame as an Apache Arrow IPC stream: a table in long form, one row per cell, which pyarrow, pandas, Polars and DuckDB read. A name ending in .arrows (the usual extension for an Arrow stream) chooses it:

./elucid8 run plan.json --config deploy.json --query 'ratio[t = 2..7]' --out ratio.arrows

From 0.22.0, a name ending in .arrow or .feather writes the same table in Arrow's file format (the stream with the magic ARROW1 before it and a footer after it), which pyarrow.ipc.open_file, pyarrow.feather.read_table, Polars' read_ipc and DuckDB read. Before 0.22.0 such a name was written as JSON lines.

The table, as pyarrow.ipc.open_stream("ratio.arrows").read_all() reads it:

t: int64 not null
ratio_value: double
ratio_kind: dictionary<values=string, indices=int8, ordered=0> not null
ratio_error: dictionary<values=string, indices=int8, ordered=0>
ratio_origin: dictionary<values=string, indices=int8, ordered=0>
ratio_message: dictionary<values=string, indices=int8, ordered=0>
ratio_ts: int64 not null
ratio_trail: dictionary<values=string, indices=int8, ordered=0>
t  ratio_value         ratio_kind  ratio_error  ratio_origin  ratio_message     ratio_ts  ratio_trail
2  2.0                 value       null         null          null              0         null
3  null                error       division     ratio[t = 3]  division by zero  0         null
4  2.6                 value       null         null          null              0         null
5  2.4444444444444446  value       null         null          null              0         null
6  null                eod         null         null          null              0         null
7  null                eod         null         null          null              0         null
columnwhat it holds
one per axis, named after the dimensionthe cell's coordinate: int64 for integers, string for labels. The rows run through the box with the last axis varying fastest, as in a frame
<value>_value (ratio_value)double for numbers, bool for booleans, string for text, and string holding each value's JSON when the frame's type is json. A cell that is not a value is null, never NaN
<value>_kindthe words value, eod or error, dictionary-encoded (pandas and Polars read a category, DuckDB text)
<value>_errornull, except in an error's row: its kind (missing, division, …), dictionary-encoded
<value>_originnull, except in an error's row: where it started, as a query writes a point (the row's own point when it started there), its dimensions in the order its value declares them, dictionary-encoded
<value>_messagenull, except in an error's row: its cause in words, dictionary-encoded
<value>_tsint64: the cell's timestamp, one per row (left out with --no-timestamps)
<value>_trailnull, except in an error's row with a detail or a chain: {"detail": …, "via": …} as JSON, so that the file reads back exactly; dictionary-encoded

Size: a 64 × 64 grid of numbers is about 38 KB as .npz and 120 KB as Arrow (the coordinates are columns, 8 bytes each), against 81 KB as a frame and 375 KB as JSON lines.

Using eLucid8 from your code reads both formats with NumPy, pandas, pyarrow, Polars and DuckDB.

Apache Parquet

Written from 0.16.0. --format parquet writes one query's frame as an Apache Parquet file, with the columns of the Arrow table above, which pyarrow, pandas, Polars and DuckDB read. A name ending in .parquet chooses it:

./elucid8 run plan.json --config deploy.json --query 'ratio[t = 2..7]' --out ratio.parquet

The table, as pyarrow.parquet.read_table("ratio.parquet") reads it:

t: int64 not null
ratio_value: double
ratio_kind: string not null
ratio_error: string
ratio_origin: string
ratio_message: string
ratio_ts: int64 not null
ratio_trail: string
t  ratio_value         ratio_kind  ratio_error  ratio_origin  ratio_message     ratio_ts  ratio_trail
2  2.0                 value       null         null          null              0         null
3  null                error       division     ratio[t = 3]  division by zero  0         null
4  2.6                 value       null         null          null              0         null
5  2.4444444444444446  value       null         null          null              0         null
6  null                eod         null         null          null              0         null
7  null                eod         null         null          null              0         null

Zarr

Written from 0.19.0. --format zarr (or a name ending in .zarr) writes one query as a Zarr store (version 2, a directory, uncompressed, with consolidated metadata), which xarray opens as a dataset over the query's dimensions with their coordinates (xr.open_zarr("heat.zarr")), and zarr-python, napari and other Zarr readers read. For a value v: v_value (numbers as doubles, NaN where a cell is not a value; booleans, false there; text, the empty text there), v_kind (0 a value, 1 eod, 2 an error, with the CF attributes flag_values and flag_meanings that name them), v_ts (timestamps, over one dimension only where they depend on it alone) and, when there are errors, v_error, v_origin, v_message and v_trail (text: on an error's cell its kind, where it started, its cause in words, and its detail and chain as JSON; the empty text elsewhere). The group's attributes (elucid8) hold format (elucid8-table/1), the name, the type, the axes and, when one stopped the query, programError (the arrays are then over elucid8_cell, the cells computed). The store is written as <name>.partial and renamed when complete; a store already there is replaced, anything else under that name is refused. A store is a directory: it needs --out, never standard output. Seeing your results reads it with xarray, matplotlib, Plotly and napari.

Vega-Lite

Written from 0.19.0. --format vega-lite (or a name ending in .vl.json) writes one query as a Vega-Lite v5 chart with its data inline, one row per cell (at most 100,000), which Jupyter, VS Code, Observable and AI assistants draw: a picture, a line or bars by the query's dimensions, with a slider over the dimension the value iterates along. Each row has a field per dimension and, for a value v, v_value, v_kind (value, eod or error), v_ts and, on an error, v_error (its kind), v_origin (where it started, as a query writes a point) and v_message (its cause in words); usermeta.elucid8.format is elucid8-table/1. It is text: standard output takes it too. Seeing your results says how the chart is chosen.

Constant

An output with "format": "txt" writes each record's value plainly on a line of its own, and nothing else: no header, no coordinates and no timestamp, even with --timestamps. The lines come in the order CSV writes the records. A value with no dimensions is one line. Each value is written as in CSV, without quotes: a number or a boolean as in CSV, a text as it is, eod as eod, and an error as error: …, with the error described in words. A program error stops the output after the lines before it, as for every output.

This program counts from 1:

x = 1 fby.t x + 1
output("x") = restrict x to (t : 10) end

Open in playground

With this deploy.json, elucid8 run count.el8 --config deploy.json prints the numbers 1 to 10, one a line, on standard output:

{ "format": "elucid8-deploy/2",
  "outputs": { "x": { "to": "-", "format": "txt" } } }

The lines do not say what kind each value is: the text eod and eod are written alike, and so are the text 1 and the number 1; a text holding a line break spans two lines. For results that are read back, use CSV or JSON lines. A file whose name ends in .txt is written as Constant without "format". Constant writes one channel: channels written side by side as Constant are refused (give each its own destination, or write them as CSV), and so are a stream (an output with no end) and a file whose name ends in another format's ending (.csv, .parquet, …).

Records

From elucid8 0.9.1. An output writes records: one per point of its box, a column per dimension and per value. With the Deploy tutorial's running sum, this output:

"outputs": { "sums": { "channels": ["running", "ratio"], "over": "t = 2..6", "to": "sums.csv" } }

writes sums.csv:

t,running_value,running_kind,running_message,ratio_value,ratio_kind,ratio_message
2,8,value,,2,value,
3,8,value,,,error division,division by zero
4,13,value,,2.6,value,
5,22,value,,2.4444444444444446,value,
6,,eod,,,eod,

With "timestamps": true (or --timestamps), each value's timestamp follows it: t,running_value,running_ts,ratio_value,ratio_ts. The other formats write v_ts unless "timestamps": false (Timestamps in files).

Each format keeps every cell's outcome, as it does for a query's results:

formata recordeod and errors
JSON lines (.jsonl){"output": "sums", "context": {"t": 3}, "outcomes": {"running": {…}, "ratio": {…}}}: the record's coordinates, and each value's outcome as JSON lines write onein the outcome, as in JSON lines; a program error adds {"output": …, "programError": "…"} after the records
CSV (.csv)a column per dimension, then for each value v the columns v_value (its data, in the notation of the data files, above), v_kind and v_message, and, with timestamps, v_ts (with "csvWords": true, v_value alone, as in Columns named after their channel)v_value empty, v_kind eod or error and the error's kind (error division), v_message the error's message
Arrow (.arrows)a column per dimension (int64, or string for labels), then for each value v: v_value, v_kind, v_error, v_origin, v_message, v_ts (int64, its timestamp) and v_trail, as in a query's Arrow tablev_value is null where the cell is not a value; v_kind is value, eod or error; v_error, v_origin and v_message are null except on an error, where they hold its kind, where it started and its cause; v_trail its detail and chain as JSON
NumPy (.npz)for each value v: v_value (its values, shaped by the box, as in a query's .npz), v_kind, v_error (when it has errors) and v_ts; axes.json; record.json (output, values, each value's type, programError when one stopped the output, and the legend: format, kinds, errors)v_value holds 0 (or false, or empty text) where the cell is not a value; errors.json, when there are errors: by value, each error cell's index and its error
Parquet (.parquet)the Arrow columns: a column per dimension, then for each value v: v_value, v_kind, v_error, v_origin, v_message, v_ts and v_trailas in Arrow
Zarr (.zarr)a store: a coordinate array per dimension, then for each value v: v_value, v_kind, v_ts and, when there are errors, v_error, v_origin, v_message and v_trail (below)as in a query's store
Vega-Lite (.vl.json)a chart of the values side by side, sharing their sliders, with a row per record (below)as in a query's chart
Constanteach record's value on a line of its own, plainly (Constant)eod, and error: … with the error described in words

Several queries in one run

Needs elucid8 0.6.0 or later. A NumPy, Arrow or Parquet file (and a Zarr store or a Vega-Lite chart) holds one query, but one run can write several: give --out (or the configuration's output.path) a name with {n}, the query's number from 1, or {name}, the queried value's name:

./elucid8 run plan.json --config deploy.json --query 'ratio[t = 0..4]' --query 'ratio[t = 5..9]' --out 'ratio-{n}.npz'

writes ratio-1.npz and ratio-2.npz, each the file a run with that query alone would write. The data is read once, and the queries share the caches when the options turn them on. Each file is written when its query ends, under a temporary name (its name with .partial added), and renamed once complete, so a program reading the files may take each one as soon as its name appears. Two queries that would write the same file are invalid (exit code 3): {name} alone is not enough for two queries of one value. JSON lines, CSV and frames write every query to one file, so a name with {n} or {name} is invalid for them.

The report

--report report.json writes one JSON document: the runtime and the plan (its compiler and a fingerprint of the program), every input (each version's id, label, file and number of points, and the version pinned), and for each query its points, time in milliseconds, program error, warnings (only when there are any), service calls (every attempt) and counts (values computed, data points read, cache hits). When outputs were written, outputs lists each one: its name, where it went, its records, time, program error and warnings, and each value's query, as a query's entry. With the option auditRecompute, recompute gives what the whole run computed more than once (options). With --explain, strategies gives how each value was computed, and why per element (What the engine chooses).

For developers