> For the complete documentation index, see [llms.txt](https://docs.graphlit.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.graphlit.dev/api-guides/use-cases/feeds/project-management/feed-create-linear.md).

# Create Linear Feed

## User Intent

"How do I sync Linear issues? Show me Linear feed configuration."

## Operation

**SDK Method**: `createFeed()` with FeedTypes.Issue\
**Feed Service**: Linear\
**Auth**: API token

***

## Code Example (TypeScript)

```typescript
import { Graphlit } from 'graphlit-client';
import {
  FeedTypes,
  FeedServiceTypes,
  LinearFeedPropertiesInput,
  LinearProjectsInput,
} from 'graphlit-client/dist/generated/graphql-types';

const graphlit = new Graphlit();

const linearKey = process.env.LINEAR_API_KEY!;

// Enumerate projects (teams) in Linear
const projectsResponse = await graphlit.queryLinearProjects({
  key: linearKey,
});

const projects = projectsResponse.linearProjects?.results ?? [];

if (projects.length === 0) {
  throw new Error('No Linear projects available for the provided API key');
}

const projectIdentifier = projects[0]!;
console.log(`Using Linear project: ${projectIdentifier}`);

const feed = await graphlit.createFeed({
  name: 'Product Linear',
  type: FeedTypes.Issue,
  issue: {
    type: FeedServiceTypes.Linear,
    linear: {
      key: linearKey,
      project: projectIdentifier,
      readLimit: 100,
      includeAttachments: true,
    },
  },
  // Optional: add workflow for content processing
  // workflow: { id: workflow.createWorkflow.id }
});
```

***

## Configuration

**key**: Linear API key\
**project**: Linear project identifier (enumerate via `queryLinearProjects`)\
**readLimit**: Max issues to sync\
**includeAttachments**: Capture linked files and images

***

## API Key Setup

1. Linear → Settings → API → Personal API Keys
2. Create new key and copy it to `LINEAR_API_KEY`
3. Limit scopes to the projects you plan to sync (optional)
4. Use `queryLinearProjects` to list accessible project identifiers
5. Choose the project identifier to pass when creating the feed

***
