REPL, Eval & Watch Mode¶
ob includes built-in developer tools to speed up iteration without external utilities.
ob eval¶
Evaluate a Lua or TypeLua snippet directly from the command line:
Supports all permission flags (--allow-read, --allow-net, -A, etc.):
ob repl¶
Start an interactive Luau / TypeLua console. Simple expressions are automatically evaluated and printed:
Orbita v0.2.0 (Luau / TypeLua REPL)
ob> 2 + 2
4
ob> require("ob:json").encode({ runtime = "Orbita" })
"{\"runtime\":\"Orbita\"}"
ob> .exit
ob run --watch & Live Reload¶
Watches .lua, .tyl, .luax, .tylx, .html, .css, .js, ob.toml, and config.toml files in your project and automatically restarts your script or HTTP server whenever a file changes:
When running a web app with ob:router under --watch:
- Clean server restarts: long-running HTTP servers are restarted automatically on save without lingering port conflicts.
- Automatic Browser Live Reload: Orbita injects a tiny live-reload client (
/__orbita/client.jspolling/__orbita/live) into HTML responses, refreshing your browser automatically whenever code, templates, or CSS change. - Zero-stale-cache dev: compiled
.htmltemplates and static assets (Cache-Control: no-cache) revalidate automatically on every edit.
Combine with permission flags as needed: