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

# CircleCI

> Inspect and control CircleCI pipelines, workflows, and jobs

## At a glance

* **Availability**: Experimental ([how to enable](/cloud/integrations)).
* **Auth**: API key.
* **Connection**: The key from `CIRCLECI_TOKEN` is sent as the `Circle-Token` header.
* **Docs**: [https://circleci.com/docs/api/v2/index.html](https://circleci.com/docs/api/v2/index.html)

## Credentials

Set these per environment. See [Connect an integration](/cloud/integrations).

| Variable         | Required | Description                                                                                                               |
| ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------- |
| `CIRCLECI_TOKEN` | Yes      | CircleCI personal API token (User Settings > Personal API Tokens) [Docs](https://circleci.com/docs/managing-api-tokens/). |

## Setup

1. **Sign in to CircleCI**: Go to [https://app.circleci.com](https://app.circleci.com) and sign in (the free plan with a connected GitHub repo is sufficient for testing).
2. **Create a personal API token**: Open User Settings > Personal API Tokens ([https://app.circleci.com/settings/user/tokens](https://app.circleci.com/settings/user/tokens)) and create a token.
3. **Set the environment variable**: Add the token to your .env as CIRCLECI\_TOKEN=...
4. **Find your project slug**: Slugs look like gh/your-org/your-repo (or circleci/\<org-id>/\<project-id> for GitLab and GitHub App projects). Run List Pipelines with it to verify access.

* CircleCI authenticates with a 'Circle-Token' header
* Project slugs contain slashes (vcs/org/repo) and are passed verbatim in the URL path
* Personal tokens act with your user's permissions across all your organizations

Provider API reference: [https://circleci.com/docs/api/v2/index.html](https://circleci.com/docs/api/v2/index.html)

## Tools

| Tool                    | Access | Description                                             |
| ----------------------- | ------ | ------------------------------------------------------- |
| List Pipelines          | Read   | List recent pipelines for a project                     |
| Get Pipeline            | Read   | Get a pipeline by its ID                                |
| Trigger Pipeline        | Write  | Trigger a new pipeline for a project on a branch or tag |
| List Pipeline Workflows | Read   | List the workflows of a pipeline                        |
| Get Workflow            | Read   | Get a workflow by its ID                                |
| List Workflow Jobs      | Read   | List the jobs of a workflow with their statuses         |
| Cancel Workflow         | Write  | Cancel a running workflow                               |

## Example prompts

* Show the most recent CircleCI pipelines for my project and the status of their workflows.
* Find the last failed CircleCI workflow for my project and list which jobs failed.
