← Every agent

The Phaser AE CLI

Phaser AE in Windsurf

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

Phaser AE

The quick way

Let Windsurf set it up.

Paste this into Windsurf. 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.

Paste this into Windsurf

Set up Phaser AE for me, so I can make games with you in Windsurf. 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.

Windsurf

You talk to it, and it runs every command for you. The building is done on your Windsurf plan, not phaser.io credits.

Or see what happens

Set it up, step by step.

  1. Check Node.js

    Version 20 or later. If the command isn't found, or says something older, install it from nodejs.org.

    node --version
  2. Run the setup

    In any terminal (your editor's will do). npx fetches the @phaser-ae/cli package 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 ~/.codeium/windsurf/skills.

    npx -y @phaser-ae/cli setup

Your first game

Design it first. Build it in Windsurf.

Your first game design free

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. Windsurf builds the game from that, and the result is a world apart from a one-line idea.

Design your first game
  1. Start 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.

  2. Shape your game design document

    Everything the game needs, written up in one document you can read and change. Your first one is free.

  3. 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.

  4. Hand it to Windsurf

    When the document is ready, phaser.io shows you how. Windsurf builds the game from it, plays it to check it, and publishes it, ready for you to playtest.

Rather start from an idea? Ask Windsurf for “a Phaser AE game” and it starts one straight away. How it works

Once it's built

You talk. Windsurf does the rest.

  • Play it and fix anything that feels wrongIt plays the game in a real browser, finds what’s off and fixes it
  • Bring down my playtest notes and make themWhat you marked up on the playtest page, made in the game
  • Find a pack for fog of war and add itIt searches the expansion packs and adds the one that fits
  • Publish itThe next version, on phaser.io

The small print

What setup did.

The skill
~/.codeium/windsurf/skills/phaser-ae/SKILL.md
In a game's folder
Windsurf 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 Windsurf 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?

Other agents.