Keep every file local
Use relative paths for scripts, images, fonts, audio, workers, and WASM.
CLI-Games creator guide · embed protocol V3
Keep your finished game and its keyboard controls. Add a small manifest and our supplied shim, then upload one self-contained ZIP to your private workspace.
This guide is public. Upload workspaces are invitation-only and require a verified CLI-Games account.
Already have a workspace labelled protocol V2? Keep using the frozen packaging and action-bridge instructions inside that workspace. Do not add this V3 manifest or shim unless CLI-Games moves your invitation to V3.
The instructions are a complete engineering handoff. The shim is the exact file your ZIP needs; include it unchanged.
The package
Keep index.html at the ZIP root. Beside it, add cli-games.json and the unchanged cli-games-embed-v3.js file linked above.
{
"schema": "cli-games.embed-manifest.v1",
"protocol": 3,
"title": "Keyboard Check",
"command": "keyboard-check",
"description": "A minimal keyboard-capable browser game prepared for review.",
"category": "arcade",
"keys": [
{ "key": "ArrowLeft", "label": "LEFT", "aria": "Move left", "hold": true },
{ "key": "ArrowRight", "label": "RIGHT", "aria": "Move right", "hold": true },
{ "key": " ", "label": "ACT", "aria": "Use the main action" },
{ "key": "Escape", "label": "MENU", "aria": "Return to the menu" }
],
"scoring": {
"maxScore": 30,
"minDurationMs": 0,
"maxDurationMs": 1800000,
"scoreMayDecrease": false
}
}hold: true.Use relative paths for scripts, images, fonts, audio, workers, and WASM.
Disconnect the network, open index.html, play, and resize the window.
Support desktop, portrait phone, and landscape phone shapes.
One enclosing folder is accepted. Symlinks, unsafe paths, absolute URLs, other origins, missing local assets, and <base> tags are rejected.
The game runs in an opaque, cookie-free frame on a separate origin. Network requests, analytics, shared storage, navigation, forms, popups, downloads, and access to the CLI-Games page are blocked.
Local Canvas, WebGL, WebAssembly, Web Workers, blobs, and data assets are supported. Files are served as uploaded; there is no server-side build step.
The controls
The host shim redispatches ordinary KeyboardEvents.Your existing key down and key up handlers remain the game’s input path.
const embed = window.CliGamesEmbed
embed.onStart(({ runId, seed }) => {
resetGame({ runId, seed })
})
window.addEventListener('keydown', (event) => {
if (event.key === 'ArrowLeft') moveLeft()
if (event.key === 'ArrowRight') moveRight()
if (event.key === ' ') useMainAction()
if (event.key === 'Escape') finishRun()
})
window.addEventListener('keyup', (event) => {
releaseHeldKey(event.key)
})
function showPlayableMenu() {
renderMenu()
// Required after every completed run or return to the playable menu.
embed.ready()
}onStart supplies the run ID and unsigned 32-bit seed.ready() after every finished run or return to a playable menu.Optional reporting
An unscored game may skip reporting. If the manifest includes scoring, report scores within its declared bounds and end each run once.
// Optional progress snapshot. Send after start and meaningful changes.
embed.state({ status: 'playing', level: 2, levelCount: 6, moves: 19, score: 20 })
// Required when cli-games.json includes scoring.
embed.score(20)
// Send once when a scored run ends, then return to the menu and call ready().
embed.gameOver(30)
showPlayableMenu()Embedded scores are creator-reported and isolated from CLI-Games’ verified competitive economy. This protocol does not promise replay-grade verification.
The release
Your upload stays private until review passes. You inspect the exact saved build before submitting its immutable fingerprint.
Ready to upload?
index.html, cli-games.json, and the unchanged shim are at the rootready()