# Engines, GitHub and a repository

At the end, the agents think with an AI subscription you already pay for, such as ChatGPT or Claude, the runner can push to GitHub, and your repository is a workspace. All of it is done on the runner's page, and the sign-ins stay on the box.

## At a glance

**Time:** 10 minutes, 15 with Codex or Claude Code.

**You need:**

- The runner from [Any Linux box](any-box.md), opened from the portal's **Devices** page
- To be an owner or admin of your org, for every step here
- A ChatGPT or Claude subscription
- A GitHub account with access to your repository

## Steps

1. **In the workbench, open Settings → Engines and press Sign in with ChatGPT** on pi's row (or **Sign in with Claude**). Loopgate's image comes with pi.

2. **Open the address the page shows on your laptop and enter the code it shows.** With Claude, sign in, then paste the code Claude shows (or the address your browser ends on) into the page's box.

   You should see: pi's row says Ready. Signed in with ChatGPT, the copilot thinks on pi's GPT-6 Luna.

3. **For Codex or Claude Code, press Install Codex or Install Claude Code on its row, then Sign in.** Open the address the page shows and enter its code, or paste back the code you are given when the page says **Finish signing in**.

   You should see: its row says Ready.

4. **Open Settings → GitHub and press Make a token in GitHub.** In GitHub, give the token access to your repositories, set **Contents** and **Pull requests** to **Read and write** under **Repository permissions**, and copy it.

5. **Paste the token on the page and press Save.** Check the name and email the runner's commits carry, and press **Save identity** if you change them.

   You should see: `Signed in as <the GitHub user>`.

6. **On Tasks, choose Add a workspace, paste your repository's address and press Clone.** Or type a name and press **Create** for an empty folder.

   You should see: `Cloning <repo>…` with git's progress, then the workspace in the sidebar.

7. **Type a task on Tasks and press Run.**

   You should see: the copilot's proposal, with who works it and each step's engine.

## Good to know

- Codex and Claude Code are optional. They install at the version Loopgate tested and survive restarts and updates.
- The token lets the runner clone private repositories, push and open pull requests. A token for a separate "bot" GitHub user keeps the runner's work easy to tell apart.
- A box several people share runs every task on whoever signed in there. A subscription per person is not built yet; many teams sign in with a team account.
- To pay per use instead, put an API key in `runner.env`, such as `OPENAI_API_KEY=…` or `ANTHROPIC_API_KEY=…`, then run `docker compose up -d runner`.
- [By hand](by-hand.md) signs in to engines from the terminal and puts the GitHub token in `runner.env`.

## If something is off

- **The page says `Ask an owner or admin of your org to … on this runner.`** Signing in engines, saving GitHub and adding workspaces on a runner are theirs to do.
- **GitHub refused the token.** Make it again with the two permissions in step 4.
- **An engine's row says Sign in needed.** Press **Sign in** on its row again.

## Next

- [Connect Slack](slack-connect.md)
- [A permanent address with Cloudflare Tunnel](address-cloudflare.md)
