Skip to content

agencyenterprise/linear-ticket-pdf-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Linear ticket PDF exporter

Exports Linear issues to PDF files using Playwright. Uses a persistent browser profile so you log in once; exports run headless.

Setup

  1. Prerequisites: Node.js 18+.

  2. Install dependencies:

    npm install
  3. Install Playwright browsers (first time only):

    npx playwright install chromium
  4. Log in to Linear (one-time; uses a local browser profile):

    npm run login

    A browser window opens at your Linear team. Sign in, then press Ctrl+C in the terminal when done. The session is saved for later exports.

Configure and use

Configuration is in export-issues.ts at the top — edit the config object:

Option Meaning
team Linear workspace slug (e.g. ae-studio)
prefix Issue key prefix (e.g. MOM)
startNumber / endNumber Range of issue numbers to export (e.g. 1–197 → MOM-1 … MOM-197)
outputDir Folder where PDFs are written (default: ./pdfs). Make sure to gitignore it
userDataDir Browser profile path (default: ./linear-browser-profile)
statePath File that tracks success/skip/error per issue (default: ./export-state.json)
maxConsecutiveMissing Stop after this many issues in a row not found (default: 5)
maxRetries Retries per issue on error (default: 3)

Run the export:

npm run export
  • Already-exported issues (in state as success) are skipped.
  • Missing issues are marked as skip; after maxConsecutiveMissing skips in a row, the run stops.
  • Failed issues are marked as error and retried on the next run.

PDFs are saved as {prefix}-{number}.pdf in outputDir (e.g. pdfs/MOM-1.pdf).

To force a re-fetch, simple edit the ./export-state.json to either remove the row or change the status to "error", so it runs again when export is executed.

About

Automation script to export Linear tickets from a project as PDF files using Playwright

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors