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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@humanlayer/linear-cli

v0.6.2

Published

Command line interface for Linear

Readme

Linear CLI

A command-line interface for interacting with Linear issue tracking, built with Bun as a single-file executable.

Features

  • List your active assigned issues (my-issues, list-issues)
  • View issue details and comments (get-issue)
  • Add comments to issues (add-comment)
  • Update issue status (update-status)
  • Add links to issues (add-link)
  • Download all images from issues (fetch-images)
  • Automatically detect issue IDs from git branch names
  • Shell completions for fish, zsh, and bash
  • Cross-platform single-file executables
  • Smart handling of environment variables (only requires API key for operations)

Project Structure

src/
├── index.ts                  # Main CLI entry point
├── commands/                 # Individual command implementations
│   ├── listIssues.ts
│   ├── getIssue.ts
│   ├── addComment.ts
│   ├── updateStatus.ts
│   ├── addLink.ts
│   ├── fetchImages.ts
│   ├── getIssueV2.ts
│   ├── listIssuesV2.ts
│   └── completion.ts
└── utils/                    # Shared utility functions
    ├── client.ts            # Linear client initialization
    ├── git.ts               # Git integration utilities
    └── images.ts            # Image handling utilities

Setup

  1. Make sure you have a Linear API key (you'll need it for actual operations, but not for help/completion):

    export LINEAR_API_KEY=your_api_key
  2. Build the CLI:

    bun install
    bun run build
  3. The build creates a standalone executable that can be used directly or added to your PATH.

Usage

# List your assigned active issues (only shows issues not marked as done/canceled)
./linear-darwin-arm64 my-issues

# List and filter issues with advanced options
./linear-darwin-arm64 list-issues --assignee "John Doe" --status "In Progress"

# View details of an issue
./linear-darwin-arm64 get-issue ENG-123
# Or if your git branch contains the issue ID (e.g., feature/ENG-123-something)
./linear-darwin-arm64 get-issue

# Add a comment to an issue (requires message as first parameter)
./linear-darwin-arm64 add-comment "This is my comment" --issue-id ENG-123  # Explicit ID
./linear-darwin-arm64 add-comment "This is my comment"  # Uses git branch auto-detection

# Update issue status
./linear-darwin-arm64 update-status ENG-123 "In Progress"

# Add a link to an issue
./linear-darwin-arm64 add-link ENG-123 https://github.com/example/repo --title "Related PR"

# Download all images from an issue to local thoughts directory
./linear-darwin-arm64 fetch-images ENG-123

Fetch Images

Download all images from a Linear issue to the local thoughts directory:

linear fetch-images ENG-123

This command:

  • Downloads all images embedded in the issue description and comments
  • Saves them to thoughts/shared/images/ENG-123/
  • Names files as ENG-123-01.png, ENG-123-02.jpg, etc.
  • Outputs the list of saved file paths (one per line)
  • Shows progress messages to stderr

Example output:

Downloaded 2 images:
thoughts/shared/images/ENG-123/ENG-123-01.png
thoughts/shared/images/ENG-123/ENG-123-02.jpg

Add Comment Requirements

  • Message is required as the first parameter
  • Issue ID is either:
    • Auto-detected from git branch name (e.g., feature/ENG-123-something)
    • Provided with the --issue-id or -i option (e.g., -i ENG-123)
  • If neither is available, the tool will prompt you to use one of these options

Shell Completions

You can also manually generate and install completions for your shell with:

# Fish
linear completion --fish > ~/.config/fish/completions/linear.fish

# Zsh
mkdir -p ~/.zsh/completions
linear completion --zsh > ~/.zsh/completions/_linear
# Add to .zshrc: fpath=(~/.zsh/completions $fpath)
# Then: autoload -U compinit && compinit

# Bash
mkdir -p ~/.bash_completion.d
linear completion --bash > ~/.bash_completion.d/linear
# Add to .bashrc: source ~/.bash_completion.d/linear

Requirements

One of the following JavaScript runtimes:

  • Bun (recommended for speed)
  • Node.js with ts-node or tsx
  • npm with npx

Required npm packages (installed automatically by setup.sh):

  • @linear/sdk
  • commander
  • chalk
  • inquirer

Development

Build Commands

# Install dependencies
bun install

# Build for macOS ARM64
bun run build

# Build for Linux x64
bun run build:linux

# Development mode with watch
bun run dev

# Run from source
bun run start

Build Output

The build process creates standalone executables:

  • linear-darwin-arm64 - macOS ARM64 (Apple Silicon)
  • linear-linux-x64 - Linux x64

These are single-file executables with the Bun runtime embedded, making them portable and requiring no dependencies at runtime.

Update your CLAUDE.md

You may find it helpful to add a note to your ~/.claude/CLAUDE.md:

## Linear
When asked to fetch a Linear ticket, use the globally installed Linear CLI: `linear get-issue ENG-XXXX > thoughts/shared/tickets/eng-XXXX.md`