---
title: Linear
icon: triangle
description: Mount Linear teams, projects, and issues as a Mirage filesystem.
---

`LinearResource` exposes a Linear workspace as a tree of teams, projects, and issues. Reads route through the Linear GraphQL API.

Setup steps for the API key live at [Linear Credentials](/home/setup/linear).

## Node

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

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

const linear = new LinearResource({
  apiKey: process.env.LINEAR_API_KEY!,
  workspace: 'strukto',
})

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

## Browser

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

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

const linear = new LinearResource({
  apiKey: LINEAR_API_KEY,
})
```

## Config

| Field | Default | Notes |
| --- | --- | --- |
| `apiKey` | required | Personal API key. Redacted in snapshots. |
| `workspace` | (auto) | Workspace identifier; auto-detected from the key. |
| `teamIds` | none | Optional allowlist of team IDs to expose. |
| `baseUrl` | `https://api.linear.app/graphql` | Override for self-hosted instances. |

## Mount mode

`read`.

For the mounted layout (`teams/`, `projects/`, `issues/`) see the [Python Linear docs](/python/resource/linear).
