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

# Linear Integration

> Configure the JJHub Linear integration from the UI or the CLI

# Configure Linear

JJHub can connect a Linear team to a JJHub repository in two ways:

* **UI**: best when you want JJHub to drive the OAuth flow and team discovery for you.
* **CLI**: best for scripted setup or when you already have the Linear team metadata and OAuth token.

## Configure Linear in the UI

1. Open **Integrations** in the JJHub UI.
2. Open **Linear Sync**.
3. Click **Connect Linear**.
4. Complete the Linear OAuth flow.
5. Choose the Linear team and JJHub repository.
6. Click **Connect Team**.

JJHub now keeps the Linear OAuth credentials server-side during this flow. The browser only receives a short-lived setup handle plus the team metadata needed to finish configuration.

After setup, the same page lets you review installed integrations, trigger an initial sync, and remove an integration.

## Configure Linear in the CLI

Use `jjhub extension linear install` when you already know the target repo and the Linear team you want to connect.

```bash theme={null}
cat <<'EOF' | jjhub extension linear install \
  --team-id team_123 \
  --team-name "Platform" \
  --team-key PLT \
  --repo-owner alice \
  --repo-name demo \
  --repo-id 42 \
  --credentials-stdin \
  --expires-at "2026-03-12T00:00:00Z" \
  --actor-id linear-user-123
{"access_token":"YOUR_LINEAR_ACCESS_TOKEN","refresh_token":"YOUR_LINEAR_REFRESH_TOKEN"}
EOF
```

Required flags:

* `--team-id`
* `--repo-owner`
* `--repo-name`
* `--repo-id`
* `--credentials-stdin`

Optional flags:

* `--team-name`
* `--team-key`
* `--expires-at`
* `--actor-id`

When `--credentials-stdin` is set, stdin must contain JSON with an `access_token` field and an optional `refresh_token` field.

## Manage an Existing Integration

```bash theme={null}
# List configured Linear integrations
jjhub extension linear list

# Trigger the initial sync for integration 7
jjhub extension linear sync 7

# Remove integration 7
jjhub extension linear remove 7
```

See the [CLI command reference](/cli-reference/commands) for the full command surface.
