CROP

Linear Archive

Tool for archiving Linear issues to JSON + Markdown format to manage issue limits.

Linear Archive

Repository: CT-CROP/CROP-linear-archive Last updated: 2026-02-02 Last synced to docs: 2026-03-10

Archive Linear issues with full data (comments, attachments) to JSON + Markdown format. Helps manage Linear issue limits by exporting old issues before deletion.

Features

  • Export issues in Archive or Canceled status older than N days
  • Save full issue data including comments, attachments, parent/child relationships
  • Human-readable Markdown export alongside JSON
  • Index file for quick search across all archived issues
  • Optional: Delete issues from Linear after archiving
  • Dry-run mode, skip already archived, rate limiting

Setup

  1. Get Linear API Key from https://linear.app/settings/api
  2. cp .env.example .env and add your LINEAR_API_KEY
  3. npm install

Usage

npm run archive:dry-run        # Preview (no changes)
npm run archive                # Archive only (no deletion)
npm run archive:delete         # Archive + Delete from Linear
npm run archive:force          # Force re-archive existing

Configuration

VariableDefaultDescription
LINEAR_API_KEY-Your Linear API key (required)
ARCHIVE_DAYS_OLD7Archive issues not updated for N days
ARCHIVE_STATUSESArchive,CanceledStatus names to match

Data Structure

data/
├── index.json              # Index of all archived issues
├── archive.log             # Execution log
└── issues/
    └── CT-123/
        ├── issue.json      # Full issue data (JSON)
        ├── README.md       # Human-readable format
        └── attachments/    # Downloaded files

On this page