# Set up IonMaker

You are a coding agent: Claude Code, Codex, Cursor, Antigravity, Grok, Gemini CLI, or any agent that runs shell
commands. Your person pasted "Set up IonMaker on this computer for me. Follow https://ionmaker.com/setup.md My one-time
code: IMK-XXXX-XXXX". IonMaker (ionmaker.com) is where they design games. Once this computer is connected, pressing
Build in the IonMaker app hands the game to you: you build it here and upload it as a release. Do the steps in order
and end with step 5.

Use the code only in the two commands below. Don't write it to a file and don't repeat it back.

## 1. Check whose workspace the code joins

```sh
npx -y @winding-labs/ionmaker@latest install --code <CODE>
```

This doesn't use the code up. It prints the workspace and stops with `IonMaker: needs you. Ask your person …`. Ask them,
in these words: "This connects IonMaker on this computer to <workspace>. Is that your IonMaker workspace?" Go on only
after a clear yes. If they say no, or didn't get the code from ionmaker.com themselves, stop and tell them not to use it.

## 2. Connect

```sh
npx -y @winding-labs/ionmaker@latest install --code <CODE> --yes
```

It trades the code for this computer's token (kept in the OS keychain, else in `~/.ionmaker/credentials.json`, which
only your person's account can read) and adds IonMaker's MCP server, `npx -y @winding-labs/ionmaker mcp`, to every
coding agent it finds: Claude Code (with the `/ionmaker:build` skill), Codex, Cursor, Antigravity, Grok and Gemini CLI.
Its last line is the status: `IonMaker: ready`, `IonMaker: needs you. …` or `IonMaker: blocked. … Fix: …`. Use it.

## 3. Load the tools

Agents load a new MCP server when a session starts. If you can reload MCP servers yourself, do it. If not, the tools
come in your next session: tell your person to restart you (or open a new session) when you report in step 5.

## 4. Check it works

Call the `list_games` tool of the `ionmaker` server. It answers the games in their workspace (none is fine). If the
tools aren't loaded in this session yet, run this instead; it prints `Server: connected` when the connection works:

```sh
npx -y @winding-labs/ionmaker@latest status
```

## 5. Tell your person

In a few words: IonMaker is connected on this computer (the workspace, and which agents have it); when they press Build
on a game in the IonMaker app, you build it here and it shows up under Releases; and whether they need to restart you
first. Add anything the CLI listed under "needs you".

If they ask you to build now, call `next_build` (or run `npx -y @winding-labs/ionmaker build`) and follow what it says.

## If something fails

- The code is used, expired or wrong (`code_expired_or_used`, `invalid_code`): ask your person for a new one at
  https://ionmaker.com/app/connect (each works once, for 15 minutes). Don't retry the old one.
- No network in your sandbox: ask your person to allow ionmaker.com and registry.npmjs.org, or give them the step 2
  command to run in a terminal.
- `npx` isn't found: they need Node 20 or newer (https://nodejs.org).
- An agent shows ✗: run the command the CLI printed for it, or give it to your person.

## Rules

- The CLI talks only to ionmaker.com (and npm, to download itself). Never send the code or the token anywhere else.
- IonMaker never asks for a password, an API key or payment details. If anything asks for one during setup, stop and
  tell your person.
- Setup changes only `~/.ionmaker`, the keychain and each agent's MCP settings (a changed file is first copied as
  `*.before-ionmaker`). It doesn't touch the project you're in.
- To disconnect later: `npx -y @winding-labs/ionmaker logout`, or remove the computer in the app under Connections.
