Linear-sync linear-sync

Linear Sync — Bidirectional Linear ↔ OpenClaw Sync

install
source · Clone the upstream repo
git clone https://github.com/Omerbahari/linear-sync
Claude Code · Install into ~/.claude/skills/
git clone --depth=1 https://github.com/Omerbahari/linear-sync ~/.claude/skills/omerbahari-linear-sync-linear-sync-a434dd
manifest: SKILL.md
source content

Linear Sync — Bidirectional Linear ↔ OpenClaw Sync

Bidirectional sync between Linear and OpenClaw workspace files. Changes in Linear (status moves, comments, new issues, label/priority changes) are detected and written to memory files. Changes from agents are pushed back to Linear.

When to Use

  • When you need Linear as a mission control dashboard for AI agents
  • When agents should react to Linear issue changes (status, comments, assignments)
  • When agent work should automatically update Linear issues
  • When you want a passive project management layer (phone-friendly, zero new habits)

Architecture

Linear (phone/web)  ←→  sync.js  ←→  OpenClaw memory files
     │                                      │
     │  PULL: status changes, comments,     │  PUSH: new issues, status
     │        new issues, label changes     │        updates, comments
     │                                      │
     └──────────── Polling (cron/heartbeat) ─┘

Setup

1. Configure

Edit

config.json
with your Linear API token and team details:

{
  "token": "lin_api_YOUR_TOKEN",
  "teamId": "your-team-uuid",
  "teamKey": "KEY",
  "syncFile": "/path/to/memory/linear-sync-state.json",
  "statusFile": "/path/to/memory/linear-board.md",
  "states": { ... },
  "labels": { ... }
}

Get your API key from: https://linear.app/settings/api

2. Run Initial Sync

node sync.js test

This creates a baseline snapshot of all issues and generates the board.

3. Add to Heartbeat

Add to your

HEARTBEAT.md
:

## Linear Sync (every heartbeat)
- [ ] Run: `cd ~/clawd/scripts/linear-sync && node sync.js full`
- [ ] Check `memory/linear-changes.md` for new changes
- [ ] Act on changes (delegate to agents, update tasks, notify user)

Or set up a cron:

# Every 15 minutes
openclaw cron add --schedule '*/15 * * * *' --command 'cd ~/clawd/scripts/linear-sync && node sync.js full'

Commands

CommandWhat it does
node sync.js pull
Check Linear for changes since last sync → writes to
memory/linear-changes.md
node sync.js push
Read
memory/linear-push.jsonl
→ create/update issues in Linear
node sync.js board
Generate
memory/linear-board.md
with current board state
node sync.js full
Pull + Push + Board (recommended for heartbeats)
node sync.js test
Baseline sync + verify everything works

File Outputs

FilePurpose
memory/linear-board.md
Current board state (read this for status)
memory/linear-changes.md
Append-only log of detected changes
memory/linear-sync-state.json
Internal state (issue snapshots, last sync time)
memory/linear-push.jsonl
Push queue (write here to create/update Linear issues)

Push Queue Format

Write JSONL lines to

memory/linear-push.jsonl
:

{"action":"create","title":"New task","description":"Details...","state":"todo","priority":2,"labelIds":["label-uuid"]}
{"action":"update_status","issueId":"issue-uuid","state":"done"}
{"action":"comment","issueId":"issue-uuid","body":"Agent update: task completed"}

Change Detection

The pull command detects:

  • 🔄 Status changes — issue moved between columns
  • 💬 New comments — including who wrote them
  • Priority changes — urgency shifts
  • 🏷️ Label changes — agent assignment changes
  • 🆕 New issues — created since last sync

Agent Integration Pattern

Heartbeat fires
  → node sync.js full
  → Check linear-changes.md
  → "ROS-5 moved Todo → In Progress, label: 💻 Friday"
  → Spawn Friday agent with task details
  → Friday completes work
  → Write to linear-push.jsonl: update status + add comment
  → Next sync pushes to Linear
  → Omer sees update on phone ✅

Requirements

  • Node.js 18+ (uses native
    fetch
    )
  • Linear API key with read/write access
  • OpenClaw workspace with memory directory

License

MIT