# Let your AI publish it

Dweller was designed so a coding agent (Claude Code, Cursor, Codex, Aider…) can publish and update your game without you touching a browser. The agent installs the `dweller` CLI, signs in once with your approval, and pushes builds.

## Copy-paste prompt

Paste this into your agent from the game's project folder:

```text
Publish this game to Dweller Games (https://dweller.games). Read https://dweller.games/llms.txt first.
1. Install the dweller CLI (curl -fsSL https://dweller.games/install-cli.sh | sh, or on Windows: irm https://dweller.games/install-cli.ps1 | iex).
2. Run `dweller login` and show me the code/URL so I can approve it in my browser.
3. Export release builds for every platform this project supports into a build/ folder
   (one subfolder per platform; for web builds make sure index.html is at the folder root).
4. Run `dweller init` with a good title, tagline, description, tags and engine, and list each build
   folder in dweller.json with its platform and executable.
5. Run `dweller push --version <version> --notes "<what changed>" --publish-game`.
6. Upload a 1280x600 header image and a few 16:9 screenshots with `dweller media`.
Tell me the store URL when you're done.
```

For later updates, the agent only needs:

```text
Bump the version, rebuild every platform into build/, and run
dweller push --version <new version> --notes "<changelog>"
```

Every player's launcher picks up the new version automatically.

## In CI (no browser)

Create a token at [Settings → API tokens](https://dweller.games/settings/tokens) and expose it as `DWELLER_TOKEN`. The CLI reads it automatically, so agents running in CI or a cloud sandbox never need to open a browser.

## Why it works well with agents

* **Non-interactive by default.** Every command takes flags. `dweller login` prints a URL and code for a human to approve, then waits.
* **Clear, actionable errors.** "version 1.2.0 already exists; bump the version number" rather than a stack trace.
* **`--json` output** on every command, so agents can parse results.
* **One manifest.** `dweller.json` stores everything the agent needs to repeat a release.
* **Docs as Markdown.** Every docs page is available as raw Markdown: add `.md` to the URL (e.g. [https://dweller.games/docs/cli.md](https://dweller.games/docs/cli.md)) or read [/llms.txt](https://dweller.games/llms.txt).
