LogicLab is a sandbox playground environment for compiling manifests into logics, simulating logic calls and participant interactions with logics on MOI. It has capabilities to handle basic argument parsing and is agnostic to engine runtime implementations but currently only supports PISA
.
LogicLab comes bundled with your Cocolang installation
It works on a REPL and runs within an environment that has persistent information for config, context states and compiled logics. This environment is a directory that needs to be initialised with the logiclab init
command. Every time the REPL starts, it starts within a specified environment. You may have multiple environments side-by-side.
The logiclab init
CLI command will create a new LogicLab Environment by creating a .logiclab
directory. You can choose to initialise it in a different directory using the --env
flag. To directory to initialise must not exist as it needs to be created with a fresh inventory.json
file. This inventory file contains the lookup of all created entities as well as the LogicLab’s environment-specific configuration.
logiclab init [--env filepath]
logiclab init --env ./mylogiclab
The logiclab start
CLI command can be used to start a LogicLab session in a given environment. The environment is specified with the --env
flag and defaults to the environment at the .logiclab
directory if not specified
logiclab start [--env ENV]
logiclab start --env ./envs/mylogiclab
View the LogicLab Version
The command logiclab docs
will generate a detailed LogicLab Command Documentation, offering insights into the various functionalities of LogicLab. if you're actively using a LogicLab session, you can access the documentation directly by entering the 'help' command.
- In CLI
logiclab version
Running LogicLab Formulas
logiclab run
will execute a LogicLab formula within the designated environment. The path to the script file should be provided as an argument. Ensure that the target environment directory already exists and includes an inventory.json file. The directory to custom environment can be mentioned using the —env
flag. If no env path is specified, it will use ./logiclab
as the target environment directory.
The --suppress
flag will just print the output of the last command of the script.
- Syntax
logiclab run [labscript] [flags]
- Example
logiclab run ./flipper/labscript
// Prints the output of each command in the script
Exit LogicLab REPL
>> exit