---
title: GitHub CI
icon: github
description: Mount GitHub Actions runs, jobs, logs, and artifacts as a Mirage filesystem.
---

`GitHubCIResource` mounts the Actions surface of a single repository: runs, jobs, step logs, and artifact metadata.

Setup steps for the personal access token live at [GitHub CI Credentials](/home/setup/github_ci).

## Node

```bash
pnpm add @struktoai/mirage-node
```

```ts
import { GitHubCIResource, MountMode, Workspace } from '@struktoai/mirage-node'

const ci = new GitHubCIResource({
  token: process.env.GITHUB_TOKEN!,
  owner: 'strukto-ai',
  repo: 'mirage',
  days: 14,
})

const ws = new Workspace({ '/ci': ci }, { mode: MountMode.READ })
await ws.execute('ls /ci/runs/')
```

## Browser

```bash
pnpm add @struktoai/mirage-browser
```

```ts
import { GitHubCIResource, MountMode, Workspace } from '@struktoai/mirage-browser'

const ci = new GitHubCIResource({
  token: GITHUB_TOKEN,
  owner: 'strukto-ai',
  repo: 'mirage',
})
```

## Config

| Field | Default | Notes |
| --- | --- | --- |
| `token` | required | Personal access token with `actions:read`. Redacted in snapshots. |
| `owner` | required | Repo owner. |
| `repo` | required | Repo name. |
| `days` | `30` | Window of recent runs to expose. |
| `maxRuns` | `1000` | Hard ceiling on listed runs. |
| `baseUrl` | `https://api.github.com` | Override for GitHub Enterprise. |

## Mount mode

`read`.

For the run/job/log layout see the [Python GitHub CI docs](/python/resource/github_ci).
