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, 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 compiles the logic, registers default_user, and sets it as the sender.

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