What the REPL is

A live Python session on your cloud instance: send a line of Python, it runs in the simulation at once, you see the result. The main way to work with Zeon.

REPL stands for read-eval-print loop. It is an interactive Python session: you send a line (or a block) of Python, it runs at once, and you see what it printed and the value of its last expression. Then you send the next line. Names you define stay defined between lines, so each step builds on the one before.

Zeon's REPL runs on your cloud instance, inside the simulation of your robot cell. The project you loaded with zeon up is there: its world, its objects and their anchors, its skills and workflows. You send code to it from your terminal with zeon py:

zeon py 'skills.list()'
['move_plate', 'shaker_lid']

Why it is the main way to work

A skill or a workflow is a file. To see the effect of a change, you edit the file, sync it and run it again. That is how you keep work, but it is slow while you are still finding out what works.

In the REPL you try things directly against the simulated cell:

  • move an arm to an anchor and see whether the planner accepts the move;
  • read where an object sits, which anchors it has, what an arm holds;
  • run one skill with other inputs;
  • look at the result in the 3D viewer, or save a picture of it;
  • adjust and try again, in seconds, without editing a file.

When something works, write it into a skill, zeon sync, and run the skill or the workflow as a whole. The REPL is for finding out; the project files are for keeping. The web app is the visual companion: its 3D view and run screens show what the REPL did.

What to know before you start

  • It drives the simulation only. Nothing you run in the REPL moves real hardware. Real arms run workflows from a lab system; see Running a workflow on real hardware.
  • You use it through the zeon CLI. The web app has no REPL console.
  • Zeon enables it per account. Without it, the REPL commands exit with code 3 and say that REPL access is not enabled for the account; ask your Zeon contact. zeon up, zeon run, zeon wait, zeon stop, zeon reset-arms, zeon logs and zeon down work without it.
  • Every entry is logged with your account.
  • A guard checks each entry before it runs. Code that uses the skill API and the names the REPL provides runs; code that uses only the skill API, the REPL's helpers (skills, run_workflow, snapshot, say, look, gizmos, brief) and plain Python is always allowed, so the same code always gets the same answer. Code that reads environment variables, credentials, or Zeon's own modules and files is refused; nothing runs, and the message says what to use instead.

Did this page help you?