CLI
One command, everything
zinc help lists the commands and zinc help run describes one. A misspelt command names the closest one.
| I want to... | Command |
|---|---|
| start a project from one of 13 templates (game, 3D, dashboard, IoT, e-ink, service...) | zinc new game my-game |
| run it, with Fast Refresh and a DevTools inspector | zinc run | zinc dev |
| run plain JavaScript (three.js, PixiJS, Phaser) as it is | zinc run app.js --engine quickjs |
| set breakpoints in VS Code or Chrome | zinc debug --dap | zinc debug --cdp |
| understand an error | zinc explain Z0104 |
| test on the interpreter, in native code, on QuickJS or a simulated device | zinc test --runner aot |
| try it on a device I do not have | zinc run --simulate hp-touchpad |
| build a native executable, for this machine or another | zinc build | zinc build --target aarch64-linux |
| flash a board | zinc flash --target esp32 |
| drive a Pi or a Mac from my desk (shell, files, apps, logs) | zinc agent (on it), zinc device (here) |
| ship a .app, a single executable or a .zapp | zinc export | zinc pack |
| publish a version and signed updates | zinc publish |
| add a plugin from the signed index | zinc add <plugin> |
| capture frames, measure speed | zinc capture | zinc bench |
Useful environment
| Variable | Effect |
|---|---|
ZINC_HEADLESS=1 | no window |
ZINC_DETERMINISTIC=1 | deterministic run |
ZINC_FRAMES=n | stop after n frames |
ZINC_SHOT=file.png | save a frame |
ZINC_HOME | toolchains and caches, default ~/.zinc |