linear-cli

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Linear CLI Agent Skill

Linear CLI Agent 技能

Use this skill when the user wants to interact with Linear - a project management tool for software teams. The
linear
CLI provides full access to Linear's API for managing issues, projects, teams, cycles, labels, and users.
当用户需要与面向软件团队的项目管理工具Linear交互时,可使用本技能。
linear
CLI可通过Linear的API全面管理问题、项目、团队、迭代周期、标签和用户。

When to Use This Skill

何时使用本技能

Activate this skill when the user:
  • Mentions Linear, Linear issues, or Linear tickets
  • Wants to create, update, or view issues/tickets
  • Asks about project status or progress
  • Needs to manage sprints/cycles
  • Wants to check their assigned tasks
  • Mentions issue identifiers like
    TECH-123
    ,
    ENG-456
    , etc.
当用户出现以下情况时激活本技能:
  • 提及Linear、Linear问题或Linear工单
  • 想要创建、更新或查看问题/工单
  • 询问项目状态或进度
  • 需要管理迭代(Sprint)/周期
  • 想要查看已分配给自己的任务
  • 提及类似
    TECH-123
    ENG-456
    的问题标识符

Prerequisites

前置条件

The CLI must be authenticated. Check with:
bash
linear auth status
If not authenticated, guide the user to run:
bash
linear auth login
CLI必须已完成认证。可通过以下命令检查:
bash
linear auth status
如果未认证,引导用户运行:
bash
linear auth login

Command Reference

命令参考

Issues (Most Common)

问题(最常用)

bash
undefined
bash
undefined

List issues with filters

带筛选条件列出问题

linear issues list --team <TEAM> linear issues list --team <TEAM> --state "In Progress" linear issues list --assignee me linear issues list --project "Project Name"
linear issues list --team <TEAM> linear issues list --team <TEAM> --state "In Progress" linear issues list --assignee me linear issues list --project "Project Name"

View issue details (supports both formats)

查看问题详情(支持两种格式)

linear issues view TECH-123 linear issues view <uuid>
linear issues view TECH-123 linear issues view <uuid>

Create new issue

创建新问题

linear issues create --title "Title" --team TECH linear issues create --title "Title" --team TECH --description "Details" --priority 2 --assignee me
linear issues create --title "Title" --team TECH linear issues create --title "Title" --team TECH --description "Details" --priority 2 --assignee me

Update issue

更新问题

linear issues update TECH-123 --state "In Progress" linear issues update TECH-123 --assignee "John Doe" linear issues update TECH-123 --priority 1
linear issues update TECH-123 --state "In Progress" linear issues update TECH-123 --assignee "John Doe" linear issues update TECH-123 --priority 1

Add comment

添加评论

linear issues comment TECH-123 --body "Comment text"
linear issues comment TECH-123 --body "Comment text"

View comments

查看评论

linear issues comments TECH-123
linear issues comments TECH-123

Archive/delete issue

归档/删除问题

linear issues delete TECH-123
undefined
linear issues delete TECH-123
undefined

Projects

项目

bash
linear projects list
linear projects view "Project Name"
linear projects create --name "New Project" --teams TECH,DESIGN
linear projects update "Project Name" --state completed
bash
linear projects list
linear projects view "Project Name"
linear projects create --name "New Project" --teams TECH,DESIGN
linear projects update "Project Name" --state completed

Teams

团队

bash
linear teams list
linear teams view TECH
bash
linear teams list
linear teams view TECH

Cycles (Sprints)

迭代周期(Sprints)

bash
linear cycles list --team TECH
linear cycles current --team TECH
linear cycles view <cycle-id>
linear cycles create --team TECH --starts-at 2024-01-01 --ends-at 2024-01-14
bash
linear cycles list --team TECH
linear cycles current --team TECH
linear cycles view <cycle-id>
linear cycles create --team TECH --starts-at 2024-01-01 --ends-at 2024-01-14

Labels

标签

bash
linear labels list
linear labels list --team TECH
linear labels create --name "bug" --color "#ff0000"
bash
linear labels list
linear labels list --team TECH
linear labels create --name "bug" --color "#ff0000"

Users

用户

bash
linear users list
linear users me
linear users view "User Name"
bash
linear users list
linear users me
linear users view "User Name"

Workflow States

工作流状态

bash
linear states list --team TECH
bash
linear states list --team TECH

Output Formats

输出格式

All commands support
--json
for machine-readable output:
bash
linear issues list --team TECH --json
Use
--no-color
to disable colored output.
所有命令均支持
--json
参数以生成机器可读的输出:
bash
linear issues list --team TECH --json
使用
--no-color
参数可禁用彩色输出。

Common Patterns

常用操作示例

Find my open issues

查看我的进行中问题

bash
linear issues list --assignee me --state "In Progress"
bash
linear issues list --assignee me --state "In Progress"

Create a bug report

创建Bug报告

bash
linear issues create --title "Bug: description" --team TECH --priority 2 --labels "bug"
bash
linear issues create --title "Bug: description" --team TECH --priority 2 --labels "bug"

Move issue to done

将问题标记为已完成

bash
linear issues update TECH-123 --state "Done"
bash
linear issues update TECH-123 --state "Done"

Get issue details as JSON for processing

以JSON格式获取问题详情用于后续处理

bash
linear issues view TECH-123 --json
bash
linear issues view TECH-123 --json

Check current sprint progress

查看当前迭代进度

bash
linear cycles current --team TECH
bash
linear cycles current --team TECH

Priority Levels

优先级等级

  • 0
    - No priority
  • 1
    - Urgent
  • 2
    - High
  • 3
    - Medium
  • 4
    - Low
  • 0
    - 无优先级
  • 1
    - 紧急
  • 2
    - 高
  • 3
    - 中
  • 4
    - 低

Tips for Agents

给Agent的提示

  1. Always check authentication first before running commands
  2. Use
    --json
    flag
    when you need to parse output programmatically
  3. Team is often required - ask the user or use
    linear teams list
    to find available teams
  4. Issue identifiers (like TECH-123) are preferred over UUIDs for readability
  5. Use
    me
    as assignee
    to refer to the authenticated user
  6. Workflow states vary by team - use
    linear states list --team <TEAM>
    to see valid states
  1. 运行命令前务必先检查认证状态
  2. 当需要以编程方式解析输出时,使用
    --json
    参数
  3. 通常需要指定团队 - 可询问用户或使用
    linear teams list
    命令查看可用团队
  4. 优先使用问题标识符(如TECH-123)而非UUID,可读性更强
  5. 使用
    me
    作为指派人
    代表已认证的当前用户
  6. 工作流状态因团队而异 - 使用
    linear states list --team <TEAM>
    命令查看该团队的有效状态