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

# Let AI Agents File and Update Linear Issues

> Let agents search, create, and update Linear issues and leave comments. Connect in one click with OAuth on OneCLI Cloud, with no API key to copy.

## Overview

OneCLI connects AI agents to [Linear](https://linear.app) through OAuth. Agents can search issues and projects, create and update issues, and leave comments. The gateway injects the token into every request, so your agent never sees it.

On OneCLI Cloud, connecting takes one click. Self-hosted, you first add your own Linear app (see the bottom of this page).

## What you will set up

* A Linear connection through OAuth
* Automatic token injection on every Linear request
* Per-agent, per-tool access, with approval for deletes

## Connect Linear

**1. Click Connect**

In the OneCLI dashboard, open **Connections** > **Linear** and click **Connect Linear**.

![OneCLI connect window for Linear, showing the setup guide link and the Connect to Linear button.](https://mintcdn.com/chartdbinc/L4k9tYUENUtEpMY8/images/integrations/linear/onecli-connect-linear.png?fit=max\&auto=format\&n=L4k9tYUENUtEpMY8\&q=85\&s=aafdbc560d6754533263991bf0e57a90)

The Linear connect window in OneCLI.

**2. Authorize in Linear**

Sign in to Linear, pick your workspace, and click **Authorize**. You're done.

## What agents can do

| Area | What agents can do |
| - | - |
| **Issues** | List, search, and read issues. Create, update, and delete issues |
| **Comments** | Add comments to issues |
| **Workspace** | List projects, teams, and labels |

## Controlling access

[Grant](https://onecli.sh/docs/guides/agent-access.md) the connection to each agent that needs it, and choose per tool what runs freely, what needs approval, and what's blocked. Put **Delete issue** behind approval. Organization [rules](https://onecli.sh/docs/guides/rules.md) add guardrails on top. A blocked request never reaches Linear.

To disconnect, remove the connection in **Connections** > **Linear**, then revoke OneCLI in Linear under **Settings** > **Account** > **Security & access**.

***

## Self-hosted: use your own Linear app

> [!NOTE]
>
> **Skip this section on OneCLI Cloud.** Self-hosted OneCLI needs either `LINEAR_CLIENT_ID` and `LINEAR_CLIENT_SECRET` on the server, or your own Linear app added below.

> [accordion] 1. Create the Linear app
>
> In Linear, open **Settings** > **API** > **OAuth applications** and click **Create new**. Name it `OneCLI`.
>
> ![Linear new OAuth application form with the name OneCLI, a developer name and URL, and https://onecli.example.com/v1/apps/linear/callback in Callback URLs.](https://mintcdn.com/chartdbinc/dTUFGeS6j-vov2tm/images/integrations/linear/01-provider-setup.png?fit=max\&auto=format\&n=dTUFGeS6j-vov2tm\&q=85\&s=754e14c9427613b3fe890275893fd336)
>
> The new OAuth application form in Linear, with the OneCLI callback URL.

> [accordion] 2. Add the callback URL
>
> In OneCLI, open **Connections** > **Linear** > **Custom credentials** and copy the **Redirect URI**. Paste it into the Linear app's **Callback URLs** and save.
>
> ![OneCLI Custom credentials card for Linear with the setup guide link, the Redirect URI and its copy button, and the client ID and secret fields.](https://mintcdn.com/chartdbinc/L4k9tYUENUtEpMY8/images/integrations/linear/onecli-custom-credentials-linear.png?fit=max\&auto=format\&n=L4k9tYUENUtEpMY8\&q=85\&s=9c8ded772842bb1dec7c4020f7743e1d)
>
> Copy the Redirect URI from Custom credentials in OneCLI.

> [accordion] 3. Connect with your app
>
> Copy the app's **Client ID** and **Client Secret** into **Custom credentials**, turn it on, then click **Connect Linear**.

## FAQ

> [accordion] Do I need a Linear API key?
>
> No. On OneCLI Cloud you connect with OAuth in one click. Self-hosted, you add your own Linear app first. See [Self-hosted](#self-hosted).

> [accordion] Does the agent see my Linear token?
>
> No. The token stays in OneCLI, and the gateway adds it at the proxy. See [How it works](https://onecli.sh/docs/how-it-works.md).

> [accordion] How do I revoke Linear access?
>
> Remove the connection in **Connections** > **Linear**, then revoke OneCLI in Linear under **Settings** > **Account** > **Security & access**.


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