BITMAGIC GDK
The game development kit for agents.
Paste one prompt. Your agent installs the GDK, scaffolds a real 3D game with the engine as source, and ships it to bitmagic.ai while you watch.
See what it says
Set up the Bitmagic GDK and start building a game with me.
1. Check I have Node.js 20 or newer, then install the GDK:
npm install -g @bitmagic/cli
2. Run `bitmagic login` as a background task and show me the URL and the code it
prints — I approve it in my browser. If I don't have Bitmagic Pro yet it opens
a page where I can subscribe or redeem a voucher; wait for me to finish.
3. Ask me what game I want to make, in one line, before you scaffold anything.
4. Run `bitmagic init my-game --idea "<my one-liner>"` and work inside ./my-game
from then on.
5. Start `bitmagic dev` as a background task straight away and tell me the URL it
printed — I want to watch the game take shape while you build it.
6. Read AGENTS.md in the project and follow it from there. Run `bitmagic check`
as you edit and `bitmagic verify` before you call anything done. Generating
assets is included in my subscription — use `generate` and `cover` freely
rather than leaving placeholders in, just never in a loop. Ask me before
`bitmagic publish`.
The GDK needs Bitmagic Pro — your agent hands you the link when it signs you in.
Or install it once
The prompt above lasts one conversation. Install it instead and your agent knows
how to set the GDK up in every session and every directory — nothing to paste
again, and no bitmagic command you
have to type yourself.
/plugin marketplace add BitmagicAI/bitmagic-gdk-plugin
/plugin install bitmagic-gdk@bitmagic
Two commands, one at a time — the second needs the first to have finished.
Then say what you want to make. Setup is also on
/bitmagic-setup if you would rather
ask for it by name.
These have no plugin system, so installing means keeping the same text in the file
your agent already reads at startup:
~/.codex/AGENTS.md,
.cursor/rules/bitmagic.mdc, or your
project's AGENTS.md. Paste it there
once and it loads every session.
See what it says
# Setting up the Bitmagic GDK
The Bitmagic GDK is a game development kit for agents: a 3D engine vendored into the project
as source, asset generation for characters, vehicles and skyboxes, multiplayer and
leaderboards on Bitmagic's servers, and one command that puts the game on bitmagic.ai. Every
command is `bitmagic <verb>`; the npm package is still named `@bitmagic/cli`.
This skill covers exactly one stretch of that: getting from nothing to a scaffolded project
with the dev view running. Everything after the scaffold is written down inside the project
itself and supersedes this file.
**Already inside a Bitmagic project?** If `bitmagic.json` sits in this directory or a parent,
setup is done — go straight to step 6.
## 1. Is the GDK installed?
```
bitmagic --version
```
Not found? Install it, then **check again**:
```
npm install -g @bitmagic/cli
bitmagic --version
```
The second check is not a formality. Your shell is non-interactive and sources no profile, so
under nvm the `npm` you just ran can belong to a different node than the one on `PATH`: the
install lands in a prefix nothing points at, reports success, and leaves `bitmagic` missing.
If the re-check still fails, report the directory `npm prefix -g` names and ask the human to
run the install line in their own terminal. Do not route around it with a second package
manager, and do not carry on to step 2 — every command below would fail for a reason that
looks nothing like this one.
The GDK needs Node.js 20 or newer; check `node --version` if the install itself fails.
From here on it updates itself with `bitmagic self-update`, which reinstalls into the place it
actually lives. Never `npm i -g` a second time.
## 2. Are they signed in, and subscribed?
```
bitmagic whoami --json
```
**Exit code 2 means not logged in.** Then:
```
bitmagic login
```
Run it **in the background**, and show the human the URL and the code it prints. `bitmagic
login` deliberately never opens a browser — handing over that code is the whole job of the
command — and it blocks polling for approval, so a foreground run buries the code in output
nobody is reading. Wait for them to approve.
The GDK is what a Bitmagic Pro subscription opens, and there is no other way in. If they do
not have one, `login` carries straight on into checkout, which *does* open a browser, and
where they either subscribe or redeem a voucher. Wait for that too, then confirm with
`bitmagic whoami`.
## 3. Ask what they want to make
One line, in their words, before you scaffold anything. Do not invent a concept and do not
skip ahead: that line seeds `GAME-DESIGN.md` **and** picks the starting template. "A
doom-like corridor shooter" scaffolds first-person; "jump between floating islands"
scaffolds a sidescroller.
## 4. Scaffold the project
```
bitmagic init my-game --idea "<their line>"
```
Name the directory after their idea. This mints the game, vendors the engine, and writes
`AGENTS.md`, `GAME-DESIGN.md` and the project's own skills. Work inside that directory from
now on.
## 5. Start the dev view — now, not at the end
```
bitmagic dev
```
**Run it as a background task.** It never exits: in the foreground it blocks until the
session is killed, and left until last it is a server nobody needed.
Then tell the human the URL, once, in your reply. Take it from what the command printed
rather than assuming 3011 — the ports drift when something else holds them, and
`.bitmagic/dev.json` records what it actually bound. Everything `bitmagic dev` prints goes
into a background log the human never opens, so a URL you do not say out loud is a URL
nobody got.
That page is the point of the whole arrangement: the game reloads itself on every change and
the assets panel lists each character, vehicle and skybox as it is generated. A game that
appears in one silent hour is worth less than a rough one they watched arrive, because they
could steer the first.
## 6. Hand off — this skill is finished
Read `AGENTS.md` at the project root, and the skills in `.claude/skills/`. They describe this
engine and this version of the GDK, `bitmagic upgrade` keeps them current, and **they outrank
everything here**. Follow them from now on and stop consulting this file.
## While you are doing the above
- **Never** run `bitmagic allowance --allow-sparks`. It authorises spending the human's own
money, and refuses to run outside a real terminal for that reason.
- **Never** run `bitmagic reset-account`. It deletes their account.
- Ask before `bitmagic publish`.
- Under `--json`, stdout carries exactly one JSON document and everything else goes to
stderr. Branch on the exit code, not on prose: `2` not logged in, `3` verify missing or
failed, `5` not the owner.
- A `.bitmagic-env` file here or in a parent aims these projects at a non-production server
on purpose. Leave it alone, and do not pass `--env` to anything.
Paste the prompt
Your agent installs the GDK and signs you in — it prints a code, you approve it in your browser, and Bitmagic Pro opens right there if you are not subscribed yet. Then it asks what you want to make, in one line, before it builds anything.
Watch it build
bitmagic dev opens one page holding your
game and an editor over the same running world. It reloads on every edit and lists
each character, vehicle and skybox as it is generated — so you are steering while it
builds, not waiting for a result.
Ship it
Before anything ships, the GDK boots your game in a real browser and plays it like a
player would, handing your agent whatever broke. Then
bitmagic publish puts it on bitmagic.ai
behind a link you can send to anyone — private until you say otherwise.
Your agent, with an engine under it
Claude Code, Codex and Cursor are very good at code. None of them ships a game engine, an asset pipeline, servers or a store build — so that is what the GDK hands them.
bitmagic ios packages a native iOS build and sends it to TestFlight
It is not just a library. It is the whole road to players.
The engine is the part you can see. The rest of the platform is what turns the thing on your laptop into a game other people are playing.
The engine, as source
Physics, characters, vehicles, cameras and netcode land in your repo as TypeScript you can read and edit.
Hosting, included
One command builds your game and puts it behind a URL on bitmagic.ai. No host to pick, no bandwidth bill.
Instant sharing
Every game gets a page with cover art, a share card and a play button. Private by default.
An audience already there
Likes, comments, followers, a discovery feed and a trending page.
Multiplayer and leaderboards
Networked play ships in the engine and runs on Bitmagic's relay; scores and saves go to a hosted service.
Assets on demand
Characters, props, vehicles, skyboxes, sound and whole levels, generated into the running world.
Your agent is ready. Give it an engine.
The GDK opens with Bitmagic Pro, which also carries the spark allowance that pays for your game's assets.
Prefer to set it up by hand?
You need Node.js 20 or newer and an active Bitmagic Pro subscription — the GDK is what Pro opens. Install it globally from npm:
npm install -g @bitmagic/cli
bitmagic --version
From install to a published game:
bitmagic login # device-code auth in your browser; opens Bitmagic Pro if needed bitmagic init my-game # scaffold a new project into ./my-game cd my-game bitmagic dev & # FIRST, and in the background — it never exits. # Then open http://localhost:3011/ and leave it open bitmagic cover # generate cover art from GAME-DESIGN.md bitmagic check # typecheck against the vendored engine bitmagic verify # boot the game in a real browser and report what broke bitmagic publish # verify-gate, build, and ship — private by default
Start bitmagic dev first, not last.
It is a long-running server, so an agent working through a list tends to leave it
until the end — and then nobody watched the game get built.
bitmagic init writes an
AGENTS.md into the project, so your
agent tool knows how the project is laid out and what the GDK expects. It also
writes a GAME-DESIGN.md — pass
--idea "one-line pitch" to seed it with
your game idea, or write it yourself;
bitmagic cover reads it to generate the
game's cover art. Your game lives in
src/work/; the vendored
engine/ directory is read-only and
refreshed by bitmagic upgrade.
Command reference
| Command | What it does |
|---|---|
| bitmagic login | Device-code auth; stores credentials per environment. Opens the Bitmagic Pro page right away if the account is not subscribed. |
| bitmagic subscribe | Open the Bitmagic Pro page to start (or resume) the subscription the GDK requires — or to redeem a Pro voucher, which opens the GDK just the same. --no-wait prints the URL instead of waiting. |
| bitmagic usage | Where this account's sparks went, and what Pro allowance is left. --days N (default 30). |
| bitmagic logout | Remove stored credentials for an environment. |
| bitmagic whoami | Show the identity you are signed in as, whether Pro is active, and when it renews. |
| bitmagic init | Scaffold a new project: mints a game, downloads the vendored engine, writes templates. --idea "<pitch>" seeds the design doc and picks the template whose camera and controls fit it; --template overrides that (standard-3d, empty-3d, no-character, first-person, top-down, sidescroller). |
| bitmagic check | Typecheck against the vendored engine. Fast; does not prove the game runs. |
| bitmagic dev | Build, then serve the game on 3010 and a Game/Editor view on 3011 that reloads itself whenever the project changes. Long-running — start it first and leave it up. --port, --editor-port, --no-open. |
| bitmagic reload | Tell a running bitmagic dev to reload the browser now. For agents: run it when you finish a round of edits. Does nothing when no dev server is running. |
| bitmagic verify | Build, boot the game in a headless browser, start gameplay like a player would, and report what broke. --watch re-verifies on change, --fast skips the screenshot, --renderer webgpu|webgl pins the pipeline, --timeout caps the run. |
| bitmagic build | Bundle the game into one self-contained HTML file. Rarely needed by hand — publish builds automatically. |
| bitmagic cover | Generate the game's cover art from GAME-DESIGN.md — becomes the start screen and publish thumbnail. Costs sparks. |
| bitmagic publish | Verify-gate, build if needed, and upload to bitmagic.ai. Private unless --visibility public is passed. Exits with a specific code per failure so an agent can branch on it. |
| bitmagic ios | build packages the game as a native iOS app (simulator build by default, --ipa for a signed store build); submit uploads it to App Store Connect for TestFlight. macOS and Xcode required. |
| bitmagic upgrade | Refresh the vendored engine, the generated config files and the agent skills to the currently published version. Never touches your game code; refuses a dirty git tree unless --force. |
| bitmagic generate | Generate one asset — skybox, sound, image, character, animation, prop (upgrades a placeholder in place) or vehicle (a new drivable one) — into your world. Costs sparks. |
| bitmagic forge | Design and bake a whole playable level from a prompt. Costs sparks, and takes many minutes; a failed run resumes from the last step that finished. |
Good to know
-
Bitmagic Pro is what opens the GDK. Every
command but
login,whoamiandsubscribeneeds an active subscription. Pro also gives you the rolling spark allowance that pays forgenerate,coverandforge. -
Publishing is private by default. Every
bitmagic publishuploads and registers the game, but it is reachable by URL only until you pass--visibility public— and you must pass it on every publish you want listed; omitting it later makes the game private again. -
Publish is gated on verify.
bitmagic publishrefuses to run unlessbitmagic verifyhas passed for the current state of your project — editing any file after verifying makes the record stale, so verify again before you ship. -
Environments.
--envacceptsdev,prod, orlocal. The environment youloginto becomes the stored default, but a project outranks it:bitmagic initrecords the environment in the project'sbitmagic.json, so every command run inside it targets the api-server that minted the game and served its engine — whatever you last logged in to.bitmagic whoamiprints which one is in effect and why.
Run bitmagic --help for the full option
reference of every command.