@alasano/pi-linear

中文文档
0.5.0发布于 2026/08/09MITES Module零依赖构建来源已验证近 30 天下载 2730

Linear integration for pi with 64+ tools, multi-workspace auth, and per-tool settings

原始使用文档
文档目录21 节
  1. Prerequisites
  2. Install
  3. Authentication
  4. Tool settings
  5. Tools (64)
  6. Issues
  7. Issue Labels
  8. Issue Statuses
  9. Issue Relations
  10. Projects
  11. Project Labels
  12. Project Relations
  13. Documents
  14. Comments
  15. Initiatives
  16. Milestones
  17. Teams
  18. Users
  19. Workspaces
  20. Custom Views & Cycles
  21. Requirements

pi-linear

pi-linear settings overlay

Configure Linear tools and output defaults from the settings overlay.


Human-readable Linear issue list

Human-readable issue results keep screenshots clean while full JSON remains available with Ctrl+O.

Linear integration for pi with 64+ tools covering issues, projects, documents, initiatives, comments, relations, and more. Includes multi-workspace auth and a per-tool settings overlay.

Prerequisites

You need a Linear API key. To create one:

  1. Go to Linear Settings > Account > Security & Access > API
  2. Click Create key and give it a name (e.g. "pi")
  3. Under Permissions, select Only select permissions with Read and Write enabled. Leave Admin unchecked.
  4. Under Team access, choose All teams you have access to or scope to specific teams if you prefer
  5. Click Create and copy the key

Install

pi install npm:@alasano/pi-linear

Authentication

The extension can use either stored workspaces or the LINEAR_API_KEY environment variable. Stored workspaces are preferred by default so multi-account switching keeps working even if LINEAR_API_KEY is set globally.

Use the /linear-auth command to manage workspaces and choose the auth preference:

CommandDescription
/linear-auth add <name>Add a workspace with an API key (prompts for key)
/linear-auth remove <name>Remove a workspace (shows selector if name omitted)
/linear-auth switch <name>Switch active workspace and prefer stored workspaces
/linear-auth prefer workspace|envChoose whether stored workspaces or LINEAR_API_KEY are tried first
/linear-auth statusShow auth preference, active source, and configured workspaces
/linear-authSame as status

When you add your first workspace, it becomes active automatically. Adding a second workspace prompts you to switch. After a /reload with two or more workspaces configured, the agent gets a linear_switch_workspace tool and can switch between them when asked.

Default auth resolution order (/linear-auth prefer workspace):

  1. Active stored workspace (if any workspaces are configured)
  2. LINEAR_API_KEY environment variable (fallback when no workspace is active)
  3. Interactive prompt (asks you to set up a key)

Environment auth resolution order (/linear-auth prefer env):

  1. LINEAR_API_KEY environment variable
  2. Active stored workspace (fallback when LINEAR_API_KEY is not set)
  3. Interactive prompt (asks you to set up a key)

Credentials and auth preference are stored at ~/.pi/agent/extensions/linear/credentials.json.

Tool settings

Run /linear-settings to open an overlay where you can choose the default output view and enable or disable tools by category or individually. Linear results default to a human-readable view, with full JSON available via Ctrl+O; you can flip the default to full JSON if you prefer. Disabled tools are removed from the LLM's context entirely. Preferences persist across sessions.

Tools (64)

Enum values, sort keys, and filter value hints in the tool schemas mirror Linear's GraphQL schema introspection.

Issues

ToolDescription
linear_list_issuesList issues with filters, pagination, and sort
linear_get_issueGet full issue details by identifier (ENG-123) or id
linear_create_issueCreate an issue with full IssueCreateInput support
linear_update_issueUpdate an issue with full IssueUpdateInput support
linear_delete_issueDelete an issue (admins can permanently delete)
linear_archive_issueArchive or trash an issue
linear_unarchive_issueRestore an archived issue
linear_search_issuesSearch issues by text, with optional comment search and team boost

Issue Labels

ToolDescription
linear_list_issue_labelsList issue labels with team filter
linear_create_issue_labelCreate an issue label
linear_update_issue_labelUpdate an issue label
linear_delete_issue_labelDelete an issue label

Issue Statuses

ToolDescription
linear_list_issue_statusesList workflow states (issue statuses)

Issue Relations

ToolDescription
linear_list_issue_relationsList issue relations
linear_create_issue_relationCreate a relation (blocks, duplicate, related, similar)
linear_update_issue_relationUpdate a relation
linear_delete_issue_relationDelete a relation

Projects

ToolDescription
linear_list_projectsList projects with filters, pagination, and sort
linear_get_projectGet full project details by id
linear_save_projectCreate or update a project
linear_delete_projectDelete a project
linear_archive_projectArchive or trash a project
linear_unarchive_projectRestore an archived project

List and search results include pageInfo in the JSON output for cursor pagination. Project list results use a bounded summary selection, and linear_get_project plus project save results include the project's markdown content body.

Project Labels

ToolDescription
linear_list_project_labelsList project labels
linear_create_project_labelCreate a project label
linear_update_project_labelUpdate a project label
linear_delete_project_labelDelete a project label

Project Relations

ToolDescription
linear_list_project_relationsList project relations
linear_create_project_relationCreate a project relation
linear_update_project_relationUpdate a project relation
linear_delete_project_relationDelete a project relation

Documents

ToolDescription
linear_list_documentsList documents with filters and pagination
linear_get_documentGet full document details by id
linear_create_documentCreate a document
linear_update_documentUpdate a document
linear_delete_documentDelete a document
linear_unarchive_documentRestore an archived document

Comments

ToolDescription
linear_list_commentsList comments with filters and pagination
linear_create_commentCreate a comment on an issue, project update, etc.
linear_update_commentUpdate a comment
linear_delete_commentDelete a comment

Initiatives

ToolDescription
linear_list_initiativesList initiatives with filters, pagination, and sort
linear_get_initiativeGet full initiative details by id
linear_save_initiativeCreate or update an initiative
linear_delete_initiativeDelete an initiative
linear_archive_initiativeArchive an initiative
linear_unarchive_initiativeRestore an archived initiative

Milestones

ToolDescription
linear_list_milestonesList project milestones
linear_get_milestoneGet milestone details by id
linear_save_milestoneCreate or update a milestone
linear_delete_milestoneDelete a milestone

Teams

ToolDescription
linear_list_teamsList teams with workflow states
linear_get_teamGet team details by id

Users

ToolDescription
linear_list_usersList users
linear_get_userGet user details by id

Workspaces

ToolDescription
linear_switch_workspaceSwitch active workspace (only available with 2+ workspaces)

Custom Views & Cycles

ToolDescription
linear_list_viewsList custom views of any type (filter, pagination, order)
linear_get_viewGet a custom view by id or slug (incl. project/initiative views)
linear_create_viewCreate an issues/projects/initiatives/updates view
linear_update_viewUpdate a custom view by id (name, filters, icon, color, shared)
linear_delete_viewDelete a custom view by id
linear_set_view_preferencesSet display preferences (grouping & columns) for a custom view
linear_list_cyclesList cycles (filter by team, pagination, order)
linear_get_cycleGet cycle details by id or slug
linear_create_cycleCreate a cycle for a team (startsAt / endsAt, optional name)
linear_update_cycleUpdate a cycle by id (name, dates, completion)
linear_archive_cycleArchive a cycle by id and unlink its assigned issues

Custom view display settings (group by assignee/status/priority, show Estimate/Due date columns) are stored per user via linear_set_view_preferences; open the view afterwards to see the grouping applied.

Requirements

  • Pi interactive mode (settings overlay uses the widget API)

版本与发布记录

@alasano/pi-linear 共发布 9 个版本,首次发布于 2026/04/04;过去 12 个月发布了 9 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
0.5.0latest2026/08/092 个月前
0.4.12026/06/214 个月前
0.4.02026/06/214 个月前
0.3.12026/06/184 个月前
0.3.02026/05/086 个月前
0.2.02026/04/296 个月前

关于 @alasano/pi-linear 的常见问题

@alasano/pi-linear 是什么?

Linear integration for pi with 64+ tools, multi-workspace auth, and per-tool settings

如何安装 @alasano/pi-linear?

在项目目录运行 npm install @alasano/pi-linear,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:@earendil-works/pi-coding-agent(>=0.79.9)、@earendil-works/pi-tui(>=0.79.9)、typebox(>=1.1.38)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@alasano/pi-linear 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/alasano__pi-linear 是否存在。

@alasano/pi-linear 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@alasano/pi-linear 可以商用吗?

@alasano/pi-linear 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@alasano/pi-linear 的下载量有多少?

根据 npm 官方下载统计,@alasano/pi-linear 在 2026/10/06 – 2026/11/04 这 30 天内被下载 2,730 次,日均约 91 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@alasano/pi-linear 还在维护吗?

最新版本 0.5.0 发布于 2026/08/09(2 个月前);至今共发布 9 个版本,其中过去 12 个月发布了 9 个;首次发布于 2026/04/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。