线性管理器
如今,即使使用线性MCP也会减慢您的工作速度。这是一个简单快速的解决方案,这样维护门票就不会让你分心。
LinearManager支持拉式和推式操作:
- 拉:将问题从Linear下载到本地YAML文件
- 推:将本地YAML文件上传到Linear以创建/更新问题
入门指南
uv venv --python 3.11
. .venv/bin/activate
uv pip install -e .CLI需要在中使用Linear个人API令牌 LINEAR_API_KEY.
全局安装
uv tool 可以安装 manager CLI全局可用,因此无需激活virtualenv即可在PATH上使用。
# Install from a local checkout
uv tool install --from . manager
# Or install directly from GitHub
uv tool install --from git+https://github.com/your-username/LinearManager manager安装后,您可以运行 manager ... 从您机器上的任何地方。
清单格式
为要同步的每个问题创建一个YAML文件。每个文件都包含一个平面问题:
team_key: ENG
title: Fix webhook retries
description: |
Make sure failed webhooks retry with exponential backoff.
state: Triage
priority: 1
labels: ["Infra", "Automation"]
assignee_email: engineer@example.com
branch: feature/webhook-retries或者通过指定其标识符来更新现有问题:
team_key: ENG
identifier: ENG-123
title: Fix webhook retries - UPDATED
description: |
Make sure failed webhooks retry with exponential backoff.
Added additional context here.
priority: 2关键字段:
team_key(必填)选择线性团队title(必填)是发行标题identifier是可选的;出现时,CLI会更新现有问题,而不是创建新问题state设置线性工作流状态(例如,“待办”、“进行中”、“完成”)labels,assignee_email,priority是可选字段branch是跟踪本地开发上下文的可选助手
设置问题状态
使用 state 要在“线性”中设置工作流状态,请执行以下操作:
team_key: ENG
identifier: ENG-123
title: Fix critical bug
description: Bug has been resolved
state: Done # Sets the issue to "Done" state in Linear工作流状态示例:
team_key: ENG
identifier: ENG-124
title: Work in progress
description: Currently implementing
state: In Progress # Sets the issue to "In Progress" state拉和推操作
LinearManager提供这两种功能 拉 和 推 操作以完全控制您的线性票。
从线性拉动
从Linear下载问题并将其保存为本地YAML文件:
# Pull issues from a specific team
manager pull --team-keys ENG --output ./pulled_issues
# Pull issues from multiple teams
manager pull --team-keys ENG PROD --output ./remote_issues
# Pull to the default LinearManager/tasks directory
manager pull --team-keys ENG
# Limit the number of issues fetched per team (default is 100)
manager pull --team-keys ENG --limit 50选项:
--team-keys/-t(必填):一个或多个团队密钥,用于从中提取问题--output/-o:保存YAML文件的目录(默认为LinearManager/tasks)--limit:每个团队可获取的最大问题数(默认值:100)
pull命令:
- 从Linear为指定团队下载问题
- 为每个团队创建一个YAML文件(例如。,
eng_issues.yaml) - 包括所有问题元数据:标识符、标题、描述、状态、优先级、受让人、标签和分支机构名称
- 只读-不会将任何本地更改推送到Linear
推到线性
将本地YAML文件上传到Linear以创建或更新问题:
# Push all YAML files in current directory to Linear
manager push .
# Push all YAML files in a specific directory
manager push path/to/manifests
# Push a single file
manager push path/to/issues.yaml
# Preview changes without pushing
manager push . --dry-run常见工作流
备份线性问题:
# Pull all issues from your teams for backup
manager pull --team-keys ENG PROD DESIGN --output ./backups/$(date +%Y%m%d)更新本地副本,然后推送更改:
# 1. Pull latest issues from Linear
manager pull --team-keys ENG --output ./tasks
# 2. Edit the YAML files locally
# ... make your changes ...
# 3. Push changes back to Linear
manager push ./tasks在团队之间迁移问题:
# 1. Pull from source team
manager pull --team-keys OLD_TEAM --output ./migration
# 2. Edit YAML to change team_key
# ... update team_key in files ...
# 3. Push to new team
manager push ./migration备注:我们计划与 段落 用于增强并行处理和工作流自动化。
