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

# GitHub Actions

> Install clabs on a runner and emit events from CI.

Use this when agents or scripts run in GitHub Actions and you want that activity
in CorporateLabs.

## 1. Create a GitHub Actions installation

In the console → **Installations** → type **GitHub Actions** → create.

Copy the access key and store it as a repository secret:

```bash theme={null}
# from your laptop, with gh authenticated
printf '%s' 'clt_…' | gh secret set CLABS_ACCESS_KEY
```

Or: GitHub → **Settings** → **Secrets and variables** → **Actions** → New secret
named `CLABS_ACCESS_KEY`.

## 2. Install in the workflow (install only)

```yaml theme={null}
- name: Install clabs
  run: curl -fsSL https://install.corporatelabs.ai/github.sh | sh
```

`github.sh` only installs the binary. Your next steps run `clabs`.

## 3. Run discover or intercept

```yaml theme={null}
- name: Discover once
  env:
    CLABS_ACCESS_KEY: ${{ secrets.CLABS_ACCESS_KEY }}
    CLABS_HOST_ID: gha-${{ github.run_id }}
  run: clabs run -once
```

For LLM egress capture, use the **Intercept** recipe from the console (or see
[Intercept](/guides/intercept)) inside the job after install.

## 4. Verify

Open the console → **Events** and filter by the `CLABS_HOST_ID` you set
(for example `gha-123456`).

<Warning>
  Do not print the access key in logs. Prefer `::add-mask::` if you must echo related values.
</Warning>
