Pocket Studio Docs

Making

Pocket Studio's own agent makes a Pocket Applet in the room from a few words, with nothing to install. A game for a handheld is made the other way: your own coding agent writes it on your computer, with the pocket-studio command.

#Make a Pocket Applet

A Pocket Applet is a small app for devices as small as a microcontroller. The M5Stack Tab5 is the first device the agent makes them for, so the room calls them Tab5 apps. The Tab5 is a wide touch screen held sideways, with no buttons. A tool, a toy, a display or a small game all fit.

#Say what you want

Write it in the box at the foot of the room and press Make it. Making asks for an account: a guest is asked to sign in, and what you wrote is kept through the sign-in.

The room opens a conversation with the agent. It writes the applet, builds it and tries it, and you see each step as it goes. A new applet takes a few minutes. Stop ends the agent's turn, and its credits come back.

#Try it

The applet runs on the Tab5's screen beside the conversation, so you can try it with no device. Each version the agent saves has its number there. Test is a build the agent is still trying, not saved yet.

Ask for a change in the same conversation. When the applet hits an error, Fix it sends the error to the agent. Your Tab5 apps, under the box, opens an applet again.

#Download it

Download for Tab5, under the screen, gives you the version on screen as a .pocket file.

An applet stays with your account. It is not a game: it has no page and is not on the rack or Pocket TV.

#Credits

The agent's work is paid for in credits. The price is fixed, and Send shows it before you press.

What you doCredits
A message to a new applet, until it has a version20
Each message to an applet that has a version5
Where they come fromCredits
Once, the first time your account opens the room or uses the MCP server60
Each month of the membership, refilled and not carried over300

A turn that fails or that you stop gives its credits back. Credits are not sold one at a time.

#From another agent

An assistant or a coding agent that speaks MCP can make applets with your account, at the same prices. MCP server says how to connect one.

#Make a game with your coding agent

A game for a PSP, a PS Vita, a Nintendo 3DS, an iPod touch or an Android phone is written by a coding agent on your own computer. Pocket Studio gives it the pocket-studio command, which creates the project, compiles it with the PocketJS compiler, shows the agent pictures of the game and sends each build to your room. The agent is Claude Code or Codex. This spends no credits.

#Set up your computer, once

1. Run the command in a terminal.

curl -fsSL https://studio.pocket.nexus/install | sh -s -- claude

Use codex in place of claude for Codex. The command:

  • needs curl and tar, and the agent's own command (claude or codex) on PATH;
  • finds Bun, or installs it with Bun's own installer into ~/.bun;
  • downloads the Pocket Studio kit (the command, the starter games, the plugin and the PocketJS compiler) and copies it into ~/.pocket-studio;
  • puts a pocket-studio command on your PATH: in Bun's directory when that is inside your home directory, else in ~/.local/bin or ~/bin. It edits no shell profile. When the directory is not on PATH, it says so: Add ~/.local/bin to PATH to run it as pocket-studio.;
  • installs the Pocket Studio plugin into the agent with the agent's own plugin commands.

2. Get a link code. On a game's page, press Remix, then Get a link code, and sign in if you are asked. The code links your computer to your account. It works once, within 15 minutes.

3. Send your agent a prompt in a new session. Name a device, and add the code:

Make me a Pocket Studio game for the PSP. Link code: K7QD-9M4X. The game: <describe your game>

Replace <describe your game> with what the game is, then send it. The agent answers in the language of your prompt.

#What the agent does

The plugin's skill tells the agent the steps. In a project it runs:

  1. pocket-studio link <CODE>: links your computer to your account.
  2. pocket-studio new --device psp --title "Moon Lander" --agent claude: copies a working starter game into ./moon-lander/, puts the game on your rack and sends the first build.
  3. pocket-studio title "Moon Lander" --tagline "…": names the game on your shelf at once.
  4. It reads the project's AGENTS.md, then writes the game.
  5. pocket-studio shot --do "<steps>": runs the game on your computer with no screen and writes a picture of each state, which the agent reads.
  6. pocket-studio push: compiles the game and sends the build to your room.

It then tells you how to play and asks you how the game plays. It publishes only when you ask.

#Play it in the room

Open the room on the account you linked. The game is a case on your rack, a draft that only you see. Pick it and press Play on its device.

The room looks for changes every 20 seconds. A game that is running stays on its build: press Escape and start it again to play the newest one.

#The project

FileHolds
game.tsThe rules, as plain functions over one Game object.
app.tsxEvery screen and the frame loop.
layout.tsOne layout for each screen shape.
kit.tsxDevice facts, controls and touch buttons.
main.tsxMounts the app.
pocket.jsonThe app manifest: id, capabilities, one viewport for each device family.
studio.jsonThe game's card: title, tagline, cover colours.
AGENTS.mdThe guide to the project for the agent. CLAUDE.md points at it.
.pocket-studio.jsonThe session and its token. Keep it to yourself: never commit or share it.

A new project starts from one of the starter games, Snack Snake, Twenty48 or Boxel. .pocket-studio.json and .pocket/ (builds and pictures) are added to the project's .gitignore.

A game is a TypeScript program for PocketJS: JSX builds a tree of views once, signals update single nodes, and a Rust core lays out and draws it 60 times a second. The project has no package.json; the compiler supplies @pocketjs/framework and solid-js.

#Devices

Device--deviceScreen in logical pixelsInput
PSPpsp480 × 272Buttons
PS Vitavita480 × 272Buttons and touch
Nintendo 3DS3ds400 × 240, and 320 × 240 belowButtons, touch on the lower screen
iPod touchipod-touch320 × 480Touch
Android phoneandroid360 × 640Touch

A project is linked to one device at a time. pocket-studio new --device <id> --dir . inside the project gives the game a session on another device and keeps its files.

#Working by hand

You can run the same commands yourself. pocket-studio dev rebuilds and sends the game on every change you save, until you stop it with Ctrl-C. pocket-studio status prints the session's phase and build. pocket-studio continue in a project starts the agent there again. The CLI reference lists every command.