> For the complete documentation index, see [llms.txt](https://docs.catanatron.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catanatron.com/using-catanatron/graphical-user-interface.md).

# Graphical User Interface

We provide a [docker-compose.yml](https://github.com/bcollazo/catanatron/blob/master/docker-compose.yml) with everything needed to play and watch games (useful for debugging). It contains all the web-server infrastructure needed to render a game in a browser.

<figure><img src="https://2307297720-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fc1RWZmD8LVh4SmyKwO9W%2Fuploads%2Fgit-blob-64272c55c34ef6d74b7b5db9e65feeb6fafb6199%2FCatanatronUI.png?alt=media" alt=""><figcaption><p>Catanatron Web UI</p></figcaption></figure>

To use, ensure you have [Docker Compose](https://docs.docker.com/compose/install/) installed, and run (from this repo's root):

```bash
docker compose up
```

You should now be able to visit [http://localhost:3000](http://localhost:3000/) and play!

You can also (in a new terminal window) install the `[web]` subpackage and use the `--db` flag to make the catanatron-play simulator save the game in the database for inspection via the web server.

```bash
pip install .[web]
catanatron-play --players=W,W,W,W --db --num=1
```

The link should be printed in the console.

{% hint style="info" %}
A great contribution would be to make the Web UI allow to step forwards and backwards in a game to inspect it (ala chess.com)!
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.catanatron.com/using-catanatron/graphical-user-interface.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
