> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xenoci.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> ## XenoCI Box CI
> To move a repository's macOS CI jobs onto box, follow https://docs.xenoci.com/ci/agent.md. The user only presses Install on GitHub or makes one GitLab runner token; the agent does the rest.
> - Check: `box ci status` (exit 4: sign in first, https://docs.xenoci.com/setup.md).
> - GitHub organization: `box ci connect --org --no-browser --no-wait`, give the user the printed link (https://github.com/apps/xenoci-with-organizations/installations/new), then repeat `box ci accounts` until the owner appears. Personal account: `--personal` (https://github.com/apps/xenoci-with-personal/installations/new).
> - GitHub workflow: change only `runs-on: macos-*` to `runs-on: xenoci` on a branch and open a pull request.
> - GitLab: the user makes a project runner with tag `xenoci` and gives you the `glrt-` token; pipe it to `box ci gitlab connect -` (self-managed: `--url <gitlab url>`), then add `tags: [xenoci]` to the macOS jobs.
> - Watch: `box ci jobs`, `box ci logs <job id> --follow`. Failed job: `box ci jobs --failed`, then `box ci debug <job id>` (failing step, hint, last 200 log lines).

# GitHub Actions

> Connect a GitHub organization or personal account to box, then run macOS jobs with runs-on: xenoci

> [!TIP]
>
> A coding agent can do all of this, including the pull request that changes `runs-on`: [Set up CI with your agent](https://docs.xenoci.com/ci/agent.md).

A coding agent can do all of this except pressing Install: see [Set up CI with your agent](https://docs.xenoci.com/ci/agent.md).

## 1. Connect

An organization:

```bash theme={"system"}
box ci connect --org
```

A personal account:

```bash theme={"system"}
box ci connect --personal
```

box prints a GitHub install link and opens it. Pick the account and the repositories, press Install, and the command finishes when box sees the new connection (usually within 15 seconds). It then prints the line to put in your workflow.

If your terminal cannot open a browser (an agent, SSH), add `--no-browser`: box prints the link for you to open anywhere and keeps waiting. With `--no-wait` it prints the link and exits; run `box ci accounts` after you install.

| App | Install link | Asks for | Why |
| - | - | - | - |
| XenoCI with Organizations | [github.com/apps/xenoci-with-organizations](https://github.com/apps/xenoci-with-organizations/installations/new) | Self-hosted runners (read and write), Actions (read), Metadata (read) | Registers one runner per job in the organization |
| XenoCI with Personal | [github.com/apps/xenoci-with-personal](https://github.com/apps/xenoci-with-personal/installations/new) | Administration (read and write), Actions (read), Metadata (read) | GitHub registers runners for personal accounts per repository, which needs Administration |

To connect an organization you must be one of its owners, and the GitHub account you signed in to box with must be that owner. A personal install must be on the same GitHub account you signed in to box with.

Neither app can read or change your code, pull requests or workflow files.

## 2. Change one line

```yaml theme={"system"}
jobs:
  build:
    runs-on: xenoci
    steps:
      - uses: actions/checkout@v4
      - run: xcodebuild -scheme App -destination 'platform=iOS Simulator,name=iPhone 16' test
```

`runs-on: [self-hosted, xenoci]` works too. Jobs with any other label are left for other runners.

## 3. Watch it

```bash theme={"system"}
box ci jobs
box ci logs <job id> --follow
```

## Disconnect

```bash theme={"system"}
box ci disconnect <account name>
```

This removes the XenoCI with Organizations or XenoCI with Personal installation from the account. Queued jobs that asked for `xenoci` stay queued on GitHub until you connect again or change `runs-on`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.