Skip to main content

Cocolab

Cocolab is a sandbox environment for compiling manifests, simulating logic calls, and testing participant interactions with logics on MOI.

Cocolab [Compiles Manifest] → PISA Engine [Executes] → Cocolab [Displays Results]
note

Cocolab persists session state across runs. Compiled logics, registered users, state, assets, events, memory variables, access policies, and defaults are saved to ~/.coco/lab/environment on exit and restored on the next start. Use --no-persist for an ephemeral session, or --new-session to start fresh while still saving.

Starting Cocolab​

In the folder containing coco.nut:

CommandDescription
coco lab initStart with auto-setup (compile, register user, set sender)
coco lab startStart REPL only

init is recommended for quick start. It registers default_user, sets it as the sender, and compiles the logic, logging each step before the REPL opens. See coco lab init.

CLI Flags​

FlagDescription
-c, --configSpecify config name from [lab.config.name]
-e, --envOverride environment (default: main)
-o, --osOverride target OS
--no-persistDisable session persistence (state is discarded on exit)
--new-sessionStart a fresh session (ignore persisted state) but keep saving
--storageStorage backend type (default: file; overrides coco.nut)
--storage-pathBackend-specific location, e.g. a folder path (overrides coco.nut)
coco lab start -c default -e main