@zuzi.dev/cli
v0.1.0
Published
Create, play-test, check and pack browser games for ZUZI.
Readme
@zuzi.dev/cli
Create, play-test, check and pack browser games for ZUZI. Use any web technology — plain JS, Phaser, PixiJS, Three.js, Vite, or a Unity / Godot / Construct / GDevelop web export — as long as it runs in a browser.
Requires Bun 1.3+.
bunx @zuzi.dev/cli init my-studio
cd my-studio
bun install
bun zuzi new my-game # templates: canvas (default), blank, vite, engine
bun zuzi dev my-game # http://localhost:6870 — plays it like the ZUZI player
bun zuzi check my-game # the checks ZUZI runs on upload
bun zuzi pack my-game # build + check + zip to .zuzi/out/A workspace is a folder with zuzi.config.json and one sub-folder per game in games/. Each game has a zuzi.json manifest; the workspace README lists the rules every game follows.
Talking to the portal
ZUZI injects zuzi-kit.js next to your entry HTML. Load it with <script src="zuzi-kit.js"></script>, then:
ZuziKit.report("ready");
ZuziKit.report("start");
ZuziKit.report("score", { score: 120 });
ZuziKit.report("gameover", { score: 120 });
ZuziKit.onCommand((command) => {
/* "mute" | "unmute" | "pause" | "resume" */
});
ZuziKit.lang; // "en" | "vi" | "es" | "pt" | "fr" | "de" | "ja" | "zh" | "ko"ZuziKit.create({ ... }) additionally gives a complete canvas game shell (see the canvas template).
