atlassian

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Atlassian CLI (acli) Skill

Atlassian CLI (acli) 技能

Use
acli
(installed at
/opt/homebrew/bin/acli
) to interact with Jira and Confluence from the terminal.
使用安装在
/opt/homebrew/bin/acli
acli
工具在终端中与 Jira 和 Confluence 交互。

Authentication

认证

Check auth status before running any commands if uncertain:
bash
acli jira auth status
acli confluence auth status
If not authenticated:
bash
undefined
如果不确定权限状态,运行任何命令前先检查认证状态:
bash
acli jira auth status
acli confluence auth status
如果未完成认证:
bash
undefined

With API token (recommended for scripting)

使用API token(脚本场景推荐)

echo <token> | acli jira auth login --site "yoursite.atlassian.net" --email "you@example.com" --token
echo <token> | acli jira auth login --site "yoursite.atlassian.net" --email "you@example.com" --token

With browser OAuth

使用浏览器OAuth

acli jira auth login --web

---
acli jira auth login --web

---

Jira

Jira

View & Search Work Items

查看与搜索工作项

bash
undefined
bash
undefined

View a single issue

查看单个issue

acli jira workitem view KEY-123 acli jira workitem view KEY-123 --json # structured output acli jira workitem view KEY-123 --fields "summary,status,comment,description"
acli jira workitem view KEY-123 acli jira workitem view KEY-123 --json # 结构化输出 acli jira workitem view KEY-123 --fields "summary,status,comment,description"

Search with JQL

使用JQL搜索

acli jira workitem search --jql "assignee = currentUser() AND sprint in openSprints()" acli jira workitem search --jql "project = PROJ AND status = 'In Progress'" --fields "key,summary,status,assignee" acli jira workitem search --jql "..." --json acli jira workitem search --jql "..." --csv # for reports acli jira workitem search --jql "..." --paginate # fetch all results acli jira workitem search --jql "..." --count # count only acli jira workitem search --jql "..." --limit 50

See `references/jql-patterns.md` for common JQL patterns for developers.
acli jira workitem search --jql "assignee = currentUser() AND sprint in openSprints()" acli jira workitem search --jql "project = PROJ AND status = 'In Progress'" --fields "key,summary,status,assignee" acli jira workitem search --jql "..." --json acli jira workitem search --jql "..." --csv # 用于生成报告 acli jira workitem search --jql "..." --paginate # 拉取全部结果 acli jira workitem search --jql "..." --count # 仅返回数量 acli jira workitem search --jql "..." --limit 50

开发者可查看 `references/jql-patterns.md` 了解常用JQL模式。

Create Work Items

创建工作项

bash
undefined
bash
undefined

Quick create

快速创建

acli jira workitem create --summary "Fix login bug" --project "PROJ" --type "Bug"
acli jira workitem create --summary "Fix login bug" --project "PROJ" --type "Bug"

With details

带详细信息创建

acli jira workitem create
--summary "Add retry logic"
--project "PROJ"
--type "Task"
--description "Implement exponential backoff for API calls"
--assignee "@me"
--label "backend,reliability"
acli jira workitem create
--summary "Add retry logic"
--project "PROJ"
--type "Task"
--description "Implement exponential backoff for API calls"
--assignee "@me"
--label "backend,reliability"

From JSON (use --generate-json to get template first)

从JSON创建(可先使用--generate-json获取模板)

acli jira workitem create --generate-json > workitem.json
acli jira workitem create --generate-json > workitem.json

edit workitem.json, then:

编辑workitem.json后执行:

acli jira workitem create --from-json workitem.json --project "PROJ" --type "Task"
acli jira workitem create --from-json workitem.json --project "PROJ" --type "Task"

Bulk create

批量创建

acli jira workitem create-bulk --from-json bulk-workitems.json
undefined
acli jira workitem create-bulk --from-json bulk-workitems.json
undefined

Edit Work Items

编辑工作项

bash
undefined
bash
undefined

Edit single issue

编辑单个issue

acli jira workitem edit --key "KEY-123" --summary "Updated summary" acli jira workitem edit --key "KEY-123" --description "New description" --yes
acli jira workitem edit --key "KEY-123" --summary "Updated summary" acli jira workitem edit --key "KEY-123" --description "New description" --yes

Bulk edit via key list

通过key列表批量编辑

acli jira workitem edit --key "KEY-1,KEY-2,KEY-3" --assignee "@me" --yes
acli jira workitem edit --key "KEY-1,KEY-2,KEY-3" --assignee "@me" --yes

Bulk edit via JQL

通过JQL批量编辑

acli jira workitem edit --jql "project = PROJ AND status = 'To Do' AND assignee is EMPTY"
--assignee "dev@company.com" --yes --ignore-errors
acli jira workitem edit --jql "project = PROJ AND status = 'To Do' AND assignee is EMPTY"
--assignee "dev@company.com" --yes --ignore-errors

Add/remove labels

添加/移除标签

acli jira workitem edit --key "KEY-123" --labels "frontend,urgent" acli jira workitem edit --key "KEY-123" --remove-labels "old-label"
undefined
acli jira workitem edit --key "KEY-123" --labels "frontend,urgent" acli jira workitem edit --key "KEY-123" --remove-labels "old-label"
undefined

Transition Work Items (Change Status)

工作项状态流转(修改状态)

bash
undefined
bash
undefined

Single transition

单个流转

acli jira workitem transition --key "KEY-123" --status "In Progress" acli jira workitem transition --key "KEY-123" --status "Done" --yes
acli jira workitem transition --key "KEY-123" --status "In Progress" acli jira workitem transition --key "KEY-123" --status "Done" --yes

Bulk transition via key list

通过key列表批量流转

acli jira workitem transition --key "KEY-1,KEY-2,KEY-3" --status "Done" --yes
acli jira workitem transition --key "KEY-1,KEY-2,KEY-3" --status "Done" --yes

Bulk transition via JQL

通过JQL批量流转

acli jira workitem transition
--jql "project = PROJ AND sprint in openSprints() AND status = 'In Review'"
--status "Done" --yes --ignore-errors

Common status values: `"To Do"`, `"In Progress"`, `"In Review"`, `"Done"` (exact names depend on project workflow).
acli jira workitem transition
--jql "project = PROJ AND sprint in openSprints() AND status = 'In Review'"
--status "Done" --yes --ignore-errors

常用状态值:`"To Do"`、`"In Progress"`、`"In Review"`、`"Done"`(具体名称取决于项目工作流配置)。

Assign Work Items

指派工作项

bash
acli jira workitem assign --key "KEY-123" --assignee "@me"
acli jira workitem assign --key "KEY-123" --assignee "user@company.com"
bash
acli jira workitem assign --key "KEY-123" --assignee "@me"
acli jira workitem assign --key "KEY-123" --assignee "user@company.com"

Bulk assign via JQL

通过JQL批量指派

acli jira workitem assign
--jql "project = PROJ AND sprint in openSprints() AND assignee is EMPTY"
--assignee "@me" --yes
acli jira workitem assign
--jql "project = PROJ AND sprint in openSprints() AND assignee is EMPTY"
--assignee "@me" --yes

Remove assignee

移除指派人

acli jira workitem assign --key "KEY-123" --remove-assignee
undefined
acli jira workitem assign --key "KEY-123" --remove-assignee
undefined

Comments

评论

bash
undefined
bash
undefined

List comments

列出评论

acli jira workitem comment list --key "KEY-123"
acli jira workitem comment list --key "KEY-123"

Add comment

添加评论

acli jira workitem comment create --key "KEY-123" --body "Fixed in commit abc123"
acli jira workitem comment create --key "KEY-123" --body "Fixed in commit abc123"

Update comment

更新评论

acli jira workitem comment update --key "KEY-123" --comment-id <id> --body "Updated note"
acli jira workitem comment update --key "KEY-123" --comment-id <id> --body "Updated note"

Delete comment

删除评论

acli jira workitem comment delete --key "KEY-123" --comment-id <id>
undefined
acli jira workitem comment delete --key "KEY-123" --comment-id <id>
undefined

Sprints

迭代(Sprint)

bash
undefined
bash
undefined

View sprint details

查看迭代详情

acli jira sprint view <sprint-id>
acli jira sprint view <sprint-id>

List all work items in a sprint

列出迭代内所有工作项

acli jira sprint list-workitems <sprint-id>
acli jira sprint list-workitems <sprint-id>

List sprints on a board

列出看板下的所有迭代

acli jira board list-sprints <board-id>
acli jira board list-sprints <board-id>

Create sprint

创建迭代

acli jira sprint create --name "Sprint 10" --board <board-id>
undefined
acli jira sprint create --name "Sprint 10" --board <board-id>
undefined

Boards

看板(Board)

bash
undefined
bash
undefined

Search boards

搜索看板

acli jira board search --name "My Team Board"
acli jira board search --name "My Team Board"

Get board details

获取看板详情

acli jira board get <board-id>
acli jira board get <board-id>

List sprints on a board

列出看板下的所有迭代

acli jira board list-sprints <board-id>
acli jira board list-sprints <board-id>

List projects on a board

列出看板关联的项目

acli jira board list-projects <board-id>
undefined
acli jira board list-projects <board-id>
undefined

Projects

项目

bash
acli jira project list --paginate          # --paginate is required (or use --limit N or --recent)
acli jira project view --project "PROJ"
acli jira project create --name "New Project" --key "NP" --type "scrum"

bash
acli jira project list --paginate          # 必须加--paginate参数(也可使用--limit N或--recent)
acli jira project view --project "PROJ"
acli jira project create --name "New Project" --key "NP" --type "scrum"

Confluence

Confluence

Pages

页面

bash
undefined
bash
undefined

View a page (need page ID or URL)

查看页面(需要页面ID或URL)

acli confluence page view <page-id> acli confluence page view <page-id> --json
undefined
acli confluence page view <page-id> acli confluence page view <page-id> --json
undefined

Spaces

空间

bash
undefined
bash
undefined

List all spaces

列出所有空间

acli confluence space list
acli confluence space list

View space details

查看空间详情

acli confluence space view --key "MYSPACE"
acli confluence space view --key "MYSPACE"

Create a space

创建空间

acli confluence space create --name "Engineering Docs" --key "ENGDOCS"
acli confluence space create --name "Engineering Docs" --key "ENGDOCS"

Update space

更新空间

acli confluence space update --key "MYSPACE" --name "New Name" --description "Updated desc"
acli confluence space update --key "MYSPACE" --name "New Name" --description "Updated desc"

Archive / restore space

归档/恢复空间

acli confluence space archive --key "OLDSPACE" acli confluence space restore --key "OLDSPACE"
undefined
acli confluence space archive --key "OLDSPACE" acli confluence space restore --key "OLDSPACE"
undefined

Blogs

博客

bash
acli confluence blog --help   # check available subcommands for blogs

bash
acli confluence blog --help   # 查看博客相关可用子命令

Practical Workflows

实用工作流

Daily Standup

每日站会

bash
undefined
bash
undefined

What am I working on?

查看我当前的工作项

acli jira workitem search
--jql "assignee = currentUser() AND sprint in openSprints() AND status != Done"
--fields "key,summary,status"
undefined
acli jira workitem search
--jql "assignee = currentUser() AND sprint in openSprints() AND status != Done"
--fields "key,summary,status"
undefined

Start Working on an Issue

开始处理一个Issue

bash
acli jira workitem transition --key "KEY-123" --status "In Progress" --yes
acli jira workitem assign --key "KEY-123" --assignee "@me"
bash
acli jira workitem transition --key "KEY-123" --status "In Progress" --yes
acli jira workitem assign --key "KEY-123" --assignee "@me"

End of Day / Mark Done

当日收尾/标记完成

bash
acli jira workitem transition --key "KEY-123" --status "Done" --yes
acli jira workitem comment create --key "KEY-123" --body "Completed. PR: #456"
bash
acli jira workitem transition --key "KEY-123" --status "Done" --yes
acli jira workitem comment create --key "KEY-123" --body "Completed. PR: #456"

Bulk Close Sprint Items (when sprint ends)

批量关闭迭代工作项(迭代结束时)

bash
acli jira workitem transition \
  --jql "sprint in openSprints() AND status = 'In Review' AND assignee = currentUser()" \
  --status "Done" --yes --ignore-errors
bash
acli jira workitem transition \
  --jql "sprint in openSprints() AND status = 'In Review' AND assignee = currentUser()" \
  --status "Done" --yes --ignore-errors

Find Unassigned Bugs in Open Sprints

查找开放迭代中未指派的Bug

bash
acli jira workitem search \
  --jql "issuetype = Bug AND sprint in openSprints() AND assignee is EMPTY" \
  --fields "key,summary,priority,status"

bash
acli jira workitem search \
  --jql "issuetype = Bug AND sprint in openSprints() AND assignee is EMPTY" \
  --fields "key,summary,priority,status"

Output Tips

输出提示

  • Use
    --json
    when you need to parse output or pass to other commands
  • Use
    --csv
    for tabular data / reports
  • Use
    --yes
    to skip confirmation prompts in bulk operations
  • Use
    --ignore-errors
    in bulk ops so one failure doesn't stop the rest
  • Use
    --paginate
    when expecting more results than the default limit
  • 如果你需要解析输出或者传递给其他命令,使用
    --json
    参数
  • 表格数据/报告场景使用
    --csv
    参数
  • 批量操作时使用
    --yes
    跳过确认提示
  • 批量操作中使用
    --ignore-errors
    避免单个失败中断整个任务
  • 当预期返回结果超过默认限制时,使用
    --paginate
    参数