pi-linear-worktree

Pi extension that fetches Linear issues and creates git worktrees to solve them

Package details

extension

Install pi-linear-worktree from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:pi-linear-worktree
Package
pi-linear-worktree
Version
1.0.0
Published
Feb 28, 2026
Downloads
18/mo · 3/wk
Author
therapys
License
MIT
Types
extension
Size
10.9 KB
Dependencies
1 dependency · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./extensions/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

pi-linear-worktree

A pi extension that fetches Linear issues and creates git worktrees to solve them.

Type /linear ENG-123 and the agent will:

  1. Fetch the full issue from Linear (title, description, comments, labels, relations)
  2. Create a git worktree with a branch named after the issue
  3. Send the issue context to the agent and start solving it

Install

pi install npm:pi-linear-worktree

Or try it without installing:

pi -e npm:pi-linear-worktree

Setup

Set your Linear API key as an environment variable:

export LINEAR_API_KEY=lin_api_xxxxxxxxxxxxx

You can create a personal API key at Linear Settings → API.

Usage

Inside a git repository, run:

/linear <issue-id>

For example:

/linear ENG-123

The extension will:

  • Fetch the issue details from Linear
  • Create a worktree at ../<branch-name> relative to the repo root
  • If the worktree/branch already exists, reuse it
  • Name the pi session after the issue
  • Send the full issue context to the agent to start working on it

What gets sent to the agent

  • Issue title, description, state, priority, assignee
  • Labels and parent issue
  • Related issues
  • All comments (chronological)
  • Worktree path and branch name
  • Instructions to work in the worktree and commit when done

License

MIT