Skip to content

Sync Linear (https://linear.app) issues with Obsidian notes. Create, update, and track Linear issues directly from your vault.

License

Notifications You must be signed in to change notification settings

casals/obsidian-linear-integration-plugin

Repository files navigation

Linear Integration for Obsidian

A comprehensive Linear integration plugin for Obsidian that provides seamless bidirectional synchronization between your notes and Linear issues. Create, sync, and manage Linear issues directly from Obsidian with advanced features like autocomplete, conflict resolution, and automatic label creation.

✨ Features

Core Functionality

  • πŸ”„ Bidirectional Sync: Keep Linear issues and Obsidian notes in perfect sync
  • πŸ“ Issue Creation: Convert markdown notes to Linear issues with inline tags and auto-fill
  • 🏷️ Smart Tag Support: Use @assignee/john, @status/done, @label/bug, @priority/1 syntax
  • ⚑ Real-time Autocomplete: Smart suggestions for users, statuses, labels, projects, and teams
  • 🎨 Color-coded Labels: Visual label organization with Linear's actual colors
  • πŸ” Quick Edit: Edit Linear issues without leaving Obsidian
  • πŸ’‘ Interactive Tooltips: Hover over issue links to see instant previews with actions

Advanced Sync Features

  • βš”οΈ Intelligent Conflict Resolution: Smart detection and resolution of sync conflicts
  • πŸ€– Auto-fill from Expressions: Automatically populate issue fields from note content
  • 🏷️ Dynamic Label Creation: Automatically create new labels when they don't exist
  • πŸ“Š API Retry Logic: Robust API handling with exponential backoff
  • βš™οΈ Granular Settings: Fine-tune autocomplete, tooltips, and auto-fill behavior

Productivity Features

  • πŸ“‹ Kanban Generation: Auto-generate kanban boards from your Linear issues
  • πŸ“… Agenda Views: Create agenda notes with due dates and priorities
  • πŸ’¬ Comment Mirroring: Sync Linear comments to your notes
  • πŸš€ Batch Operations: Bulk create/update issues across multiple notes
  • 🎯 Custom Status Mapping: Map Linear statuses to your preferred emojis

Enterprise Features

  • 🏒 Multi-workspace Support: Handle multiple Linear organizations
  • πŸ” Secure Token Storage: Encrypted API key management
  • βš™οΈ Local Configuration: Per-folder .linear.json config files
  • πŸ“Š Conflict Analytics: Track and analyze sync conflicts
  • 🎯 Advanced Filtering: Custom GraphQL queries and filters

πŸš€ Quick Start

Installation

  1. Download: Get the latest release from GitHub Releases
  2. Install: Extract to .obsidian/plugins/linear-integration/ in your vault
  3. Enable: Go to Settings β†’ Community Plugins β†’ Enable "Linear Integration"

Setup

  1. Get API Key: Go to Linear Settings β†’ API and create a Personal API Key
  2. Configure Plugin:
    • Open Obsidian Settings β†’ Linear Integration
    • Enter your API key (lin_api_...)
    • Click "Test Connection" to verify
    • Select your default team
    • Configure auto-fill and autocomplete settings

Basic Usage

Creating Issues from Notes

Add inline tags to any note:

# Bug: Login validation not working 

@team/Engineering @assignee/sarah.jones @priority/1 @status/In Progress @label/critical @label/frontend

The login form doesn't validate email addresses properly when users enter malformed addresses.

Steps to reproduce:
1. Navigate to login page
2. Enter invalid email format
3. Submit form

Expected: Validation error shown
Actual: Form submits successfully

Then run the "Create Linear Issue from Note" command or use Ctrl/Cmd + P β†’ "Linear: Create Issue".

Auto-fill from Expressions

Enable "Auto-fill from Note Expressions" in settings to automatically populate issue fields:

  • Team: @team/Engineering β†’ Auto-selects Engineering team
  • Assignee: @assignee/john.doe β†’ Auto-assigns to John Doe
  • Priority: @priority/1 β†’ Sets to Urgent priority
  • Status: @status/In Progress β†’ Sets initial status
  • Labels: @label/bug @label/urgent β†’ Creates and assigns labels

Syncing Existing Issues

Use the sync button in the ribbon or run "Sync Linear Issues" command to pull your Linear issues into Obsidian.

πŸ“– Documentation

Enhanced Inline Tag Syntax

Tag Type Syntax Example Auto-complete
Team @team/team-name @team/Engineering βœ…
Assignee @assignee/username @assignee/john.doe βœ…
Status @status/status-name @status/In Progress βœ…
Priority @priority/number @priority/1 βœ…
Project @project/project-name @project/Q4 Roadmap βœ…
Labels @label/label-name @label/bug @label/urgent βœ…

Note: All tags support spaces in names (e.g., @assignee/John Doe, @status/In Review)

Auto-complete Features

The plugin provides intelligent autocomplete with:

  • Context-aware suggestions based on your Linear workspace
  • Color-coded labels matching Linear's label colors
  • Hierarchical label display (groups and child labels)
  • Default value prioritization from local config
  • Fuzzy matching for faster selection

Type any of the tag prefixes and see instant suggestions:

  • @team/ β†’ Shows all available teams
  • @assignee/ β†’ Shows all team members
  • @status/ β†’ Shows workflow states
  • @label/ β†’ Shows existing labels with colors

Local Configuration

Create .linear.json files in any folder to customize behavior:

{
  "workspace": "my-company",
  "team": "engineering", 
  "project": "q4-roadmap",
  "defaultAssignee": "john.doe@company.com",
  "defaultPriority": 3,
  "autoSync": true,
  "labels": [
    "frontend",
    "backend", 
    "bug-fix"
  ],
  "template": "# {{title}}\n\n**Status:** {{status}} | **Priority:** {{priority}}\n**Assignee:** {{assignee}} | **Team:** {{team}}\n\n## Context\n{{description}}\n\n## Acceptance Criteria\n- [ ] \n\n## Notes\n\n\n---\n*Linear: [{{identifier}}]({{url}}) | Last synced: {{lastSync}}*",
  "syncRules": {
    "bidirectional": true,
    "conflictResolution": "manual",
    "includeComments": true
  },
  "display": {
    "showTooltips": true,
    "enableQuickEdit": true,
    "statusIcons": {
      "Backlog": "πŸ“‹",
      "Todo": "πŸ“", 
      "In Progress": "πŸ”„",
      "In Review": "πŸ‘€",
      "Done": "βœ…",
      "Canceled": "❌"
    }
  }
}

Frontmatter Integration

The plugin automatically manages frontmatter for synced notes:

---
linear_id: "issue-uuid"
linear_identifier: "ENG-123"
linear_status: "In Progress"
linear_assignee: "John Doe"
linear_team: "Engineering"
linear_url: "https://linear.app/issue/ENG-123"
linear_created: "2024-01-15T10:30:00Z"
linear_updated: "2024-01-16T14:22:00Z"
linear_last_synced: "2024-01-16T14:25:00Z"
linear_priority: 1
linear_estimate: 5
linear_labels: ["bug", "frontend", "critical"]
---

Custom Templates

Customize note generation with template variables:

# {{title}}

**Status:** {{status}} | **Priority:** {{priority}}
**Assignee:** {{assignee}} | **Team:** {{team}}
**Created:** {{created}} | **Updated:** {{updated}}

## Description
{{description}}

## Acceptance Criteria
- [ ] 

## Notes


---
*Linear: [{{identifier}}]({{url}}) | Last synced: {{lastSync}}*

Available variables:

  • {{title}}, {{description}}, {{status}}, {{assignee}}
  • {{team}}, {{priority}}, {{estimate}}, {{created}}
  • {{updated}}, {{identifier}}, {{url}}, {{lastSync}}

βš™οΈ Configuration

Plugin Settings

Setting Description Default
API Key Your Linear Personal API Key -
Default Team Default team for new issues -
Sync Folder Folder for Linear notes "Linear Issues"
Auto Sync Sync on startup false
Sync Interval Minutes between auto-syncs 15
Auto-fill from Expressions Parse note content to pre-fill modal true
Autocomplete Enabled Enable smart autocomplete true
Quick Edit Enabled Enable quick edit modals true
Tooltips Enabled Show interactive tooltips true
Conflict Resolution How to handle conflicts "manual"

Status Mapping

Customize how Linear statuses appear in your notes:

Linear Status Default Icon Customizable
Todo πŸ“‹ βœ…
In Progress πŸ”„ βœ…
Done βœ… βœ…
Canceled ❌ βœ…

Use the "Add Custom Status Mapping" button to add new status β†’ emoji mappings.

Advanced Settings

  • Comment Mirroring: Sync Linear comments to notes
  • Kanban Generation: Auto-generate kanban boards
  • Batch Operations: Enable bulk operations
  • Secure Storage: Encrypt stored tokens

πŸ”§ Development

Prerequisites

  • Node.js 16+
  • npm or yarn
  • TypeScript 5.0+

Setup

# Clone the repository
git clone https://github.com/your-username/obsidian-linear-plugin.git
cd obsidian-linear-plugin

# Install dependencies
npm install

# Start development
npm run dev

Building

# Build for production
npm run build

# Run TypeScript checks
npm run typecheck

# Lint code
npm run lint

# Clean build artifacts
npm run clean

Project Structure

src/
β”œβ”€β”€ api/                 # Linear API client with retry logic
β”‚   └── linear-client.ts
β”œβ”€β”€ features/           # Plugin features
β”‚   β”œβ”€β”€ autocomplete-system.ts    # Smart autocomplete with colors
β”‚   β”œβ”€β”€ conflict-resolver.ts      # Intelligent conflict handling
β”‚   └── local-config-system.ts   # Per-folder configuration
β”œβ”€β”€ models/             # TypeScript types and interfaces
β”‚   └── types.ts
β”œβ”€β”€ parsers/            # Markdown and expression parsing
β”‚   └── markdown-parser.ts
β”œβ”€β”€ sync/               # Bidirectional sync management  
β”‚   └── sync-manager.ts
β”œβ”€β”€ ui/                 # User interface components
β”‚   β”œβ”€β”€ issue-modal.ts            # Enhanced issue creation modal
β”‚   └── settings-tab.ts          # Plugin settings with custom modals
β”œβ”€β”€ utils/              # Utilities and helpers
β”‚   └── frontmatter.ts
β”‚   └── debug.ts
└── main.ts             # Main plugin entry point

🀝 Contributing

Ways to Contribute

  • πŸ› Bug Reports: Found an issue? Let us know!
  • πŸ’‘ Feature Requests: Have an idea? We'd love to hear it!
  • πŸ”§ Code Contributions: Submit PRs for fixes and features
  • πŸ§ͺ Testing: Help test new features and releases

πŸ“„ License

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.

πŸ™ Acknowledgments

  • The Obsidian team for the amazing platform
  • Linear for the excellent API and GraphQL interface

πŸ“ž Support

πŸ”„ Recent Updates

v1.0.0 - Major Release

  • βœ… Enhanced Autocomplete: Color-coded suggestions with hierarchical labels
  • βœ… Auto-fill from Expressions: Smart field population from note content
  • βœ… Dynamic Label Creation: Automatically create non-existent labels
  • βœ… Improved Tag Syntax: Support for spaces in names and new tag types
  • βœ… Interactive Tooltips: Hover previews with quick actions
  • βœ… Custom Status Mapping: Easy emoji customization with modal interface
  • βœ… API Retry Logic: Robust error handling with exponential backoff
  • βœ… Enhanced UI: Loading states and better user feedback

πŸ—ΊοΈ Roadmap

  • Webhooks: Real-time updates via Linear webhooks
  • Advanced Querying: Custom GraphQL query builder
  • Team Dashboards: Team-specific views and metrics
  • Workflow Automation: Custom automation rules
  • Mobile Support: Enhanced mobile experience
  • Integrations: Slack, Discord, email notifications
  • AI-Powered Suggestions: Smart issue categorization and assignment

⭐ Star us on GitHub | πŸ› Report Issues

Made with ❀️ for the Obsidian and Linear communities

About

Sync Linear (https://linear.app) issues with Obsidian notes. Create, update, and track Linear issues directly from your vault.

Resources

License

Stars

Watchers

Forks

Packages

No packages published