> ## 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).

# GitLab CI

> Register a GitLab project or group runner with box, then run macOS jobs with tags: [xenoci]

> [!TIP]
>
> A coding agent can do the rest once the token exists, and with `glab` it can make the token too: [Set up CI with your agent](https://docs.xenoci.com/ci/agent.md).

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

## 1. Make a runner token

In GitLab, open your project (or group) **Settings > CI/CD > Runners > New project runner** (or **New group runner**).

* Tags: `xenoci`
* Leave **Run untagged jobs** off

GitLab shows a runner token that starts with `glrt-`.

## 2. Give it to box

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

Paste the token and press Enter (`-` reads it from stdin, so it stays out of your shell history). For a self-managed GitLab add `--url https://gitlab.example.com`.

## 3. Tag your jobs

```yaml theme={"system"}
test-ios:
  tags: [xenoci]
  script:
    - xcodebuild -scheme App -destination 'platform=iOS Simulator,name=iPhone 16' test
```

This runner only takes jobs tagged exactly `xenoci`. If GitLab hands it an untagged job or one with other tags, box fails that job before any Mac starts (no charge) and pauses the runner. Fix the runner's tag settings in GitLab, then connect it again.

## Watch and disconnect

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


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