Command line (CLI)
gamealia is the same engine as the MCP server, for the terminal and for scripts. It needs Node.js 22 or newer.
Install
The CLI is one file, gamealia.mjs, plus the assets/ folder it serves for the local autotest and preview (the same files as the MCP server's):
mkdir -p ~/.config/gamealia/assets/sdk && cd ~/.config/gamealia
for f in gamealia.mjs assets/harness.html assets/preview.html assets/sdk/v1.js assets/sdk/crazygames.js assets/sdk/poki.js; do
curl -fsSL "https://gamealia.app/downloads/$f" -o "$f" || break
done
chmod +x gamealia.mjs && alias gamealia="$HOME/.config/gamealia/gamealia.mjs"
test, preview and cover also need playwright-core and a headless Chromium: see Local browser.
Run gamealia --help for the summary, gamealia --version for the version. Exit codes: 0 ok, 1 error (or a failed test or upload), 2 wrong usage.
Account
| Command | What it does |
|---|---|
gamealia login [--no-open] [--account <id>] | Signs in with your browser (device code) and stores an API key in ~/.config/gamealia/credentials.json (mode 600). The key is bound to one developer account: --account picks it, otherwise your default one. It opens the page only when it is on the API's own host |
gamealia logout | Forgets the stored keys (every account) |
gamealia whoami [--json] | The signed-in user, the current account and your role in it, and where the key comes from |
gamealia accounts [--json] | Your developer accounts: id, name, type (individual or business) and your role, * marking the current one, plus pending invites |
gamealia accounts switch <id|name> [--no-open] | Makes another account current: with its stored key, or a browser sign-in bound to it when there is none |
gamealia accounts accept <invite-id> | Accepts a pending invite listed by gamealia accounts |
Every other command acts on the current account, with your role in it. When the role does not allow something, the error says which roles can do it: ask an owner or admin of the account. See Accounts and teams.
Project
| Command | What it does |
|---|---|
gamealia new <dir> [--template vanilla|phaser|pixi|multiplayer] [--title T] | Creates a new game already integrated with the SDK |
gamealia analyze [dir] [--json] | Engine, build command, output folder, SDKs found, localStorage keys, size, policy findings (file:line) and the permissions to declare |
gamealia init [dir] [--write] | Integrates the SDK. Without --write it prints the diff only. Prints TODOs for the gameplay and ad calls you place yourself. For Unity it installs Packages/com.gamealia.sdk/ and the WebGL template; for Godot, addons/gamealia/; CrazyGames and Poki script tags are swapped for the shims |
gamealia test [dir] [--no-build] [--json] | Builds (when the project has a build step), then runs the autotest locally. Exit code 1 when a required check fails |
gamealia preview [dir] [--no-build] [--open] [--title T] | Serves the game inside a local copy of the portal page (mock ads) until Ctrl+C |
gamealia cover <screenshot.png> --title T [--out dir] | Makes cover (1200x630) and thumb (512x512) from a screenshot |
Publishing
The game's listing must exist first: create it in the developer portal or with the MCP tool gamealia_create_game. The CLI then works with its slug.
| Command | What it does |
|---|---|
gamealia publish [dir] --game <slug> [--notes N] [--submit] [--wait] [--no-build] | Builds, zips, uploads, waits for the server autotest and prints its result. --submit also submits it for review when it passes; --wait waits for a previous version that is still being tested instead of failing |
gamealia submit <slug> [--notes N] | Submits the latest version that passed the autotest |
gamealia abort <slug> | Aborts interrupted uploads that block a new version |
gamealia permissions <slug> --microphone --camera --why "..." | Declares the device permissions with the justification the reviewer reads (10-1000 characters). --none removes them |
gamealia status <slug> [--json] | Listing state, live version, latest versions, the autotest result, reject reasons and permissions |
gamealia status <slug> --texts [--json] | The listing texts per locale and their status (developer, machine, missing), with the limits: see Translating the listing |
A submit is refused when the listing requests a permission that is not live yet and has no justification; the error says which gamealia permissions command to run.
AI agents
| Command | What it does |
|---|---|
gamealia agents install [targets] [--project | --global] [--dry-run] | Registers the MCP server and installs the skills or rules. Without targets: the agents detected (--all for every one) |
gamealia agents uninstall [targets] | Removes what install added (default: every agent) |
gamealia agents list [--json] | Supported agents; * marks the detected ones |
Targets: --claude-code, --claude-desktop, --codex, --gemini, --cursor, --vscode, --windsurf, --cline, --zed, --opencode, --agents-md. Other flags: --dir D (the project folder for --project), --from F (copy the server from F instead of downloading it), --server-path F (register F, copy nothing), --no-server (do not copy or download the server), --json.
Environment
| Variable | Use |
|---|---|
GAMEALIA_API_KEY | An API key (developer portal → AI and API keys) instead of login; good for CI. It is bound to the account it was created for, so accounts switch is disabled while it is set |
GAMEALIA_API_URL | API base URL (default https://gamealia.app/api/v1) |
GAMEALIA_CHROMIUM | Headless Chromium binary for test, preview and cover |
In CI
export GAMEALIA_API_KEY=... # developer portal → AI and API keys
gamealia test . && gamealia publish . --game my-game --notes "$GIT_COMMIT_MESSAGE"
Submitting stays a human decision: run gamealia submit (or --submit) when you mean it.