Skip to content
View source

Command line (CLI)

entelechy is the one command-line entry point; the Player also runs as its own program, entelechy-player. Every subcommand’s flags are in Class reference · Commands, generated from entelechy’s own usage text.

终端窗口
entelechy new hello --kind picture # a project that runs, with a replay
entelechy check kernels/rings.ent scene.esn # compile and check
entelechy run scene.esn --out out.ppm --watch # run, watching for changes
entelechy player scene.esn # live in a window
entelechy replay tests/*.replay # run the tests
entelechy serve scene.esn --listen 127.0.0.1:7788 # serve the protocol to agents
entelechy graph scene.esn # the flattened graph and plan
entelechy trace scene.esn --node rings --at 128 128 # step through one element
entelechy help sample # syntax and API
Command Does
new Write a scene that runs, with a replay that checks it.
check Compile documents and print their manifests or diagnostics.
run Evaluate a scene once, or keep running it as its files change.
render Step a scene for a number of frames and write each frame and the sound.
player Run the Player.
replay Drive scenes through scripted frames and inputs and check them.
serve Serve the creation protocol on stdin and stdout and on –listen.
graph Print the flattened graph and its plan.
trace Run one element of a node’s Kernel and print every binding it makes.
bench Measure a scene’s frames on one backend or several.
import Run the importer.
export Run the exporter.
help Entelechy’s syntax and API, layer by layer: all of it, or one name in full.
version Print the versions of Entelechy and of its contracts.
package Check a package directory and say what it holds.
pack Write a package directory as one archive file.
unpack Read a package archive back into a directory.

Most commands that run a scene (run, render, replay, serve, graph, trace, bench, the Player) share:

Flag Does
--backend cpu|gpu|jit picks the backend (bench also takes all; the Player defaults to best)
--library <dir|file> Kernels beyond the scene’s use
--param <name>=<literal> overrides a graph parameter
--input <name>=<path>, --output <name>=<path> places inputs/outputs elsewhere, the scene’s text unchanged
--no-fusion turns fusion off
--allow …, --grant … Host permissions and Kernel capabilities (see Capabilities & security)
--memory <MB>, --work <M>, --small <operations> Host budgets
--window <w>x<h>[@<scale>] the window window() sees
--profile prints each node’s time, backend and transfers, and each Kernel’s preparing
  • check compiles documents and prints manifests or diagnostics; it also notes Kernels large for a device’s compiler, Kernels no node uses, and nodes some of whose elements never run. --ir prints the validated IR.
  • graph prints the flattened graph, published Kernels, the order state advances in, and the plan (see Graph & state).
  • trace runs one element of a node’s Kernel on the interpreter and prints every binding it makes (real output):
$ entelechy trace scene.esn --node rings --at 128 128
rings (demo.rings@1), element (128, 128), as the evaluation at time 0 runs it
uv: Vec2 = vec2(0, 0)
r: Float = 0
band: Float = 0
-> result: Vec4 = vec4(0, 0, 1, 1)
  • help answers syntax and API from the tables the implementation executes: entelechy help (all), entelechy help window, --json.
  • version prints the versions of Entelechy and its contracts (real output):
$ entelechy version
entelechy = 0.0.2-rc.3
entelechy.api = 1
entelechy.language = 3
entelechy.ir = 1
entelechy.package = 1
终端窗口
entelechy player examples/life/scene.esn
entelechy-player editor.esn --folder disk,checks,defined,disk_ops --folder-allow file.write,file.delete

The Player’s flags and keys are in Live swap.