Reflex REPL environment and standalone script runner
Reflex CLI is a command-line tool that exposes the Reflex reactive programming language ecosystem both via an interactive REPL interface and via a standalone script runner interface.
Build the reflex-cli
executable via cargo
:
cargo build --release --workspace --package reflex-cli --bin reflex-cli
Once the reflex-cli
executable has compiled successfully, it can be used in one of two modes.
Run reflex-cli
executable with no arguments to launch an interactive REPL session:
$ reflex-cli
> 1.2 + 3.4
4.6
> ((x, y) => x + y)(1.2, 3.4)
4.6
> exit
The session can be terminated either by entering the
exit
REPL command or sending theCtrl+C
signal (SIGINT
)
The default REPL syntax is a subset of JavaScript syntax, provided by the ReflexJS package. Alternative syntaxes can be specified via the --syntax
CLI argument:
$ reflex-cli --syntax lisp
> (+ 1.2 3.4)
4.6
> ((lambda (x y) (+ x y)) 1.2 3.4)
4.6
> exit
For examples of using Reflex CLI to execute scripts directly, see the examples
directory within this package.
For more information on the various reflex-cli
CLI options, run the reflex-cli --help
command.
This software is distributed under the Apache 2.0 license. See the full LICENSE
text for details.