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

# GitHub Actions - GitHub Copilot SDK for Laravel

> Explica cómo instalar Copilot CLI y configurar la autenticación por token para usar Laravel Copilot SDK en GitHub Actions.

## Uso en GitHub Actions

Ejemplo de ejecución de un comando Artisan en GitHub Actions que utiliza Copilot CLI internamente.

En GitHub Actions es habitual usar el modo stdio.

## Si instalas el comando `copilot` directamente

```yaml theme={null}
      - name: Install Copilot CLI
        run: |
          curl -fsSL https://gh.io/copilot-install | bash
          copilot version

      - name: Run command
        run: php artisan copilot:ping
        env:
          COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
```

* Instálalo usando `copilot-install`. Como path puedes dejar `copilot`, sin ajustes extra.
* Autentícate con `COPILOT_GITHUB_TOKEN`. Sirve cualquier método soportado por Copilot CLI: `GH_TOKEN`, `GITHUB_TOKEN`, etc.
* El token necesita permisos `Copilot Requests`, así que probablemente no funcionará con el `GITHUB_TOKEN` por defecto.

## Si usas el comando `gh`

GitHub CLI 2.86.0 añadió la funcionalidad de instalar Copilot. En un entorno normal de GitHub Actions, `gh` viene preinstalado, así que puedes usarlo sin instalar nada adicional. Como la primera vez que se ejecuta `gh copilot ...` se instala Copilot automáticamente, basta con lanzar `gh copilot version`.

> gh version 2.86.0 (2026-01-21)
> [https://github.com/cli/cli/releases/tag/v2.86.0](https://github.com/cli/cli/releases/tag/v2.86.0)
> ✓ Copilot CLI installed successfully

```yaml theme={null}
      - name: Install Copilot CLI
        run: |
          gh --version
          gh copilot version

      - name: Run command
        run: php artisan copilot:ping
        env:
          COPILOT_GITHUB_TOKEN: ${{ secrets.COPILOT_GITHUB_TOKEN }}
          COPILOT_CLI_PATH: "gh copilot"
```

`COPILOT_CLI_PATH` solo recibe un tratamiento especial cuando vale `gh copilot`, por lo que no funciona con otros valores.

<Info>
  Consulta la información más reciente en el [repositorio de GitHub](https://github.com/invokable/laravel-copilot-sdk).
</Info>


## Related topics

- [GitHub Copilot SDK for Laravel](/es/packages/laravel-copilot-sdk/index.md)
- [Autenticación - GitHub Copilot SDK for Laravel](/es/packages/laravel-copilot-sdk/auth.md)
- [Tests - GitHub Copilot SDK for Laravel](/es/packages/laravel-copilot-sdk/fake.md)
- [Token de GitHub](/es/packages/laravel-copilot-sdk/github-token.md)
- [Laravel Cloud - GitHub Copilot SDK for Laravel](/es/packages/laravel-copilot-sdk/laravel-cloud.md)
