npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

github-to-linear

v0.1.0

Published

Import a single GitHub issue to Linear

Readme

github-to-linear

A CLI tool to import a single GitHub issue to Linear.

Prerequisites

GitHub CLI

This tool requires GitHub CLI (gh) to be installed and authenticated:

# macOS
brew install gh

# Authenticate
gh auth login

GitHub CLI Installation Guide

Linear API Key

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

Required Permissions:

  • Read (required)
  • Create issues (required)
  • Create comments (required if using --with-comments)

Quick Start

Import a GitHub issue to Linear using npx (no installation required):

npx github-to-linear import \
  --linear-key lin_api_xxxxxxxxxxxxx \
  --owner octocat \
  --repo hello-world \
  --issue 42 \
  --team ENG

Find Your Team Key

Your team key can be found in the Linear URL when viewing your team:

https://linear.app/your-workspace/team/ENG/...
                                        ^^^
                                     Team Key

For example:

  • https://linear.app/acme/team/ENG/active → Team Key is ENG
  • https://linear.app/acme/team/PROD/backlog → Team Key is PROD

Simply navigate to your team's page in Linear and copy the team key from the URL.

Usage

Basic Usage

npx github-to-linear import \
  --linear-key YOUR_LINEAR_API_KEY \
  --owner GITHUB_OWNER \
  --repo REPO_NAME \
  --issue ISSUE_NUMBER \
  --team TEAM_KEY

Using Environment Variable

You can also set the Linear API key as an environment variable:

export LINEAR_API_KEY=lin_api_xxxxxxxxxxxxx

npx github-to-linear import \
  --owner octocat \
  --repo hello-world \
  --issue 42 \
  --team ENG

Options

| Option | Short | Description | Default | |--------|-------|-------------|---------| | --owner | -o | GitHub repository owner | Required | | --repo | -r | GitHub repository name | Required | | --issue | -i | GitHub issue number | Required | | --team | -t | Linear team key (e.g., ENG, PROD) | Required | | --linear-key | -k | Linear API key (overrides env var) | - | | --priority | -p | Priority (0-4) | 3 | | --with-comments | - | Import comments as well | false | | --with-labels | - | Import labels as Linear labels | false | | --link-github | - | Link to the original GitHub issue | true | | --yes | -y | Skip confirmation prompt | false |

Priority Values

  • 0: No priority
  • 1: Urgent
  • 2: High
  • 3: Medium (default)
  • 4: Low

Examples

Simple import

npx github-to-linear import \
  -k lin_api_xxxxxxxxxxxxx \
  -o octocat \
  -r hello-world \
  -i 42 \
  -t ENG

Import with comments and labels

npx github-to-linear import \
  -k lin_api_xxxxxxxxxxxxx \
  -o octocat \
  -r hello-world \
  -i 42 \
  -t ENG \
  --with-comments \
  --with-labels

Skip confirmation (non-interactive)

Useful for CI/CD or scripts:

npx github-to-linear import \
  -k lin_api_xxxxxxxxxxxxx \
  -o octocat \
  -r hello-world \
  -i 42 \
  -t ENG \
  --yes

High priority urgent issue

npx github-to-linear import \
  -k lin_api_xxxxxxxxxxxxx \
  -o octocat \
  -r hello-world \
  -i 42 \
  -t ENG \
  -p 1

Features

  • ✅ Import GitHub issue title and body
  • ✅ Convert GitHub state to Linear workflow state
    • openBacklog / Todo
    • closedDone / Completed
  • ✅ Set priority
  • ✅ Import labels (auto-create if not exists)
  • ✅ Import comments
  • ✅ Automatic link to original GitHub issue
  • ✅ Interactive confirmation before import
  • ✅ Team key resolution (no need for UUID)

Development

Setup

Clone the repository and install dependencies:

git clone <repository-url>
cd github-to-linear
npm install

Build

npm run build

Run in Development Mode

npm run dev -- import -k lin_api_xxx -o owner -r repo -i 123 -t ENG

Lint & Format

This project uses Biome.

# Check
npm run lint

# Auto-fix
npm run lint:fix

# Format
npm run format

License

MIT