#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:
plan.json, your program compiled to its execution plan. Download it from the website: Download in the playground, or next to a program in My programs, gives a zip with the plan and everything below. Andelucid8 compilewrites it, from 0.19.0, from the program on your machine, and every command below takes the program (program.el8) where it takes a plan;deploy.json, the configuration: where each input's data comes from, where each output goes, the options, and what to compute (below);- the data files the configuration names: CSV or JSON lines (or programs that serve a source's rows: Programs as sources and sinks);
- the
elucid8command, a single file with nothing else to install, from the site's Download page.
#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:
- box region: computed in compiled loops over a whole box, with what it reads;
- group levels along t (and iteration by levels): an iteration computed a step at a time, every element of a step in one compiled loop; shared tiles: only the tiles of a step that may differ from the step before are computed again;
- element levels along t: an iteration whose members have no compiled loop, computed a step at a time, element by element, and kept between requests;
- per element, points kept between requests: an iteration too large for element levels;
- per element: one element at a time, by eduction, with why.
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:
- A value's own equation (no compiled loop can be derived for it): “computes a coordinate on a dimension of texts”; “is over, or reads a value over, texts or real numbers”; “reads at a computed position”; “reads a dimension its point leaves undefined”; “a coordinate beyond the safe whole numbers”; “a restriction”; “a list, record or set”; “an operator on lists, records or sets”; “list or collect”; “product or approx_product”; “filtered aggregate”; “skip eod”; “a region with a computed limit”; “a region given as a list”; “a region over the coordinates the data lists”; “a region with a computed bound”; “a region whose size varies with the point”; “a window beside other region items”; “a window used as a list”; “a neighbourhood used as a list”; “an aggregate of a list computed as a value”; “a neighbourhood with no edge”; “a bound that is not a constant whole number”; “argmax or argmin over texts or real numbers”; “a shift that may go below 0”; “a search along a dimension with no end”; “a search whose target is not a plain read”; “wvr, asa or upon along a dimension with no end”; “wvr, asa or upon whose dimension is not one axis of the point”; “assert”; “a recursive function”; “reads an input answered on demand”; “a read at an earlier step inside fby's right operand”.
- What it reads: “a read at an earlier step that is not one number per level”; “reads a value that runs per element”.
- An iteration (why it is not run by levels): “a restriction, or a read of a dimension its point leaves undefined”; “an iteration the compiler's level kernels do not support”; “an iteration with members that have no kernel”; “iterates along a dimension that may hold texts”; “an iteration that reaches an input answered on demand”; “members read each other other than at the same step or one step back”; “members read each other at the same step in a cycle”; “members whose fby start at different origins”; “no fby along its dimension”; “a member with an empty box”; “a member over texts or real numbers”; “too large for element levels (its points are kept between requests instead)”.
- While computing, or from the options: “wvr, asa or upon in an iteration (its points are kept between requests instead)”; “levels of about one element”; “a point cache is in use”; “box regions are off (boxKernels false)”; “group levels are off (groups false)”; “iterations of one variable run per element (singleIterations false)”; “element levels are off (elementLevels false)”; “over-compute guard”; “asked point by point (a list of points, or tile false)”; “the levels it reads were not computed by levels”; “not given exactly by the loop (an error or missing data)”; “read one at a time by values that run per element” (a value with a compiled loop that no query asked for as a box, read by values that run per element); “a request of a few points with a small cone (per element costs less than a loop's set-up)” (a query of one point, or a few, whose answer needs only a few elements: computed per element, without planning); “its history over the box asked was not kept, and per element reads back only to its last reset” (a box of a guarded iteration asked now and then: its earlier levels were not kept, so it is computed per element, its seeds first); “per element costs less for this kind of value and request (the cost table)” (the table of measured costs the command carries says so for this kind of value, such as an iteration of two fields with a member read at a computed position, asked in a single request); “made per element by the plan check (--compare-plans)” (only under
--compare-plans, below); “forced on by a setting, but fell back while computing” (only with the measurement tools' settings).
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
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:
| field | value | meaning |
|---|---|---|
shift, alt, ctrl, meta | true or false | the modifiers held at the event: alt is Option on macOS; meta is Command on macOS and the Windows key elsewhere |
cmd | true or false | the platform's command modifier: Command on macOS, Ctrl on Windows and Linux, so that cmd and key == "z" undoes on every system |
repeat | true or false | with 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):
| node | sends |
|---|---|
plot, text | the 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 item | kind "activate" (activated), with item the item's number for a radio or choice; Space and Enter on the focused control too |
slider | kind "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-Tab | kind "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 resize | to 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"
}
| field | what it is |
|---|---|
title | the name shown, at most 60 characters (else the window's title when a constant, else the program's folder's name) |
version | at most 24 characters, shown with the date under the name |
date | YYYY-MM-DD, a real date |
text | a paragraph, or a list of at most 8; at most 1,200 characters in all; plain text (no line breaks or tabs) |
keys | at 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:
| field | what it is |
|---|---|
process | the 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 |
request | an 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 |
reply | the 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, replyCells | texts 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 |
cancel | a 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 |
timeoutMs | the 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" |
key | true 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:
kind"start", when the window opens: its first turn, before any event of yours, so a program can ask what it needs to start there.kind"close", when the window is about to close (its close button, Cmd-Q or Cmd-W, or the command stopped by a signal): its last turn, so a program can save a draft or send a last request there. The window waits for the replies to what that turn asked, at most 2 seconds, then closes; closing it again meanwhile closes it at once.kind"reply", a reply, withaskthe entry's name. At that turn the reply input holdsasked(the turn of the request it answers),error("", orstopped,timeout,ended,refused,not allowed) and the process's own fields. One entry's requests are answered one at a time, in the order asked.kind"allow", the Allow panel's answer. When a process replies"code": "needs-allow"with a project'sfolderand itsfingerprint, the window, not the program, asks you whether that project may start its programs. Allow records it for exactly what the project'sdeploy.jsonstarts now. The turn hasaskanderror:""(allowed),"not allowed"or"changed".
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)
{
"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.
--dir DIR: the folder your projects are kept in, made if it is not there;~/eLucid8by default. It holdsprojects/<name>/(each withprogram.el8,deploy.json,data/,prompt.md,versions/andout/, soelucid8 runworks in it as it is) andtemplates/, the examples, copied there the first time, which the playground only reads: choosing an example copies it into a project. A blank project is written only once it has something in it. The playground opens and saves files only in this folder and the folders under it.--threads N: the threads your programs run on (every hardware thread by default); the playground's Settings can choose fewer.- Text size: the playground's Settings choose it, from 80% to 250%, and Cmd-+, Cmd-− and Cmd-0 (Ctrl elsewhere) change it anywhere in the window; it is remembered for the next time.
--source DIR: writes the playground's own program (program.el8, itsdeploy.jsonand its input files: the playground is itself a program in eLucid8) into DIR, to read or change, and exits; DIR must not already hold any of its files.--program DIR: runs a changed copy from DIR in place of the built-in program. A changed copy is a deployment like any other: any program it starts other than theelucid8command itself is asked about first, as for any deployment.
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.
elucid8 key setasks for the key once without showing it (or reads one line of standard input when that is not a terminal), checks it with Anthropic (listing the models, which costs nothing) and keeps it in a file only you can read (keyin eLucid8's settings folder:~/Library/Application Support/elucid8on macOS,%APPDATA%\elucid8on Windows,~/.config/elucid8on Linux (or$XDG_CONFIG_HOME/elucid8); on macOS and Linux its mode is 600, and a key file others can read is not used). No system dialog asks for it.--no-checkkeeps it without checking.elucid8 key statussays whether a key is set and where from, never any of it (exit 0 when one is, 1 when not).elucid8 key forgetremoves the key file.elucid8 key limitsshows the spending caps, today's spending and the model;--session USDand--day USD(above 0, at most 50) change the caps ($2 a session and $5 a day by default), and--model NAMEchooses among the models listed.
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:
- A link in place of the program or folder of any command that takes one:
elucid8 run,elucid8 serve,elucid8 window,elucid8 playground,elucid8 check,elucid8 info,elucid8 compileandelucid8 gallery(its--programand--dir): a playground link (https://elucid8-lang.org/play#…) or an example's page (https://elucid8-lang.org/e/<id>), with or withouthttps://. It will open the program the link carries. Until then the command saysopening a link is not built in this release; download the program from the page, and reads nothing as a path. Any argument startinghttp://orhttps://counts as a link there, except the address--httptakes. elucid8 link [program.el8 | folder], which will print a program's link, to open it in the playground. Until then, open the program in the playground and copy its link there.
#Command-line options
| option | short | meaning |
|---|---|---|
--config <file> | -c | the 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-config | from 0.22.0, with run, check and serve: no configuration, even a deploy.json beside the program | |
--query <query> | -q | a 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-lite | the 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> | -o | write 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-timestamps | with 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-programs | from 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-outside | with run, check, serve and window: write outputs wherever the configuration says, also outside its folder (Outputs inside the deployment's folder) | |
--memory SIZE|none | from 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|none | from 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) | |
--spreadsheet | with 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) | |
--json | with 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) | |
--explain | with 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) | |
--force | with check --write-config: replace the file when it exists | |
--yes | with 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-open | with repl: show prints the Player's link without opening it in the browser | |
--no-player | with 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-fsync | with 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:
| query | points |
|---|---|
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 |
centre | a 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):
- on an integer dimension, it is the highest coordinate on that dimension that any input with the dimension lists, in the versions the query pins.
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:
- A query is a value's name (letters, digits,
_,.and#), then, in square brackets, its coordinates:dimension = coordinate, separated by commas. Spaces are allowed around every part, also between the name and[. A value with no dimensions is its name alone, or its name and[]. - A dimension's name is letters, digits and
_, and each dimension is named once. - A coordinate is a whole number (
4,-1; at most 9007199254740991 in size), a range of whole numbers (0..5, both ends included, not empty),lastwith an optional offset (last,last - 9) alone or as either end of a range, a text in double quotes as in JSON ("north"), as in a program, a list in braces of quoted texts and whole numbers ({"north", "east", 3}), or, in an output's box only,*. - An output channel is asked for by its name as the program writes it,
output("report"), then its coordinates:output("report")[t = 0..5]gives what the program writes to that channel, a value or an expression (from 0.24.0). A channel's name is not a value's name:report[t = 0..5]asks for a value namedreport, if there is one. The compiler's own name for a channel written as an expression,report#output, is refused, with the form to write:query "report#output[t = 1]": report#output is the compiler's own name for what the program writes to channel "report": write output("report")[t = 1]. - A query holds at most 1,000,000,000 points.
- A text without quotes is refused, with the query written with every such word quoted:
query "sales[zone = north]": a text is written in double quotes: write sales[zone = "north"]. A number is written as a program writes one: a whole number, or with a decimal point,amount = 12.5, for a dimension of real numbers; on a dimension of whole numbers such a number is refused when the query runs, unless its value is whole (2.0is 2). Other forms are refused, so1e3never becomes a text:query "x[t = 1e3]": 1e3 is not a coordinate: coordinates are whole numbers, numbers written with a decimal point (12.5), or texts in double quotes. Ranges are of whole numbers only. - The earlier form,
running@{t = 4}, is refused, with the form to write:query "running@{t = 4}": points are written in square brackets: write running[t = 4], not running@{t = 4}. - A query that cannot be read is invalid (exit 3), with a message that starts
query, then the query as a JSON string, then what is wrong:query "x[t = 5..1]": the range 5..1 is empty.
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.
- A query that could not fit is refused before anything is computed, with exit code 3: one whose answers are held together (
--format frame,npz,arrow,parquet,zarrorvega-lite) when even 9 bytes a point would pass the limit, saying the number of points, the least they need and the limit:query 1 (y): 1,000,000,000 points, held together for --format frame, need at least 8.4 GB, more than the memory limit of 8.0 GB (half of this computer's 16.0 GB): …. JSON lines and CSV are written as they are computed, so a large query in them is not refused for its size. - A run that goes past either limit is stopped, with exit code 1 and one line saying which:
elucid8 run: stopped: it used 8.1 GB, more than the memory limit of 8.0 GB (half of this computer's 16.0 GB): ask for less, or raise the limit with --memory (--memory none for no limit). Files not finished are left under their temporary names (….partial). - Under
serve, every answer is held until it is sent, so a query whose answer could not fit is answeredinvalidbefore it is computed; the service stops (exit code 1) if it goes past the memory limit; and the time limit is each request's: a query, subscription run orvaluesrequest takes at most--time, and no more than that with its ownbudgetMs, past which it is answeredoverBudget(Time budgets).
#Exit codes
Exit codes are frozen: each keeps the meaning below, and a new one may only be added after them.
| code | meaning |
|---|---|
| 0 | every query completed. Results may be eod or errors: those are results, not failures |
| 1 | a query stopped with a program error (for example the demand-depth limit). The other queries' results are still written |
| 2 | a usage error: an unknown option, or no plan |
| 3 | an invalid plan, configuration, data file or query. Nothing is computed |
| 4 | the results or the report could not be written |
| 5 | check: 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):
- Linux: two builds, each one file,
elucid8. The desktop build haselucid8 window, and 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-0on Debian and Ubuntu,webkit2gtk4.1on Fedora,webkit2gtk-4.1on Arch); the static build runs on any distribution, with every other command. The install command picks the desktop build where it finds both, else the static one (ELUCID8_LINUX_BUILD=desktoporstaticchooses).chmod +x elucid8once; there is no quarantine step. - Windows: the file is
elucid8.exe; run it as.\elucid8.exe run plan.json --config deploy.jsonin PowerShell or Command Prompt. The file is signed (Azure Artifact Signing); the first time, SmartScreen may still say "Windows protected your PC" about a new program: choose More info, then Run anyway. Quote queries with single quotes in PowerShell and double quotes in Command Prompt. Use--outto write results to a file: Windows PowerShell 5 re-encodes what>redirects. - Line endings: every output ends its lines with
\n, on every platform. Data files may end lines with\nor\r\nand read the same; but a file's version is a fingerprint of its bytes, so the same data saved with other line endings is another version. - Paths in
deploy.jsonmay use/on every platform (on Windows,\too); they are relative to the configuration's folder. - Services run as separate programs on Windows: a bare name is found on the
PATHwith the extensions inPATHEXT(nodefindsnode.exe,npxfindsnpx.cmd), and the program also receivesSystemRoot, without which many Windows programs cannot start.
#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"]} } }
- An input with no entry reads the file named after it. For each channel the program reads that
inputsdoes not bind (or with no configuration at all), the command looks for<channel>.csv,<channel>.jsonl,<channel>.ndjson,<channel>.parquet,<channel>.arrowsand<channel>.arrowbeside the configuration (beside the program when there is no configuration), and binds the one it finds exactly as{ "from": "<channel>.csv" }would (Inputs by convention). An entry for a channel the plan does not read is an error: it is usually a typo.elucid8 infolists the channels. formatsays the configuration's format,elucid8-deploy/2, and"$schema"the address of its JSON Schema, for editors and tools:elucid8 initandelucid8 check --write-configalways write both, first. Every other section is optional. A configuration withoutformatis read aselucid8-deploy/2, andelucid8 checkwarns that it does not say so. A configuration of the format before (elucid8-deploy/1, withsourcesandservices) is refused with a message saying what moved, and so is a plan compiled for it: compile the program again.- The schema:
elucid8 schemaprints the JSON Schema (2020-12) ofdeploy.json, offline; it is published athttps://elucid8-lang.org/schema/elucid8-deploy-2.json. It is made from the table of fields the command's own reader uses, so it names every field each object takes and its type;elucid8 checkstays the authority on the rules between fields (a field for stored data on an input answered on demand, for example). - Paths are relative to the configuration file's folder.
- Every object accepts only the fields listed here. An unknown field is an error, so a misspelt option is never silently ignored.
#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.
- Columns: a column per dimension, sorted by name, then
<channel>_value."order"puts them in another order (each dimension once, then<channel>_valueif you like); it renames none. - Columns named as you choose: one channel written wide (
"wide": "col") over a dimension whose coordinates are the names:output("table") = restrict (if #col == "total" then total else if #col == "best" then best else eod) to (col : {"total", "best"}) endwritesday,total,best, the coordinates in the order the bound lists them. Withorder, name the wide dimension too (["day", "col"]). See An output written wide. - Rows: along a dimension with no end along which the value reads stored data, the coordinates the data lists, with no row for a coordinate it skips;
"over": "day = 0..last"writes every coordinate from 0 to the newest (overnames every dimension of the output:*for the coordinates the data lists, the list itself for one bounded by a list,"day = 0..last, col = {\"total\", \"best\"}")."skip": "eod"leaves out eod records. An output over a dimension with no end along which it reads no data (one only#igives, or one bounded by a value the program computes) is a stream, whichelucid8 runwrites until it is stopped: bound it by a number, or give it"until". - A cell with no value: in CSV the value cell is empty and
<channel>_kindsays why (eod,error missing, …), with the error's cause in<channel>_message;--csv-wordswrites the value column alone, witheodanderror: …in words (Output formats). The empty text,default(v, ""), is written"", an empty field to CSV readers. - The folder:
elucid8 runandelucid8 servecreate atofile's folder when it is not there (outforout/report.csv), as apartitioncreates its own.
#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:
- When: for each channel the program reads that has no entry in
inputs, inelucid8 run,checkandserve(and itsreload). - Where: beside the configuration; with no configuration, beside the program (not in the folder the command runs in).
- Which files:
<channel>.csv,.jsonl,.ndjson,.parquet,.arrowsand.arrow. The file is read as{ "from": file }reads it: by its format,<channel>_valueorvalueas the value column, a column<channel>_tsortsas the timestamps (What a file lacks). - Exactly one: two or more such files for one channel are refused, naming them; an entry in
inputschooses one. None at all is refused, naming the files looked for and theinputsentry that would bind one. - Inputs answered on demand (a built-in, a recording, a program of yours) always need their entry; so does a file named otherwise, or read with settings (
value,time,columns, …). A configuration may bind some inputs and leave the rest to the convention. - Outputs go to
<channel>.csvwhen nothing says otherwise (outputs), so an output file is read as the input of the same name by the next program in its folder.
#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" } } }
| field | for | meaning |
|---|---|---|
from | all | a 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) |
format | files | "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) |
fill | all | what 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 |
ragged | stored | true 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 |
kinds | all | the 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 |
value | stored | the 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 |
wide | stored | one 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 |
columns | stored | for 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 |
time | stored | the 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, thousands | CSV | how 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) |
quoted | CSV | how 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) |
absent | CSV | cells 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 |
names | stored | which 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 |
row | stored | one 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, over | process, connector | the 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" } }
}
from | meaning |
|---|---|
{ "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):
from | meaning |
|---|---|
{ "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": true | a separate program that answers questions, one JSON line per request and reply |
And these fields, besides fill and kinds:
| field | meaning |
|---|---|
arguments | the 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 |
deadlineMs | the 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, config | whether questions may be repeated; a configuration sent with every question |
record | a 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:
- it runs in the configuration's folder; a command given as a relative path (
./scorer) is relative to it, and a bare name (node) is found on thePATH; - it receives only the environment variables
envnames (and its protocol's variable; on Windows, alsoSystemRoot); withoutenv, none. Name what it needs, for example"env": ["HOME", "ANTHROPIC_API_KEY"]. Names only:"API_KEY=…"is rejected; timeoutMsbounds how long one question may take. A program that crashes, hangs or answers badly makes that question fail with an error, and is restarted for the next one.- each question is one JSON line,
{"id", "channel", "point", "attempt", "startMs", "config"}("point": {"amount": 1250}, the input's coordinates by dimension), and the program's environment holdsELUCID8_INPUT_PROTOCOL=elucid8-input/1. It replies as a data service does,{"id": n, "value": …}or{"id": n, "error": {"code", "message"}}, or with{"id": n, "none": true}when it has nothing at the point (which is missing data, or the value the entry'sfillgives).
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
| field | meaning |
|---|---|
csv or jsonl | the 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) |
unknown | what 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) |
save | with "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:
| field | meaning |
|---|---|
everyMs | a fixed period: coordinate k at k × P ms |
timestamps | the times inline: [0, 100, 200] (coordinate i at the i-th) |
csv | a file with the header tick,ms, then one row per coordinate: 0 to n − 1, each once, in any order, with times strictly increasing |
jsonl | one {"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
| option | default | meaning |
|---|---|---|
pointCache | false | keep 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) |
sourceCache | false | keep data read from files across queries |
cacheBytes | none | a 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 |
maxDepth | 1,000,000 | how deep a chain of demands may go before the query stops with a program error (a chain of demands that never ends) |
maxAggregate | 1,000,000 | the 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, sweepFloor | 65,536 | when 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 |
autoRetainBytes | 1,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 |
groups | true | compute 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 |
singleIterations | true | compute 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 |
checkRetention | false | check the memory freeing by recomputing: slower, for testing |
boxKernels | true | compute 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 |
checkBoxKernels | false | check those loops by computing every element they give one at a time as well: slower, for testing |
boxCells | 4,194,304 | the 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 |
auditRecompute | false | count 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 |
threads | as many as the machine has | the 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 |
elementLevels | true (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 |
historyDepth | 100 | for 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 } ]
- Not stable:
queriesmay change, or move out ofdeploy.json, before 1.0.outputsandelucid8 run --querysay what to compute too. - A string is a query, as on the command line.
- An object gives
query(a query as text), orvalueandpoints(a list of points), and optionally:snapshot: the versions to use for this query, by label or version id, input by input (the others use theirpin);tile: whether to compute the points together, as one block. A query as text is a block unless"tile": false, which computes its points one by one; a list of points is computed one by one unless"tile": true. The answers are the same (Queries).
#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 } }
| field | meaning |
|---|---|
to | a 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 |
timestamps | true 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 |
order | the 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"]) |
wide | from 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 |
skip | from 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) |
row | a 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) |
over | the 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 |
rows | the 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 |
partition | writes 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 |
parts | writes 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, every | for 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, batch | for a connector or a program, as for inputs |
outside | true 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) |
spreadsheet | true 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 |
- Channels side by side. A key that is a file's name (with a
.or a/, which a channel's name never has) lists the channels written into it side by side, one column each named by its channel (running_value,ratio_value):"report.csv": {"channels": ["running", "ratio"]}, or the object form,"report.csv": { "channels": ["running", "ratio"], "timestamps": true }. The channels must have the same dimensions and the same rows;elucid8 checkrefuses them otherwise, naming each channel's dimensions or rows. A channel written into a file is not also written to its own file, and a channel listed in two files is refused. - Channels side by side to a database or a program. Under a name that is no channel's, an entry with
channelsandtowrites them side by side to that destination, under the same rule as a file of them (the same dimensions and the same rows):"results": { "channels": ["total", "share"], "to": { "connector": "postgres", "settings": { "table": "results" } } }. Each record holds every channel's outcome;--output resultsselects them. - An output in parts. A large output can be written a part at a time, a run each:
elucid8 run plan.json --config deploy.json --output report.csv --rows "customer = 0..9999", then10000..19999, and so on; or"rows"in the output's entry. The parts together are the whole, record for record. A run writes its file whole, so to a file each part goes to the file the entry names when it runs (move it, or name another, before the next part); to a database or a program, each part's records are added to those before, upserted by their key. - Several files in one run.
"parts"lists the files an output is written as, each with its rows, as--rowsgives them (inside the output's own, or the configuration is refused), and its file:"chunks": { "channels": ["mid", "slip"], "parts": [{ "rows": "sym = 0..99, i = 0..74373", "to": "chunk-0.parquet" }, { "rows": "sym = 100..399, i = 0..12000", "to": "chunk-1.parquet" }] }. One run writes them in turn, the data read once, each file under a temporary name renamed when complete; each file is the one a run with--output chunks.parquet --rows "…"writes for those rows, byte for byte. The files are Parquet, Arrow (.arrowsa stream,.arrowthe file format), CSV or JSON lines, all in one format (from the files' names, or the entry'sformat), with the columns' types of the first file with records. A part's rows may be any box inside the output's, so each part can end where its own rows end (the trades of the symbols in it), which a partition cannot. - A folder of parts. With
partition, one run writes the output as a folder of files, a part each, the data read once and the parts computed in order, each written under a temporary name and renamed when complete, so a reader can take each as it appears."out/training/": { "channels": ["orders_7", "spend_30"], "partition": { "customer": 10000 } }writesout/training/customer_range=0-9999/part-0.parquet, thencustomer_range=10000-19999/…, and so on;{"zone": "values"}writeszone=north/part-0.parquetand a folder for each zone (its value percent-encoded where it is not a letter, a digit or-_.~). A partition by values leaves the dimension's column to the folder's name, as Hive-style datasets do; one by ranges keeps it in the files (the folder is namedd_range=a-b, so a reader's columndand the folder's do not clash). Several dimensions nest, in the output's order of dimensions. The parts are Parquet (the default), Arrow (each part an Arrow file,.arrow), CSV or JSON lines (format, or the folder's ending). Each part's records are exactly the output's records restricted to the part, so the parts together are the output, record for record; every part has the columns' types of the first part with records, and a value whose type changes from part to part fails as one whose type changes from batch to batch does (exit code 4). DuckDB reads the folder as one table (read_parquet('out/training/**/*.parquet', hive_partitioning = true)), and so do Polars (scan_parquet,scan_ipc), pyarrow (pyarrow.dataset.dataset("out/training", partitioning="hive")) and pandas (read_parquet("out/training")). A run writing into a folder of earlier parts removes them first; a folder holding anything else is refused. A part spans the output's rows along every other dimension: a part of 400 symbols of a box over every trade number holds each symbol's rows up to the busiest symbol's last trade, eod past its own. - The rows of a channel, along each dimension of its value: a bounded dimension, its coordinates; a dimension with no end along which the value reads stored data, the coordinates the data lists (numbers first, ascending, then texts in Unicode order, each once, no row for a gap); a dimension with no end reading no data along it, a stream from 0, written forward, flushed tick by tick, until
until, or until the run is stopped. A value with no dimensions is one record. - Each channel's cells are exactly its own query's over its rows: its values, its eod cells and its errors, with where each error arose. Channels written side by side are computed side by side, a few thousand records at a time, and a value several of them read is computed once.
- With no entry, a channel is written to its own file,
<channel>.csv, also when it is the run's only output;"to": "-"sends it to standard output. Without a configuration, the files are written in the current folder. A channel's default file is never a data file of the configuration: such a configuration is refused, until the channel is given ato. - Memory: JSON lines, CSV and a program receive the records as they are computed; Arrow and Parquet hold a batch (a row group) of 262,144 records at a time (about 9 bytes a value for numbers);
.npzholds the whole box, as a frame does. - A program error stops the output: the records before the first one not computed are written, the error is printed on standard error and in the report, and the exit code is 1. A file is written under a temporary name (its name with
.partialadded) and renamed when its records are all written; a stream is written in place, so that a reader can follow it. - The files' formats are under Records.
elucid8 infoandelucid8 checklist each channel with its rows, and--output NAMEselects channels.
#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)
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}
boxis the entry'sover(a dimension it does not give, and every dimension withoutover, is asked for whole);haveis the version of the rowselucid8holds from the program's last answer, ornull.- The program answers the version of what it read and the rows,
{"id":1,"version":"3f2a…","rows":2}, followed by that many lines, one row each, written as a JSON-lines data file writes one ({"customer":7,"hour":31,"value":1250};outcomefor an error); or, when its version is stillhave,{"id":1,"version":"3f2a…","unchanged":true}and no rows. - The version names the data it read (a hash of the rows, a database's snapshot or transaction id): a new version is taken as a file's new version is, so with
pointCachea query reuses every value that read only points the two versions agree on, and computes again exactly the others. A program that answers"version": nullcan be used, but nothing computed from its rows is reused by a later query. - A program that cannot answer (it fails to start, stops, does not answer in time, answers
{"id":1,"error":{"code":"…","message":"…"}}, or a row that is not a row) makes every point of the input an error that names it, "input spend: its connector failed: …", never a value; the run goes on. - A missing point is missing data (eod past the last row along a dimension declared
inf), or the value the entry's"fill"gives, as for a file.
#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}
- Each message is answered
{"id":2,"ok":true}, or{"id":2,"error":{"code":"…","message":"…"}}. - A message that fails is sent again, up to
attemptstimes in all (default 3, at most 10), the program started again first if it stopped, and sentbeginagain. A record's key is itscontext: a program that stores records by key (writing a record whose key it holds over the old one) holds each record once, whatever was sent again. If a message still fails, the output fails, with exit code 4. - In
elucid8 serve,{"id": "s1", "op": "subscribe", "output": "training_rows"}sends every record now, and after each change to the data its values can read, only the records whose outcomes changed (the long-running service).
#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"] } } }
connectoris the connector's name;settings(an object; default{}) are its own settings, such as a table or a query; every other field is the entry's (env,timeoutMs; an input'sover,fill,names,time; a destination'sattempts,batch).elucid8runs it aspython -m elucid8.connectors.<name> <settings as JSON>, with the Python thatELUCID8_PYTHONnames (a path, or a command on thePATH), elsepython3(pythonon Windows). That Python needs the package and the connector's extra. The Python package setsELUCID8_PYTHONto its own interpreter when it runselucid8.- Credentials go in environment variables the entry names in
env, never insettings. - The connectors are
postgres,duckdb,mysql,sqlserver,s3,kafka,mqtt,http,snowflake,bigqueryanddatabricks(the last three inputs only); each one's settings, with a recipe, are in Connecting eLucid8 to your data.
#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"
| cell | read as |
|---|---|
empty, NA or null (as written), or one of the entry's absent markers | missing 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 fault | an error with that message (error alone: the message "error") |
true, false | a boolean |
a number as JavaScript reads it: 12.5, -3, 1e3, .5, 0x1F, Infinity | a number (NaN is not a number here: it is text) |
| anything else | text |
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" |
- An integer coordinate must be a whole number (and not empty); a label coordinate is the cell's text.
- Where
eodmay be written. The wordeodin a value cell says the data end there, so it stands only where data can end: as the last row of its line (every other coordinate fixed) along each dimension of whole numbers the input declaresinf. Inside a bound or a list, before that last row, along texts (which have no order) or in an input with no dimensions, it is refused, with the file, the row and the column:x.csv:3: eod written in column value inside the range the program gives the input: …. For a reading that did not come, leave the cell empty (missing data). The files eLucid8 writes record eod in their_kindcolumn (CSV, Arrow, Parquet) or a JSON line'soutcome, and read back exactly as written, anywhere. - Blank lines and lines starting with
#are skipped. A UTF-8 byte-order mark is ignored. - Fields may be quoted:
"a, b", with""for a quote inside, and spaces around the quotes. A field cannot span lines. - A row must have exactly as many fields as the header (quote a value that holds commas), and the header may not name a column twice.
#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"
}
- Separators:
"separator": ";", a tab ("\t") or"|". A header with one column that holds a;, a tab or a|is refused with the line to add. - Numbers:
"decimal": ","and"thousands": "."read1.234,5as 1234.5, in value cells and real-number coordinates. A cell that does not read as a number in that form is text. - Quoted files: a file that quotes every field (
"WINE","12.5", as many portals export) is read as if unquoted, so"12.5"is a number;"quoted": "text"keeps quoted fields as text,"quoted": "read"reads them as unquoted in any file. - Missing data: an empty cell,
NAandnull(not quoted) are missing data; other markers are listed inabsent(["N/A", "?"], or[-200], a number matching any cell that reads as it). A quoted"NA"is the text NA, and eLucid8 writes a textNAornullquoted, so it reads back as text. checkwarns where a column holds numbers written in quotes, or a marker the entry does not list (N/A,-,?, …, or a round negative number such as-200or-999in at least 1% of the rows), with the line to add.
#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.
- Two columns:
"column": ["Date", "Time"]reads each row's time from both, joined by a space, in the format given for the two ("dd/mm/yyyy HH.MM.SS"). - Dates as days:
"columns": {"day": {"column": "date", "as": "days", "format": "dd/mm/yyyy"}}. elucid8 initguesses the format from the file: the year first givesyyyy/mm/dd; a first part above 12 gives days first, a second part above 12 months first. When no day above 12 decides, it asks, and with--yesit takes months first (as in ISO 8601) and says so.
#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"}
- Each dimension: an integer, or text for a label dimension.
- Either
value(a number,trueorfalse, text, ornullfor missing data, as an empty CSV cell is) oroutcome, an outcome as the results write it (Output formats): for an error, or for a number JSON cannot hold, such as{"kind": "value", "value": {"special": "Infinity"}, "ts": 0}. - Other fields are ignored; blank lines are skipped.
#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:
- Columns by name, as in a CSV header: each dimension's, the value's (
<input>_valueorvalue, or the entry's"value"), and the time column (<input>_tsorts, or the entry's"time"; Columns named after their channel). Other columns are ignored, whatever their type. - Cells: a number is a number (an integer must be one a double holds exactly: any up to 2⁵³ in size, and some larger, such as 2⁶⁰), a boolean a boolean, and text is always text, as a quoted CSV field is. A null value is missing data, as an empty CSV cell is (the entry's
fillreads it as a value instead); only a_kindcolumn beside the value (<input>_kind, as eLucid8's own records write it) says eod. A coordinate must be a whole number; a label (or a name) is the cell's text, or a number's digits. A timestamp column (TIMESTAMPin Parquet,timestampin Arrow, in seconds to nanoseconds) gives milliseconds, rounded down. - What is read: Parquet row groups, data pages version 1 and 2 and dictionary pages, uncompressed or Snappy, with the types
INT32,INT64,FLOAT,DOUBLE,BOOLEANandBYTE_ARRAYtext, signed or unsigned; Arrow record batches (uncompressed) with the typesint8toint64,uint8touint64,float32,float64,bool,utf8,large_utf8, dictionary-encoded columns of these, andnull. - Refused, with a message saying what to do: other compressions (ZSTD, gzip, LZ4, Brotli; compressed Arrow bodies), nested columns (lists, structs, maps), decimals, dates and times of day, Parquet's
INT96and fixed-length columns, and big-endian Arrow data. Only the columns a source reads are checked: a nested column it does not read is ignored. - Errors name the file, the row group (Parquet) or batch (Arrow), and the row, both counted from 0:
x.parquet: row group 1, row 230: this point is already listed at row group 0, row 4. - Row groups and batches are read on every thread, and the file's version is the hash of its bytes, as for CSV.
#Every format
- A point listed twice is an error, naming both lines.
- errors name the file and line:
x.csv:4: this point is already listed on line 2. - A point the file does not list is missing data (an error of kind
missing), or the value the input'sfillgives; along a dimension declaredinf, past the input's last row along it, it is eod. - Large files are fine: a million-row CSV loads in about a tenth of a second, in about 30 MB (measured on an Apple M5 Max).
#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 without a column (CSV) or field (JSON lines) named after one of the input's dimensions is refused. In CSV, Parquet and Arrow the header or schema decides; in JSON lines, any line without one of the fields does:
input temp (temp.csv): no column zone, a dimension of temp; its columns are t, Zone, value(for several,no columns t, zone, dimensions of x; its columns are u, value), orinput temp (temp.jsonl): line 2 has no field zone, a dimension of temp; its fields are t, value. A dimension the entry reads from the rows' positions (row) or from the value columns' names (wide) needs no column. - The value column is
<input>_valueorvalue, or the one the entry names ("value": "price"), and it must be there: a file without it is refused (exit code 3), as is a file without the time column the entry names. - A column (or field) named
<input>_tsortsis the rows' timestamps, as"time": "ts"would say, when the entry names notimeand it is neither one of the input's dimensions nor its value column (<input>_tsfirst, when the file has both). An entry'stimewins: with"time": "ms", a columntsis ignored like any other, and with"time": "none"the file gives no timestamps at all. - An input with no dimensions is one value: its file holds one row, with the value (and its time, and the
<input>_kindand<input>_erroreLucid8 writes beside them) and no other column or field. Any other file is refused:input x (x.csv): 2 rows, but x has no dimensions: its file holds one value,input x (x.csv): no row, but x has no dimensions: its file holds one value,input x (x.csv): columns other than the value (t), but x has no dimensions: its file holds one value; its columns are t, value, or for JSON linesinput x (x.jsonl): line 1 has fields other than the value (t), but x has no dimensions: its file holds one value. - Rows sent to
elucid8 serve(advancewithrows) that do not fit are refused (statusinvalid), and nothing is appended:advance x: x.jsonl (rows appended): these rows do not fit the program: line 3 has no field t, a dimension of the input; its fields are value, the line counted in the file with the rows after it. Anadvancewith a file that does not fit is refused with the messagecheckgives for it.
#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.
- The dimension is a whole-number one (not one whose coordinates the program makes texts, nor one read through a name map), and the file may not have a column (or field) of its name: either could give the coordinate, so it is refused, with the file and line.
- Several entries reading one file (one per column, as above) give each row the same position.
- Read wide too (from 0.22.0;
"row": "i", "wide": "column", below), a row gives a point per value column, all at its row's position: the filea,b,cwith rows1,2,3and4,5,6is rows 0 and 1, three columns each. - The version is the file's, the hash of its bytes, as always.
- In
elucid8 serve, rows appended to a version (advancewithrows) continue the positions from the file's last row; a whole new file (advancewith a file) is numbered from 0 again. A value computed from a row is reused after a whole-file advance only if the new file has the same row at the same position: inserting a row near the top moves the rows after it, so their values are computed again. - An output with
"row": "i"writes the records back in that order, without anicolumn.
#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.
- The value columns are every column that is not one of the input's other dimensions, the time column or
outcome; each column's name is a coordinate, read as a coordinate cell is: where the program does not say the dimension's kind, a name that is a whole number written plainly (2024) is a number, any other ("wind speed", a quoted"12"in a CSV header) a text (from 0.22.0; before, always a text). A header with no value column is refused; so is a column named after the dimension read wide. - Beside a value column
c(from 0.22.0), columnsc_ts,c_kind,c_message(CSV) andc_error(Arrow, Parquet), as an output written wide writes them, are read with it:c_tsthe cell's timestamp,c_kindandc_messageits kind and the error's message,c_errorits Error; they are not value columns of their own. - A cell is read as a
valuecell is: empty is missing data,eodis eod,error: …an Error of kinddata, and so on. In JSON lines each field of a line other than the dimensions and the time is a point; in Parquet and Arrow each column other than those. - Not with
value,rowor a name map for that dimension. - In
elucid8 serve, rows appended to a version (advancewithrows) are read wide too, and so is a whole new file. - A program serving an input's rows may serve them wide:
{"from": {"process": [...]}, "wide": "quantity"}. - A connector of the Python package unfolds such a table itself when its settings say which columns:
"settings": {"table": "readings", "wide": {"dimension": "quantity", "columns": ["temperature", "humidity"]}}serves a row per value column (the dimension at the column's name), so the input reads ordinary rows and keeps every cell's outcome (an error cell, NaN, −0).elucid8 initwrites it so for a connector.
#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.
- The columns are the other dimensions (but the
row), then one per coordinate of the wide dimension, in the rows' order: a dimension bounded by a list (restrict … to (col : {"total", "best"}) end) in the list's order; one whose coordinates the data list, numbers ascending, then texts in Unicode order (the rows of a channel). To keep another order, give the rows inover:"over": "row = 0..2, col = {\"name\", \"city\", \"age\"}". A coordinate's column is named as it is written (2024,north); in a CSV header a text that would read back as a number is quoted. - The cells are written as a channel's are: in CSV each coordinate has
<coordinate>(values only, empty where the answer is eod or an error),<coordinate>_kindand<coordinate>_message(--csv-words:<coordinate>alone, witheodanderror: …in words), and with"timestamps": trueits timestamp in a column<coordinate>_ts; in Arrow and Parquet each coordinate has<coordinate>,<coordinate>_kind,<coordinate>_errorand<coordinate>_ts, as a channel has. Read back with"wide", a file written wide gives the points it was written from, with their kinds, values, Errors (Arrow and Parquet; in CSV an Error is its kind and message) and timestamps. - Refused before anything is computed, each with what to write:
widenaming a dimension the output's rows lack, itsrow, or a stream's dimension; channels side by side (give the channel a file of its own); JSON lines, NumPy, Zarr, frames, Vega-Lite and Constant ("format": "csv","Arrow"or"Parquet"), and a program;partition,partsorrowscutting the wide dimension; and two columns that would have one name (a coordinate named like another dimension, or like another coordinate's_kindcolumn). - With
partitionorpartsalong other dimensions, each part is written wide; a stream along another dimension is written wide a tick at a time.elucid8 checksayswritten wide along col, columns a, b, c, andcheck --write-configkeeps the field. The Python package'srun(outputs={"data": {"wide": "col"}})gives the wide table.
#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.
- Channels side by side: a record is left out only when every channel in it is eod. Written wide: a row is left out only when every cell in it is eod. An Error is never left out.
- In CSV, JSON lines, Arrow, Parquet, Vega-Lite (the chart's data) and Constant (a line per value that is not eod), and with
--rows,parts,partitionand streams (a tick's eod records). Records sent to a program leave them out too. NumPy and Zarr are refused: they are grids over the rows, whose gaps are their eod cells (kind"press"). elucid8 checksaysrecords that are eod left out(rows whose every cell is eod left outwritten wide), andcheck --write-configkeeps the field. A value other than"eod"is refused, with the line to write.
#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.
- An input reads the column
<input>_value, orvalue; and its timestamps from<input>_ts, orts. When a file has both, the one named after the input wins. An entry's"value"or"time"says otherwise, and then no column is looked for by name. - Other channels' columns in the file (
ratio_valuebesiderunning_value) are other columns: ignored, as any column the input does not read. - A CSV file's kinds and errors come back from
<input>_kind,<input>_messageand<input>_ts: every outcome's kind, error kind, message and timestamp as written. With<input>_origin(written with--triple), an error that started at another point reads as passed on from that point, so its answers say where it started; one that started at the row's own point reads as the input's own. A CSV file cannot give back the chain between an answer and where its error started (an error read with its origin reads as passed on in one link; without_origin, as starting at the input's point), a data service's failure message (its code comes back), or a missing version's source and version (an errorotherwith the same message). A file in the compact form (--csv-words) is for reading: it gives back values, and itseodcells only where a person'seodmay stand (below, the last row of a line along a dimension declaredinf); its errors read as errors of kindother, and an error cell in quotes (its words hold a comma) reads as text. Use JSON lines, Arrow or Parquet where every detail of an error must come back.
#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.
- An input with several versions (
versionsin its entry'sfrom) uses the onepinnames, unless a query'ssnapshotnames another. - Each query reads one version of each input from start to finish, so its answers are consistent.
- With
pointCacheon, a query under a new version reuses every value that read only points the two versions agree on, and computes again exactly the others. - A result records its versions: the
--report(and every reply ofelucid8 serve) names the versions each query read, so a result can be reproduced from the same files.
#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:
- CSV (files mostly for people and spreadsheets) carries no timestamps unless asked:
--timestamps,"timestamps": truein the configuration'soutputor on an output, ortimestamps=Truein the Python package. Then a<value>_tscolumn after each<value>_value(a query'sratio_ts; an output channel'sreport_ts). - JSON lines, Arrow, Parquet, NumPy, Zarr and Vega-Lite (files mostly for other programs) carry them unless asked not to:
--no-timestamps, or"timestamps": false. A program that reads such a file then gets the timestamps of the answers it reads. - Frames,
elucid8 serve's replies and the MCP tools always carry them: they are for looking at answers.
#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}}
context: the point's coordinates, for the value's own dimensions, in the order the query names them (as in frames and the binary formats; for a query given as a list of points, in the value's order).outcome:{"kind": "value", "value": …, "ts": …},{"kind": "eod", "ts": …}or{"kind": "error", "error": its kind, "message": …, "ts": …};tsis the timestamp in milliseconds, always written (here every timestamp is 0:x.csvhas no times). An error's kind is one ofmissing,late,failed,division,non-finite,empty,assert,type,index,data,raisedandversion;originsays where it started, as{"name", "context"}; an error passed on from another value addsvia,{"length": the links, "path": [the values it passed through]}, and a late answer, a service's failure or a non-finite result addsdetail({"deadlineMs", "completedMs"},{"code"},{"op", "result"}). For example{"kind":"error","error":"missing","message":"input reading has no data at this point","origin":{"name":"reading","context":{"t":1}},"via":{"length":1,"path":[{"name":"reading","context":{"t":1}}]},"ts":2000}.- A query stopped by a program error adds
{"name": …, "programError": "…"}after the points it computed.
#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,
- A header with
name, every dimension of the values queried (in the order the queries name them, first appearance first), then for each value queried (in the order first queried)<value>_value,<value>_kindand<value>_message; with--timestamps,<value>_tsafter them (each point's timestamp, in milliseconds), and with--triple,<value>_origin(where an error started, as a query:reading[t = 1]). The columns are the same whatever the answers, with or without errors. Each row fills its own value's columns and leaves the other values' empty, as it does a dimension its value does not have. A file written for one value reads back as the input of that name with no mapping (Columns named after their channel), every outcome's kind, error kind and message (and timestamp, with_ts) as written. <value>_valueholds data only, so that pandas, Polars, spreadsheets and databases read a column of numbers as numbers: numbers as JavaScript prints them (keeping-0),trueandfalse, text as it is (Ann,New York), in quotes only where it would read back as something else ("12","true","eod","error: x", and the empty text as"") or where CSV needs them (a comma, a quote, a line break, a space at either end); empty for eod and errors. A text coordinate is in quotes where it would read back as a number ("10","1.5").<value>_kindisvalue,eod, orerrorand the error's kind (error missing,error division,error empty,error non-finite,error assert,error late,error failed,error type,error index,error data,error raised,error version);<value>_messagethe error's message (division by zero,late (30 ms > deadline 20 ms)), empty for data and eod.--csv-words(or an output's"csvWords": true) writes the earlier, one-column form instead, for reading (read back as an input's data, itseodcells are a person's words, refused inside a bound):<value>_valuealone, witheod, an empty cell for missing data, anderror: …with the error described in words (error: via total[t = 0]: late (30 ms > deadline 20 ms)).- Program errors go to standard error only. Use JSON lines when every detail of an error matters.
#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":{}}
| field | meaning |
|---|---|
name | the value queried |
axes | one 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 |
type | number, boolean or text when every value has that type; json when they mix or include a list; none when no cell is a value |
values | one 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 |
kinds | one per cell: 0 a value, 1 eod, 2 an error |
kindNames | the words of the codes in kinds: ["value", "eod", "error"] |
ts | the 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 |
errors | each error cell's index (as text) and its error, as JSON lines write it. Empty when there are none |
programError | only when a program error stopped the query (below) |
- A frame holds exactly the JSON lines of the same query, cell by cell: cell i is the i-th line's point and outcome.
- Read
valueswithkinds.nullalone cannot tell eod from an error; a reader that ignoreskindsstill seesnull, never a plausible number. - A program error (exit code 1): the frame holds the cells computed before it, in order, so
valuesandkindsare shorter than the box, andprogramErrorgives the message. - Only queries over a box make frames: a query written as text. A configured query given as
valueandpointshas no axes, so with--format frameit is an invalid query (exit code 3). - Size: a 64 × 64 grid of numbers is about 81 KB as a frame and 375 KB as JSON lines.
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"}}
| member | what 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.json | the axes, as in a frame |
frame.json | the 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.json | only 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 |
- Values NumPy cannot hold as one array are in
<value>_value.jsoninstead of<value>_value.npy, as the frame'svalueslist (nullwhere a cell is not a value): when the type isjson(types mixed, or lists), and for text ending in the NUL character, which NumPy would drop. A frame of typenonehas<value>_valueall 0. - A program error (exit code 1):
<value>_valueand<value>_kindhold the cells computed before it, in order, as one-dimensional arrays, andframe.jsonhasprogramError. - One query per file. For several queries in one run, give an output name with
{n}or{name}(below); without one, two queries with--format npzare an invalid query (exit code 3), as is a configured query given asvalueandpoints. - In Python,
numpy.load("ratio.npz")["axes.json"]gives the bytes of a JSON member;json.loadsreads them.
#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
| column | what it holds |
|---|---|
| one per axis, named after the dimension | the 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>_kind | the words value, eod or error, dictionary-encoded (pandas and Polars read a category, DuckDB text) |
<value>_error | null, except in an error's row: its kind (missing, division, …), dictionary-encoded |
<value>_origin | null, 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>_message | null, except in an error's row: its cause in words, dictionary-encoded |
<value>_ts | int64: the cell's timestamp, one per row (left out with --no-timestamps) |
<value>_trail | null, 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 |
Dictionary-encoded columns hold each distinct text once; a row holds its text's index. The origin, message and trail dictionaries list the file's texts in the order of their first use, and their indices are the smallest integers that number them:
int8up to 128 texts (always, when no row is an error),int16up to 32,768,int32beyond. Every reader gives the same texts whatever the width (pandas and Polars a category, DuckDB text). An output's records in Arrow, written batch by batch as they are computed, hold these three columns asstring.The schema's metadata holds
elucid8.format(elucid8-table/1: a file with another is refused as an input, naming the form to write),elucid8.name,elucid8.type,elucid8.axes(the axes as JSON) and, when one stopped the query,elucid8.programError; the rows are then the cells computed before it.One query per file, as for NumPy, and several queries in one run the same way.
A stream, not a file: read it with
pyarrow.ipc.open_stream(or Polars'read_ipc_stream), notopen_file. The stream is one record batch with every row.
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
- The columns are the Arrow table's: one per axis (
INT64, or aSTRINGfor labels),<value>_value(DOUBLEfor numbers,BOOLEAN, or aSTRINGfor text and for a mixture's JSON; null where a cell is not a value),<value>_kindand<value>_error(STRINGs, dictionary-encoded: the wordsvalue,eodorerror, and an error's kind, null elsewhere),<value>_originand<value>_message(STRINGs, null except on errors),<value>_ts(INT64) and<value>_trail(aSTRING, an error's detail and chain as JSON). - The file: row groups of 262,144 rows, each column in one data page (the kind and error columns after their dictionary page), uncompressed, with no statistics. The footer's metadata holds
elucid8.format(elucid8-table/1),elucid8.name,elucid8.type,elucid8.axesand, when one stopped the query,elucid8.programError. - One query per file, as for NumPy and Arrow, and several queries in one run the same way.
#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
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:
| format | a record | eod 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 one | in 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 table | v_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_trail | as 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 |
| Constant | each record's value on a line of its own, plainly (Constant) | eod, and error: … with the error described in words |
- Parquet writes the records in row groups of 262,144, with the types and the rule for a type that changes of Arrow (below). Its footer comes last, so its metadata (
elucid8.output,elucid8.values,elucid8.types,elucid8.axes) also holdselucid8.programErrorwhen one stopped the output. - Arrow writes the records in batches of 262,144, each a record batch of the stream; a value's column has the type of the first batch's values (
numberandnoneasdouble,booleanasbool,textasstring, and a mixture asstringholding each value's JSON). A value whose type changes in a later batch (numbers, then text) cannot be written: the output fails with exit code 4 and a message naming the value; write such an output as JSON lines or CSV. The schema's metadata holdselucid8.output,elucid8.values,elucid8.typesandelucid8.axes. - Read in Python:
pyarrow.ipc.open_stream("training.arrows")reads the batches one at a time (for batch in reader) or all at once (read_all());numpy.load("sums.npz")["running_value"].
#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
Compiling a plan yourself.
elucid8 compiledoes it, from 0.19.0 (above). The website compiles your program when you download it, and compiles any program sent tohttps://elucid8-lang.org/api/compile(POST the program's text; no sign-in, up to 64 KB, 30 a minute from one address). The answer is the plan, byte for byte what the repository's compiler writes, or a 422 with{"error":{"message","line","column"}}. In a Unix shell, this replacesplan.jsononly when the program compiles, and exits with 1 on a compile error:curl -sS --fail-with-body -H 'X-Elucid8-Client: agent/claude-code' --data-binary @program.el8 -o plan.new https://elucid8-lang.org/api/compile && mv plan.new plan.json || { cat plan.new >&2 2>/dev/null; rm -f plan.new; false; }From a copy of the eLucid8 repository, the compiler runs offline on Node.js 24:
node path/to/elucid8/packages/evaluator/bin/elucid8-compile.ts program.el8 -o plan.json, withpath/to/elucid8your copy's path; a compile error is reported asfile:line:column: message, with exit code 1. (npm run compile -w @elucid8/evaluator -- …runs the same compiler, but inpackages/evaluator, so give it absolute paths.)Building the command.
cargo build --releasein the repository buildstarget/release/elucid8.WebAssembly. The same runtime builds as a WebAssembly module (
cargo build --release -p elucid8-wasm --target wasm32-unknown-unknown), which runs a deployment given as bytes and returns exactly whatelucid8 runwrites. It opens no files and starts no programs: an input answered on demand is answered by the embedding program ("from": { "host": true }in its entry ininputs, which the command refuses), and programs cannot be bound as inputs or outputs. It is not offered on the website yet.Internal commands.
query,kernels,planandmathare used by the project's test drivers; they are not part of the interface described here.