Binary
In the terminalela --spec binary
- One binary,
ela, is both shell and script runner. elawith no arguments starts the interactive shell.ela deploy.elaruns a script, andela -c 'code' [args]runs the code given as one.ela --loginis a login shell, as is an ela started as-ela: it readslogin.elafirst, then does what the rest of its command line says (Login shell).- The shell and scripts share one interpreter, so behaviour is identical.
What ela tells about itself, for a person or an AI agent learning it:
| Option | Prints | Proc |
|---|---|---|
--explain 'message' | the rule behind an error message, why ela has it, a wrong and a right way to write it, and the spec section; every message ela gives has one, and its start, past its first value, is enough | ela.explain(message) |
--spec [topic] | the section of this spec or the language spec for a topic (pipes, strings, catch, prompt), or the part of one a ### heading starts (null, switch, env.remove); no topic lists them. The specs, the editors' setup and the agent guide are built into the binary; at a terminal a section is laid out as md.render does it, elsewhere it is the Markdown it is written in | ela.spec(topic), ela.spec() |
--builtins [--json] | every built-in proc, package proc and shell built-in, with its parameters and what it does, in two columns as wide as $COLUMNS says, else the terminal, else 80: a long call breaks after a comma, its later lines indented under it, and what it does wraps in its own column. --json gives each whole, name, kind, call, params and does | ela.builtins() |
--lint [--json] file | what can be found wrong without running anything, file:line:col: error: or warning:; only errors exit 1. A file of - is the script on stdin, said as stdin:line:col | ela.lint(path) |
--check [--json] file | the first parse error, each import, relative or lib:, that finds no file or takes a built-in package's name, and each call that names no proc; or nothing. A file of - is the script on stdin | |
--translate bash [--report] script | the bash script, a line of bash or stdin (-) written as ela, what has no ela form kept as a # bash: comment and named on stderr, exiting 1; --report prints the counts and the list instead, for one script or several (From bash) | |
--fmt [--check] [file...] | nothing: it lays each script out in place, as LANGUAGE.md, Layout has it, and leaves one that does not parse as it is, with its error; --check changes nothing, prints the files that would change and exits 1; no file lays stdin out to stdout | ela.fmt(text) |
--doctor [--json] | the shell's setup, below | ela.doctor() |
--version | the release, commit, build day and platform, then a line naming the licence, BSD-3-Clause; ela --license for the texts of what is built in | ela.version() |
--license | ela's licence and those of what is linked into it: a line each, then each distinct text once, under a heading naming every part it covers | |
--agent [--save [folder] | --hooks [folder] | hook | commands [--json] line] | the agent guide, AGENT.md; --save writes it as a skill and an AGENTS.md, --hooks the hook config, hook is the hook that lets ela through and refuses the rest with its ela form, commands every command a shell line would run | ela.commands(line) |
--json gives file, ok and findings (line, col, severity, message) for --check
and --lint, and status and checks (check, result, message) for --doctor.
The procs in the last column give what their options give, as data, from the same code
(PACKAGES.md, The ela package).
What --lint finds #
ela --lint reads a script, and every file it imports, without running a line. Only an error
makes it exit 1.
It reports as errors what the run would stop at:
- a variable nothing assigns, or one read above every line that assigns it;
- a proc reading a script variable, a constant assigned,
envorkeyringtaken as a name; - a proc, package proc, struct field or enum value that doesn't exist, and a variable's field
read without its
$(${g.runs}for${$g.runs}); +between two strings, or a field read on one ("app-$VERSION.tar.gz"), where the script makes the value text;- a call with the wrong number of arguments, an argument named for no parameter or given twice, and a parameter without a default left out;
- an argument a typed parameter refuses where the script shows its type (
shout(42)fortext: string, or a call's declared result); - an assignment of more or fewer values than its call gives, and a call that gives several
values or none used as one or indexed (
re.find(...)[1], with thetrythat catches it); - a condition whose call declares a result that is no bool, and
try $( )with one name; - what
trygave compared with a number or text,try cmd == 0or$err != ""on a name onlytryassigns, which isnullor an Error; - a secret written in a
keyring.storeline, and a bare number tokill.
It warns of what may be meant:
$env.NAMEof a variable neither set here nor by the script;- a secret from the keyring or
ask.secretin a command's arguments, namingsecret_file; - a command not on
PATHhere, andprint; - a variable never read, and a change to a loop's item that nothing reads;
- a
catch signalblock covering nothing, and a line afterexit,return,breakorcontinue; - a name off the naming style, with the name to write (LANGUAGE.md, Naming
style), and
pid(N)with N below 300.