jira-cli
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseJira CLI
Jira CLI
Interact with Atlassian Jira from the command line using jira-cli.
使用jira-cli从命令行与Atlassian Jira进行交互。
When to Use
使用场景
- User asks to create, view, edit, or search Jira issues/tickets
- User needs to transition issues through workflow states (To Do → In Progress → Done)
- User wants to manage sprints, epics, or boards
- User needs to assign issues, add comments, or log work time
- User asks about their current tasks or sprint progress
- 用户要求创建、查看、编辑或搜索Jira问题/工单
- 用户需要将问题在工作流状态间流转(待办中 → 进行中 → 已完成)
- 用户想要管理Sprint、Epic或看板
- 用户需要分配问题、添加评论或记录工作时长
- 用户询问自己当前的任务或Sprint进展
Prerequisites
前置条件
- Install jira-cli: (macOS) or download from releases
brew install ankitpokhrel/jira-cli/jira-cli - Set API token:
export JIRA_API_TOKEN="your-token" - Initialize: and follow prompts
jira init
- 安装jira-cli:(macOS)或从发布页面下载
brew install ankitpokhrel/jira-cli/jira-cli - 设置API token:
export JIRA_API_TOKEN="your-token" - 初始化:并按照提示操作
jira init
Issue Commands
问题相关命令
List Issues
列出问题
bash
undefinedbash
undefinedList issues in current project
列出当前项目中的问题
jira issue list
jira issue list
List my assigned issues
列出分配给我的问题
jira issue list -a$(jira me)
jira issue list -a$(jira me)
List issues by status
按状态列出问题
jira issue list -s"In Progress"
jira issue list -s"In Progress"
List high priority issues
列出高优先级问题
jira issue list -yHigh
jira issue list -yHigh
List issues with multiple filters
使用多个筛选条件列出问题
jira issue list -a$(jira me) -s"To Do" -yHigh --created week
jira issue list -a$(jira me) -s"To Do" -yHigh --created week
List issues with raw JQL
使用原生JQL列出问题
jira issue list -q "project = PROJ AND status = 'In Progress'"
jira issue list -q "project = PROJ AND status = 'In Progress'"
Plain text output for scripting
输出纯文本用于脚本
jira issue list --plain --columns key,summary,status --no-headers
undefinedjira issue list --plain --columns key,summary,status --no-headers
undefinedCreate Issues
创建问题
bash
undefinedbash
undefinedInteractive issue creation
交互式创建问题
jira issue create
jira issue create
Create with all options specified
指定所有选项创建问题
jira issue create -tBug -s"Login button not working" -b"Description here" -yHigh --no-input
jira issue create -tBug -s"Login button not working" -b"Description here" -yHigh --no-input
Create a story
创建用户故事
jira issue create -tStory -s"Add user authentication" -yMedium
jira issue create -tStory -s"Add user authentication" -yMedium
Create with labels and components
创建带标签和组件的问题
jira issue create -tTask -s"Update dependencies" -lmaintenance -l"tech-debt" -Cbackend
jira issue create -tTask -s"Update dependencies" -lmaintenance -l"tech-debt" -Cbackend
Create and assign to self
创建并分配给自己
jira issue create -tBug -s"Fix crash on startup" -a$(jira me) --no-input
undefinedjira issue create -tBug -s"Fix crash on startup" -a$(jira me) --no-input
undefinedView Issues
查看问题
bash
undefinedbash
undefinedView issue details
查看问题详情
jira issue view ISSUE-123
jira issue view ISSUE-123
View with comments
查看问题及评论
jira issue view ISSUE-123 --comments 10
jira issue view ISSUE-123 --comments 10
View in plain text
以纯文本格式查看
jira issue view ISSUE-123 --plain
jira issue view ISSUE-123 --plain
Open issue in browser
在浏览器中打开问题
jira open ISSUE-123
undefinedjira open ISSUE-123
undefinedEdit Issues
编辑问题
bash
undefinedbash
undefinedEdit summary
编辑摘要
jira issue edit ISSUE-123 -s"Updated summary"
jira issue edit ISSUE-123 -s"Updated summary"
Edit description
编辑描述
jira issue edit ISSUE-123 -b"New description"
jira issue edit ISSUE-123 -b"New description"
Edit priority
编辑优先级
jira issue edit ISSUE-123 -yHigh
jira issue edit ISSUE-123 -yHigh
Add labels
添加标签
jira issue edit ISSUE-123 -lnew-label
undefinedjira issue edit ISSUE-123 -lnew-label
undefinedTransition Issues
流转问题
bash
undefinedbash
undefinedMove issue to a new status
将问题移动到新状态
jira issue move ISSUE-123 "In Progress"
jira issue move ISSUE-123 "In Progress"
Move with comment
带评论流转问题
jira issue move ISSUE-123 "Done" --comment "Completed the task"
jira issue move ISSUE-123 "Done" --comment "Completed the task"
Move and set resolution
流转并设置解决结果
jira issue move ISSUE-123 "Done" -RFixed
undefinedjira issue move ISSUE-123 "Done" -RFixed
undefinedAssign Issues
分配问题
bash
undefinedbash
undefinedAssign to self
分配给自己
jira issue assign ISSUE-123 $(jira me)
jira issue assign ISSUE-123 $(jira me)
Assign to specific user
分配给特定用户
jira issue assign ISSUE-123 username
jira issue assign ISSUE-123 username
Unassign
取消分配
jira issue assign ISSUE-123 x
undefinedjira issue assign ISSUE-123 x
undefinedComments
评论
bash
undefinedbash
undefinedAdd a comment
添加评论
jira issue comment add ISSUE-123 "This is my comment"
jira issue comment add ISSUE-123 "This is my comment"
Add comment from editor
从编辑器添加评论
jira issue comment add ISSUE-123
undefinedjira issue comment add ISSUE-123
undefinedWork Logging
工作时长记录
bash
undefinedbash
undefinedLog time
记录工作时长
jira issue worklog add ISSUE-123 "2h 30m"
jira issue worklog add ISSUE-123 "2h 30m"
Log time with comment
带评论记录工作时长
jira issue worklog add ISSUE-123 "1d 4h" --comment "Completed feature implementation" --no-input
undefinedjira issue worklog add ISSUE-123 "1d 4h" --comment "Completed feature implementation" --no-input
undefinedLink & Clone Issues
关联与克隆问题
bash
undefinedbash
undefinedLink two issues
关联两个问题
jira issue link ISSUE-123 ISSUE-456 Blocks
jira issue link ISSUE-123 ISSUE-456 Blocks
Unlink issues
取消问题关联
jira issue unlink ISSUE-123 ISSUE-456
jira issue unlink ISSUE-123 ISSUE-456
Clone an issue
克隆问题
jira issue clone ISSUE-123 -s"Cloned: New summary"
jira issue clone ISSUE-123 -s"Cloned: New summary"
Delete an issue
删除问题
jira issue delete ISSUE-123
undefinedjira issue delete ISSUE-123
undefinedEpic Commands
Epic相关命令
bash
undefinedbash
undefinedList epics
列出Epic
jira epic list
jira epic list
List epics in table format
以表格格式列出Epic
jira epic list --table
jira epic list --table
Create an epic
创建Epic
jira epic create -n"Q1 Features" -s"Epic summary" -b"Epic description"
jira epic create -n"Q1 Features" -s"Epic summary" -b"Epic description"
Add issues to epic
向Epic添加问题
jira epic add EPIC-1 ISSUE-123 ISSUE-456
jira epic add EPIC-1 ISSUE-123 ISSUE-456
Remove issues from epic
从Epic移除问题
jira epic remove ISSUE-123 ISSUE-456
undefinedjira epic remove ISSUE-123 ISSUE-456
undefinedSprint Commands
Sprint相关命令
bash
undefinedbash
undefinedList sprints
列出Sprint
jira sprint list
jira sprint list
List current/active sprint
列出当前/活跃Sprint
jira sprint list --current
jira sprint list --current
List my issues in current sprint
列出当前Sprint中分配给我的问题
jira sprint list --current -a$(jira me)
jira sprint list --current -a$(jira me)
Add issues to sprint
向Sprint添加问题
jira sprint add SPRINT_ID ISSUE-123 ISSUE-456
undefinedjira sprint add SPRINT_ID ISSUE-123 ISSUE-456
undefinedProject & Board Commands
项目与看板相关命令
bash
undefinedbash
undefinedList projects
列出项目
jira project list
jira project list
List boards
列出看板
jira board list
jira board list
List releases/versions
列出发布/版本
jira release list
jira release list
Open project in browser
在浏览器中打开项目
jira open
undefinedjira open
undefinedUtility Commands
实用命令
bash
undefinedbash
undefinedGet current username
获取当前用户名
jira me
jira me
Show help
显示帮助
jira --help
jira issue --help
jira --help
jira issue --help
Setup shell completion
设置Shell自动补全
jira completion bash # or zsh, fish, powershell
undefinedjira completion bash # 或zsh, fish, powershell
undefinedCommon Flags
常用标志
| Flag | Description |
|---|---|
| Plain text output (no interactive UI) |
| Raw JSON output |
| CSV output |
| Skip interactive prompts |
| Issue type (Bug, Story, Task, Epic) |
| Issue summary/title |
| Issue description |
| Priority (Highest, High, Medium, Low, Lowest) |
| Labels (repeatable) |
| Assignee username |
| Reporter username |
| Component name |
| Parent issue/epic key |
| Raw JQL query |
| Filter by creation date (-7d, week, month) |
| Sort field |
| Reverse sort order |
| 标志 | 描述 |
|---|---|
| 纯文本输出(无交互式UI) |
| 原始JSON输出 |
| CSV格式输出 |
| 跳过交互式提示 |
| 问题类型(Bug, Story, Task, Epic) |
| 问题摘要/标题 |
| 问题描述 |
| 优先级(Highest, High, Medium, Low, Lowest) |
| 标签(可重复使用) |
| 经办人用户名 |
| 报告人用户名 |
| 组件名称 |
| 父问题/Epic的键 |
| 原生JQL查询 |
| 按创建日期筛选(-7d, week, month) |
| 排序字段 |
| 反转排序顺序 |
Common Workflows
常见工作流
Start Working on an Issue
开始处理问题
bash
undefinedbash
undefinedAssign to self and move to In Progress
分配给自己并移至“进行中”状态
jira issue assign ISSUE-123 $(jira me)
jira issue move ISSUE-123 "In Progress"
undefinedjira issue assign ISSUE-123 $(jira me)
jira issue move ISSUE-123 "In Progress"
undefinedComplete an Issue
完成问题
bash
undefinedbash
undefinedLog work and close
记录工作时长并关闭问题
jira issue worklog add ISSUE-123 "4h" --no-input
jira issue move ISSUE-123 "Done" --comment "Completed" -RFixed
undefinedjira issue worklog add ISSUE-123 "4h" --no-input
jira issue move ISSUE-123 "Done" --comment "Completed" -RFixed
undefinedDaily Standup Review
每日站会回顾
bash
undefinedbash
undefinedView my current sprint tasks
查看当前Sprint中分配给我的任务
jira sprint list --current -a$(jira me)
undefinedjira sprint list --current -a$(jira me)
undefinedCreate and Track a Bug
创建并跟踪Bug
bash
undefinedbash
undefinedCreate bug
创建Bug
jira issue create -tBug -s"App crashes on login" -yHigh -lbug --no-input
jira issue create -tBug -s"App crashes on login" -yHigh -lbug --no-input
Note the returned issue key, then assign
记录返回的问题键,然后分配给自己
jira issue assign BUG-123 $(jira me)
jira issue move BUG-123 "In Progress"
undefinedjira issue assign BUG-123 $(jira me)
jira issue move BUG-123 "In Progress"
undefinedOutput Examples
输出示例
| Command | Use Case |
|---|---|
| Script-friendly output |
| JSON for parsing |
| Export to spreadsheet |
| 命令 | 使用场景 |
|---|---|
| 适合脚本的输出格式 |
| 用于解析的JSON格式 |
| 导出至电子表格 |
Limitations
限制
- Requires prior configuration
jira init - Some features may vary between Jira Cloud and Server
- Complex custom fields may require flag with field IDs
--custom - Rate limits apply based on Jira instance configuration
- 需要先完成配置
jira init - Jira Cloud与Server之间部分功能可能存在差异
- 复杂自定义字段可能需要配合标志和字段ID使用
--custom - 速率限制取决于Jira实例的配置