The Phaser AE CLI
Phaser AE in OpenCode
Make Phaser AE games in OpenCode: set up the Phaser AE CLI with one prompt, design your game on phaser.io, and OpenCode builds it.

The quick way
Let OpenCode set it up.
Paste this into OpenCode. It checks for Node.js, runs the setup and opens your browser so you can sign in, then takes you to design your first game. You only do this once.
Set up Phaser AE for me, so I can make games with you in OpenCode. Check that Node.js 20 or later is installed, and install it if it isn't. Then run npx -y @phaser-ae/cli setup: it opens my browser so I can sign in to phaser.io and approve Phaser AE, and it installs the Phaser AE skill. When it's done, tell me, and open https://phaser.io/agent/new in my browser so I can design my first game.
Before you start
What you need.
Node.js 20 or later
The CLI runs on it. Type node --version in a terminal to see yours; nodejs.org has the installer.
A phaser.io account
Free, and it's what the CLI downloads the Phaser AE engine and its expansion packs under, and publishes your games to. The first time, your browser opens so you can sign in. No account yet? Make one in a click with Google, GitHub or Microsoft.
OpenCode
You talk to it, and it runs every command for you. The building is done on your OpenCode plan, not phaser.io credits.
Or see what happens
Set it up, step by step.
Check Node.js
Version 20 or later. If the command isn't found, or says something older, install it from nodejs.org.
node --versionRun the setup
In any terminal (your editor's will do).
npxfetches the@phaser-ae/clipackage from npm and runs it: your browser opens so you can sign in to phaser.io and approve Phaser AE, then it puts the Phaser AE skill in~/.config/opencode/skills.npx -y @phaser-ae/cli setup
Your first game
Design it first. Build it in OpenCode.
An empty prompt box is a hard place to start a game. On phaser.io you design yours, a step at a time, into a complete game design document: how it plays, how it looks, every level and every rule. OpenCode builds the game from that, and the result is a world apart from a one-line idea.
Design your first gameStart a new game on phaser.io
Signed in with the same account. Say what you'd like to make, then answer a few questions: what it's played on, how it looks, who it's for.
Shape your game design document
Everything the game needs, written up in one document you can read and change. Your first one is free.
Add the art and sound, if you like
With credits, phaser.io makes the sprites, music and sound effects to go with it. You don't have to: without them, the game is drawn in code.
Hand it to OpenCode
When the document is ready, phaser.io shows you how. OpenCode builds the game from it, plays it to check it, and publishes it, ready for you to playtest.
Rather start from an idea? Ask OpenCode for “a Phaser AE game” and it starts one straight away. How it works
Once it's built
You talk. OpenCode does the rest.
Play it and fix anything that feels wrong
It plays the game in a real browser, finds what’s off and fixes itBring down my playtest notes and make them
What you marked up on the playtest page, made in the gameFind a pack for fog of war and add it
It searches the expansion packs and adds the one that fitsPublish it
The next version, on phaser.io
The small print
What setup did.
- The skill
~/.config/opencode/skills/phaser-ae/SKILL.md- In a game's folder
- OpenCode reads
AGENTS.md, the brief from phaser.io that keeps up with the engine (Claude Code reads the same in CLAUDE.md). - Install it for good
npm install -g @phaser-ae/clithen it's phaser-ae, in place of npx- Take it out
npx -y @phaser-ae/cli setup --remove- Something wrong?
npx -y @phaser-ae/cli doctorchecks this computer; --fix gets the browser games are played in
What it costs
Your OpenCode plan does the building.
- Your first game design free. Design your first game on phaser.io for free, and build it with your agent for free.
- Each design after that uses credits, from 200 a design.
- Building is on your agent's plan. No phaser.io credits for the build, the playtests or publishing.
- Art, music and sound use credits. If you'd like them, phaser.io makes the assets to go with your design.
- 163 expansion packs are free. Pro adds the other 195, and as many game designs as you like. Pricing
Using something else?