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:
| Command | Description |
|---|---|
coco lab init | Start with auto-setup (compile, register user, set sender) |
coco lab start | Start REPL only |
init is recommended for quick start — it compiles the logic, registers default_user, and sets it as the sender.
CLI Flags
| Flag | Description |
|---|---|
-c, --config | Specify config name from [lab.config.name] |
-e, --env | Override environment (default: main) |
-o, --os | Override target OS |
--no-persist | Disable session persistence (state is discarded on exit) |
--new-session | Start a fresh session (ignore persisted state) but keep saving |
--storage | Storage backend type (default: file; overrides coco.nut) |
--storage-path | Backend-specific location, e.g. a folder path (overrides coco.nut) |
coco lab start -c default -e main