# Set up screenRIG with ChatGPT Codex.

> Canonical HTML: https://screenrig.ai/docs/start/chatgpt/

Install the official plugin in Codex, connect your screenRIG account, pair a Player,
and publish your first screen.

This guide is for **Codex**, OpenAI’s coding agent — not an ordinary ChatGPT chat. The
plugin installs and runs where an agent can execute commands; a ChatGPT chat reply
alone does not set anything up. If you are in a chat app, continue with
[Meta Muse](https://screenrig.ai/docs/start/muse/) or
[Grok Bot](https://screenrig.ai/docs/start/grok-bot/).

## Get Codex

Codex is OpenAI’s coding agent CLI. Install it on your machine following
[OpenAI’s Codex documentation](https://developers.openai.com/codex/), then start it in
your project directory. The bundled screenRIG CLI needs Node.js 20.11 or newer; check
`node --version` before you begin.

## Install the official plugin

Inside Codex, run the marketplace install:

```console
codex plugin marketplace add https://github.com/screenrig/plugin.git --ref main --json
codex plugin add screenrig@screenrig --json
```

Ask Codex to confirm the install with `codex plugin list --json` if you want to see it
registered.

<a id="account"></a>

## Connect your screenRIG account

Ask Codex to connect your account. For a new account, it asks for your contact email
and runs `screenrig agent enroll --email ADDRESS`; that is the explicit enrollment
step. If you already have a screenRIG account, say so and complete the dashboard
approval it requests for `screenrig agent connect`. Never paste your password, account
credentials, or API tokens into the conversation.

Both paths in detail, including the pending-approval resume: [Account access](https://screenrig.ai/docs/start.md#account-access).

Before account commands, the bundled CLI must be reachable: follow
[Run the bundled CLI](https://screenrig.ai/docs/start.md#run-the-bundled-cli) to put
`screenrig` on `PATH` for the session.

<a id="player"></a>

## Pair your Player and publish

1. **Install and launch your Player.** On the device driving your screen, open
   [play.screenrig.ai](https://play.screenrig.ai) or follow
   [Player downloads & setup](https://screenrig.ai/docs/players.md). The Player web
   app (PWA) is the Player available today. Install and launch the web app, then send the pairing code shown there to Codex, and
   keep a browser Player in the foreground while trying it out.
2. **Describe the result.** Tell Codex what to show, which screen to use, and when.
   If you want it to use a menu spreadsheet or events calendar, identify the source
   and approve only the access you want it to have.
3. **Publish and check.** Ask Codex to publish with `screen publish`, request a
   screenshot to verify the result, and check the physical screen yourself.

Already have a Player code? You can combine the request:

> Use screenrig.ai for my lobby screen. My pairing code is [code]. Create a welcome
> board using my events calendar. Ask me for anything else you need.

## If setup stalls

If `screenrig version` fails or an account command reports `not_enrolled`, walk the
[When the first run fails](https://screenrig.ai/docs/start.md#when-the-first-run-fails)
table on Start: an empty `SCREENRIG_PLUGIN_ROOT` means the runtime exported no plugin
root, and `codex plugin list --json` gives you the installed plugin path.

## Next

Back to [Start](https://screenrig.ai/docs/start.md), open the
[CLI reference](https://screenrig.ai/docs/cli.md), or
[Compose a still](https://screenrig.ai/docs/compose.md).
