jira-cli について
コマンドラインで Jira の課題を管理し、スプリント作業を確認するためのスキルです。課題の操作に加え、エピック、スプリント、ボード、作業時間の記録にも対応します。
主な機能
- 01課題の作成、表示、編集、検索
- 02課題の遷移と担当者の割り当て
- 03コメント追加と作業時間の記録
- 04エピック、スプリント、ボードの管理
- 05テキスト、JSON、CSV での出力
活用シーン
- 01アクティブなスプリントで自分の課題を確認
- 02バグを作成し、ワークフローを進める
- 03作業時間を記録して完了した課題を終了
インストール
コマンドをコピーしてターミナルで実行します。
$
npx skills add https:/ / github.com/ code-and-sorts/ awesome-copilot-agents --skill jira-cliインストール後、Claude Code で/jira-cliを入力して読み込まれたか確認します。
詳細
Jira CLI
jira-cliを使用して、コマンドラインからAtlassian Jiraを操作します。
使用する場面
- Jiraの課題/チケットの作成、表示、編集、検索を依頼された場合
- 課題をワークフローの状態(To Do → In Progress → Done)に遷移させる必要がある場合
- スプリント、エピック、ボードを管理したい場合
- 課題の担当者設定、コメントの追加、作業時間の記録が必要な場合
- 現在のタスクやスプリントの進捗について質問された場合
前提条件
- jira-cliをインストールします:
brew install ankitpokhrel/jira-cli/jira-cli(macOS)またはリリースからダウンロードします - APIトークンを設定します:
export JIRA_API_TOKEN="your-token" - 初期設定を行います:
jira initを実行し、プロンプトに従います
課題コマンド
課題の一覧表示
# List issues in current project
jira issue list
# List my assigned issues
jira issue list -a$(jira me)
# List issues by status
jira issue list -s"In Progress"
# List high priority issues
jira issue list -yHigh
# List issues with multiple filters
jira issue list -a$(jira me) -s"To Do" -yHigh --created week
# List issues with raw JQL
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
課題の作成
# Interactive issue creation
jira issue create
# Create with all options specified
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
# Create with labels and components
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
課題の表示
# View issue details
jira issue view ISSUE-123
# View with comments
jira issue view ISSUE-123 --comments 10
# View in plain text
jira issue view ISSUE-123 --plain
# Open issue in browser
jira open ISSUE-123
課題の編集
# Edit summary
jira issue edit ISSUE-123 -s"Updated summary"
# Edit description
jira issue edit ISSUE-123 -b"New description"
# Edit priority
jira issue edit ISSUE-123 -yHigh
# Add labels
jira issue edit ISSUE-123 -lnew-label
課題の遷移
# Move issue to a new status
jira issue move ISSUE-123 "In Progress"
# Move with comment
jira issue move ISSUE-123 "Done" --comment "Completed the task"
# Move and set resolution
jira issue move ISSUE-123 "Done" -RFixed
課題の割り当て
# Assign to self
jira issue assign ISSUE-123 $(jira me)
# Assign to specific user
jira issue assign ISSUE-123 username
# Unassign
jira issue assign ISSUE-123 x
コメント
# Add a comment
jira issue comment add ISSUE-123 "This is my comment"
# Add comment from editor
jira issue comment add ISSUE-123
作業時間の記録
# Log time
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
課題のリンクと複製
# Link two issues
jira issue link ISSUE-123 ISSUE-456 Blocks
# Unlink issues
jira issue unlink ISSUE-123 ISSUE-456
# Clone an issue
jira issue clone ISSUE-123 -s"Cloned: New summary"
# Delete an issue
jira issue delete ISSUE-123
エピックコマンド
# List epics
jira epic list
# List epics in table format
jira epic list --table
# Create an epic
jira epic create -n"Q1 Features" -s"Epic summary" -b"Epic description"
# Add issues to epic
jira epic add EPIC-1 ISSUE-123 ISSUE-456
# Remove issues from epic
jira epic remove ISSUE-123 ISSUE-456
スプリントコマンド
# List sprints
jira sprint list
# List current/active sprint
jira sprint list --current
# List my issues in current sprint
jira sprint list --current -a$(jira me)
# Add issues to sprint
jira sprint add SPRINT_ID ISSUE-123 ISSUE-456
プロジェクトとボードのコマンド
# List projects
jira project list
# List boards
jira board list
# List releases/versions
jira release list
# Open project in browser
jira open
ユーティリティコマンド
# Get current username
jira me
# Show help
jira --help
jira issue --help
# Setup shell completion
jira completion bash # or zsh, fish, powershell
よく使うフラグ
| フラグ | 説明 |
|---|---|
--plain | プレーンテキストで出力します(インタラクティブUIなし) |
--raw | JSON形式で出力します |
--csv | CSV形式で出力します |
--no-input | インタラクティブなプロンプトをスキップします |
-t, --type | 課題タイプ(Bug、Story、Task、Epic) |
-s, --summary | 課題の要約/タイトル |
-b, --body | 課題の説明 |
-y, --priority | 優先度(Highest、High、Medium、Low、Lowest) |
-l, --label | ラベル(複数指定可能) |
-a, --assignee | 担当者のユーザー名 |
-r, --reporter | 報告者のユーザー名 |
-C, --component | コンポーネント名 |
-P, --parent | 親課題/エピックキー |
-q, --jql | JQLクエリを直接指定します |
--created | 作成日で絞り込みます(-7d、week、month) |
--order-by | 並べ替えに使うフィールド |
--reverse | 並べ替え順を逆にします |
よく使うワークフロー
課題の作業を開始する
# Assign to self and move to In Progress
jira issue assign ISSUE-123 $(jira me)
jira issue move ISSUE-123 "In Progress"
課題を完了する
# Log work and close
jira issue worklog add ISSUE-123 "4h" --no-input
jira issue move ISSUE-123 "Done" --comment "Completed" -RFixed
毎日のスタンドアップでの確認
# View my current sprint tasks
jira sprint list --current -a$(jira me)
バグを作成して追跡する
# Create bug
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"
出力例
| コマンド | 使用例 |
|---|---|
jira issue list --plain | スクリプトで扱いやすい出力 |
jira issue list --raw | 解析用のJSON |
jira issue list --csv | スプレッドシートへのエクスポート |
制限事項
- 事前に
jira initで設定しておく必要があります - 一部の機能はJira CloudとServerで異なる場合があります
- 複雑なカスタムフィールドでは、フィールドIDを指定した
--customフラグが必要になる場合があります - Jiraインスタンスの設定に応じてレート制限が適用されます
コメント
Markdown 対応