# bee
bee is a command-line tool for interacting with [Backlog](https://backlog.com/) project management.
It supports issue tracking, pull requests, wikis, notifications, and project administration.
Authenticate with `bee auth login`, then set `BACKLOG_PROJECT` to target a project.
# はじめに
import { Tabs, TabItem, Steps, LinkCard } from "@astrojs/starlight/components";
bee は、[Backlog](https://backlog.com/) をターミナルから操作するためのコマンドラインツールです。課題の管理、プルリクエスト、ドキュメント、通知など、Backlog の主要な機能をコマンドラインから利用できます。
## 前提条件
- **Node.js 20.18** 以上
Node.js のバージョンを確認するには、以下のコマンドを実行します。
```sh
node --version
```
## インストール
```sh
npm install -g @nulab/bee
```
```sh
pnpm add -g @nulab/bee
```
```sh
bun add -g @nulab/bee
```
```sh
npx nypm install -g @nulab/bee
```
バージョンを確認してインストールが成功したことを確認します。
```sh
bee --version
```
## クイックスタート
1. **ログイン**
Backlog スペースにログインします。対話形式でスペースのホスト名と API キーの入力を求められます。
```sh
bee auth login
```
:::tip
API キーは Backlog の **個人設定 > API** から発行できます。詳しくは[認証ガイド](/bee/guides/authentication/)を参照してください。
:::
2. **課題を一覧表示する**
プロジェクトの課題を一覧表示してみましょう。`YOUR_PROJECT` の部分は、Backlog のプロジェクト設定で確認できるプロジェクトキー(例: `MY_PROJECT`、`FRONTEND`)に置き換えてください。
```sh
bee issue list --project YOUR_PROJECT
```
3. **課題を作成する**
対話形式で新しい課題を作成します。プロジェクト、課題種別、優先度などを順番に選択できます。
```sh
bee issue create
```
フラグを指定して非対話的に作成することもできます。
```sh
bee issue create --summary "最初の課題" --issue-type Bug --priority High
```
## アンインストール
インストール時に使用したパッケージマネージャに合わせてアンインストールしてください。
```sh
npm uninstall -g @nulab/bee
```
```sh
pnpm remove -g @nulab/bee
```
```sh
bun remove -g @nulab/bee
```
```sh
npx nypm uninstall -g @nulab/bee
```
## 次のステップ
# 認証
import { Card, LinkCard, CardGrid, Tabs, TabItem } from "@astrojs/starlight/components";
bee は 2 つの認証方式をサポートしています。
## API キー認証
もっともシンプルな認証方式です。Backlog の個人設定から API キーを発行して使用します。
```sh
bee auth login
```
対話形式でスペースのホスト名(例: `xxx.backlog.com`)と API キーの入力を求められます。API キーは Backlog の **個人設定 > API** から発行できます。
:::tip
`BACKLOG_API_KEY` と `BACKLOG_SPACE` 環境変数を設定しておけば、`bee auth login` を実行しなくても認証済みの状態で bee を使えます。
:::
```sh
export BACKLOG_API_KEY=your-api-key
export BACKLOG_SPACE=xxx.backlog.com
bee issue list --project MY_PROJECT
```
### パイプで API キーを渡す
`--with-token` フラグを使うと、標準入力から API キーを渡せます。セットアップスクリプトや CI 環境で便利です。
```sh
# ファイルから読み込む(シェル履歴に残らない)
bee auth login --with-token < ~/.backlog-api-key
# 環境変数から渡す
echo "$BACKLOG_API_KEY" | BACKLOG_SPACE=xxx.backlog.com bee auth login --with-token
```
:::caution
`echo 'your-api-key'` のようにリテラルで API キーを渡すと、シェル履歴に残ります。ファイルや環境変数から渡すようにしてください。
:::
## OAuth 認証
OAuth を使うと、API キーを直接扱わずに認証できます。
### OAuth クライアントの登録
事前に Backlog で OAuth クライアントを登録する必要があります。
1. Backlog のスペース設定を開きます
2. **スペース設定 > OAuth アプリケーション** に移動します
3. 「新しいアプリケーションを登録」をクリックします
4. 以下を入力して登録します
- **名前**: 任意(例: `bee`)
- **リダイレクト URI**: `http://localhost:5033/callback`
5. 登録後に表示される **Client ID** と **Client Secret** をメモします
:::tip
ポート `5033` が他のアプリケーションと競合する場合は、環境変数 `BACKLOG_OAUTH_PORT` で変更できます。リダイレクト URI も合わせて変更してください。
:::
### ログイン
```sh
bee auth login --method oauth
```
ブラウザが開き、Backlog の認証画面が表示されます。承認するとトークンが自動的に取得されます。
事前に環境変数 `BACKLOG_OAUTH_CLIENT_ID` と `BACKLOG_OAUTH_CLIENT_SECRET` を設定してください。
```sh
export BACKLOG_OAUTH_CLIENT_ID=YOUR_ID
export BACKLOG_OAUTH_CLIENT_SECRET=YOUR_SECRET
bee auth login --method oauth
```
## どちらを選ぶべきか
手軽に始めたいなら API キーが最適です。
個人利用や CI/CD
: セットアップがシンプルで、環境変数だけで完結します。
すぐに使い始めたい場合
: Backlog の個人設定から API キーを発行するだけで利用できます。
セキュリティを重視するなら OAuth がおすすめです。
チームでの利用
: OAuth クライアントを共有し、各メンバーが自分のアカウントで認証できます。
有効期限の短いトークン
: OAuth のアクセストークンは有効期限が短いため、AI ツールや外部サービスにトークンを渡す場合でも、漏洩時のリスクを抑えられます。期限切れ時は bee が自動で更新します。
## 複数スペースの管理
複数の Backlog スペースにログインしている場合、`bee auth switch` でアクティブなスペースを切り替えられます。
```sh
bee auth switch
```
現在の認証状態は `bee auth status` で確認できます。
```sh
bee auth status
```
## 認証情報の外部管理
パスワードマネージャーや OS のクレデンシャルストアを使うと、環境変数経由で認証情報を渡せます。この方法では `~/.beerc` に認証情報が保存されません。
[1Password CLI](https://developer.1password.com/docs/cli/) (`op`) を使う場合:
```sh
BACKLOG_API_KEY=$(op read "op://vault/backlog/api-key") \
BACKLOG_SPACE=xxx.backlog.com \
bee issue list --project MY_PROJECT
```
シェルの設定ファイルにエイリアスを登録しておくと便利です。
```sh
alias bee='BACKLOG_API_KEY=$(op read "op://vault/backlog/api-key") BACKLOG_SPACE=xxx.backlog.com bee'
```
[Bitwarden CLI](https://bitwarden.com/help/cli/) (`bw`) を使う場合:
```sh
BACKLOG_API_KEY=$(bw get password backlog-api-key) \
BACKLOG_SPACE=xxx.backlog.com \
bee issue list --project MY_PROJECT
```
シェルの設定ファイルにエイリアスを登録しておくと便利です。
```sh
alias bee='BACKLOG_API_KEY=$(bw get password backlog-api-key) BACKLOG_SPACE=xxx.backlog.com bee'
```
macOS の Keychain に保存した認証情報を使う場合:
```sh
# 事前に Keychain に保存
security add-generic-password -s "bee" -a "api-key" -w "your-api-key"
# 呼び出し
BACKLOG_API_KEY=$(security find-generic-password -s "bee" -a "api-key" -w) \
BACKLOG_SPACE=xxx.backlog.com \
bee issue list --project MY_PROJECT
```
シェルの設定ファイルにエイリアスを登録しておくと便利です。
```sh
alias bee='BACKLOG_API_KEY=$(security find-generic-password -s "bee" -a "api-key" -w) BACKLOG_SPACE=xxx.backlog.com bee'
```
## 関連コマンド
# 環境変数
環境変数を設定すると、頻繁に使うフラグを省略できます。
:::note[優先順位]
コマンドラインフラグは環境変数より常に優先されます。環境変数でデフォルト値を設定しておき、必要に応じてフラグで上書きする使い方が一般的です。
:::
## 環境変数リファレンス
`BACKLOG_SPACE`
: デフォルトのスペースホスト名(例: `xxx.backlog.com`)。設定すると、`bee auth login` でスペースの入力を省略できます。`BACKLOG_API_KEY` と併用すると、ログイン不要で bee を利用できます。
`BACKLOG_PROJECT`
: デフォルトのプロジェクト ID またはプロジェクトキー(例: `MY_PROJECT`)。設定すると、`--project` フラグを省略できます。
`BACKLOG_REPO`
: デフォルトのリポジトリ名(例: `my-repo`)。設定すると、`--repo` フラグを省略できます。
`BACKLOG_API_KEY`
: API キーによる認証に使用します。`BACKLOG_SPACE` と併用すると、`bee auth login` を実行しなくても認証済みの状態で bee を利用できます。CI/CD 環境で特に便利です。
`BACKLOG_OAUTH_CLIENT_ID`
: OAuth 認証で使用するクライアント ID。`bee auth login --method oauth` で必須です。
`BACKLOG_OAUTH_CLIENT_SECRET`
: OAuth 認証で使用するクライアントシークレット。`bee auth login --method oauth` で必須です。
`BACKLOG_OAUTH_PORT`
: OAuth 認証で使用するコールバックサーバーのポート番号。デフォルトは `5033`。別のアプリケーションとポートが競合する場合に変更できます。
## よく使うパターン
### プロジェクトの固定
毎回 `--project` を指定する代わりに、環境変数を設定します。
```sh
export BACKLOG_PROJECT=MY_PROJECT
bee issue list # --project MY_PROJECT と同じ
bee issue create # プロジェクトが自動選択される
bee issue list --project OTHER_PROJECT # フラグで上書きも可能
```
### シェルプロファイルへの設定
`.bashrc` や `.zshrc` に追加して永続化します。
```sh
export BACKLOG_SPACE=your-space.backlog.com
export BACKLOG_PROJECT=YOUR_PROJECT
```
### mise での設定
プロジェクトごとに環境変数を固定するには、mise の `[env]` セクションが便利です。
```toml title="mise.toml"
[env]
BACKLOG_SPACE = "your-space.backlog.com"
BACKLOG_PROJECT = "YOUR_PROJECT"
```
### CI/CD での利用
非対話環境では `BACKLOG_API_KEY` を設定して使います。詳しくは [CI/CD での利用](/bee/integrations/ci-cd/) を参照してください。
```yaml title=".github/workflows/example.yml"
env:
BACKLOG_API_KEY: ${{ secrets.BACKLOG_API_KEY }}
BACKLOG_SPACE: ${{ secrets.BACKLOG_SPACE }}
```
# 出力とフォーマット
import { Aside } from "@astrojs/starlight/components";
## テーブル出力
bee のリスト系コマンドは、デフォルトで人間が読みやすいテーブル形式で出力します。
```sh
bee issue list --project MY_PROJECT
```
出力例:
```
ID 種別 優先度 担当者 件名
PROJECT-1 タスク 中 田中太郎 ドキュメントを更新する
PROJECT-2 バグ 高 鈴木花子 ログインエラーの修正
PROJECT-3 タスク 低 — CI パイプラインの設定
```
## JSON 出力
`--json` フラグを付けると、JSON 形式で出力されます。スクリプトや他のツールとの連携に便利です。
```sh
bee issue list --project MY_PROJECT --json
```
### フィールドの絞り込み
`--json` にフィールド名をカンマ区切りで指定すると、出力するフィールドを絞り込めます。
```sh
bee issue view PROJECT-123 --json id,summary,status
```
### jq との組み合わせ
JSON 出力を `jq` と組み合わせると、柔軟なデータ加工ができます。
```sh
# 課題のサマリーだけを取り出す
bee issue list --project MY_PROJECT --json | jq '.[].summary'
# 優先度が「高」の課題だけを抽出
bee issue list --project MY_PROJECT --json | jq '[.[] | select(.priority.id == 2)]'
# 優先度が「高」の課題数をカウント
bee issue list --project MY_PROJECT --json | jq '[.[] | select(.priority.id == 2)] | length'
# 担当者ごとの課題数
bee issue list --project MY_PROJECT --json | jq 'group_by(.assignee.name) | map({name: .[0].assignee.name, count: length})'
```
## パイプラインの活用
bee の出力を他のコマンドと組み合わせる例です。
```sh
# 課題キーの一覧をファイルに出力
bee issue list --project MY_PROJECT --json | jq -r '.[].issueKey' > issues.txt
# 複数の課題を一括クローズ
cat issues.txt | xargs -I {} bee issue close {}
```
# シェル補完
import { Tabs, TabItem, LinkCard } from "@astrojs/starlight/components";
bee は Bash、Zsh、Fish のタブ補完をサポートしています。コマンド名やフラグ名を途中まで入力して Tab キーを押すと、候補が自動補完されます。
## セットアップ
```sh
echo 'eval "$(bee completion bash)"' >> ~/.bashrc
source ~/.bashrc
```
```sh
echo 'eval "$(bee completion zsh)"' >> ~/.zshrc
source ~/.zshrc
```
```sh
bee completion fish > ~/.config/fish/completions/bee.fish
```
## 確認
セットアップ後、`bee` と入力して Tab キーを押すと、利用可能なコマンドの一覧が表示されます。
```sh
bee
# auth issue pr repo user project ...
```
## トラブルシューティング
### 補完が効かない場合
- **シェルを再起動してください。** `source ~/.bashrc` や `source ~/.zshrc` を実行するか、新しいターミナルを開いてください。
- **bee がグローバルインストールされているか確認してください。** `which bee` でパスが表示されれば問題ありません。
- **Zsh で `compinit` が呼ばれているか確認してください。** `.zshrc` に `autoload -Uz compinit && compinit` が含まれていない場合、補完が動作しないことがあります。
### 補完候補が古い場合
bee をアップデートした後は、補完スクリプトを再生成してください。セットアップと同じコマンドを再度実行するだけで更新されます。
## 関連コマンド
# AI エージェントとの連携
import { Card, Steps, LinkCard } from "@astrojs/starlight/components";
bee はターミナルツールとして、AI エージェントの「手足」としても活用できます。LLM ベースのエージェントが Backlog のデータを取得・操作する手段として、大きく 2 つのアプローチがあります。
## LLM 向けドキュメントエンドポイント
bee のドキュメントサイトでは、LLM がコマンドの使い方を効率的に取得できるエンドポイントを提供しています。AI エージェントにドキュメントを読み込ませる際に活用してください。
[`/llms.txt`](/bee/llms.txt)
: コマンド一覧のサマリー。全体像の把握に最適。
[`/llms-full.txt`](/bee/llms-full.txt)
: 全コマンドの完全なリファレンスを 1 ファイルで取得。
各ドキュメントページにも `.md` エンドポイントがあり、個別のページを Markdown 形式で取得できます。
- [`/getting-started.md`](/bee/getting-started.md)
- [`/commands/issue/list.md`](/bee/commands/issue/list.md)
## どちらを使うべきか
**ターミナル操作可能な AI エージェント向け**
bee の CLI コマンドを AI エージェントの Skill として登録し、エージェントが直接呼び出せるようにする方法です。
- **利用環境**: Claude Code などターミナル操作可能な環境
- シェルパイプラインとの組み合わせなど、柔軟な操作が可能
- `bee browse` や `bee api` など、CLI 固有の機能でブラウザ操作や任意の API 呼び出しが可能
- テーブル / JSON の出力切り替えに対応
**MCP 対応クライアント向け**
[Backlog MCP Server](https://github.com/nulab/backlog-mcp-server) は、Backlog API をネイティブに MCP(Model Context Protocol)化したサーバーです。
- **利用環境**: Claude Desktop など MCP 対応クライアント
- 構造化されたツール定義により、エージェントが課題の検索・作成・更新などを直接実行できる
- MCP 対応のクライアントからそのまま使える
## bee + Skills のセットアップ
bee を AI エージェントの Skill として登録する方法です。
1. **bee をインストールする**
[はじめに](/bee/getting-started/) の手順に従って bee をインストールし、`bee auth login` で認証を完了してください。
2. **Skill を登録する**
[Skills CLI](https://github.com/anthropics/skills) を使って bee の Skill を登録します。
```sh
npx skills add nulab/bee --skill using-bee
```
Backlog 記法(Markdown ではなく Backlog 独自の記法)を使うプロジェクトでは、構文リファレンスのスキルも追加できます。
```sh
npx skills add nulab/bee --skill backlog-notation
```
Backlog ではプロジェクトごとに Markdown か Backlog 記法を選択できるため、`backlog-notation` はインストールしただけでは自動的に適用されません。
使いたいときにプロンプトで `/backlog-notation PROJECT-123 の説明文をリファクタリングの内容に合わせて更新して` のように明示的に指示するか、Backlog 記法を常に使うプロジェクトであれば AGENTS.md に以下のように記載しておくと毎回指示する必要がなくなります。
```markdown
## Backlog
This project's Backlog project uses Backlog notation (Backlog記法).
When writing issues or comments on Backlog, follow the backlog-notation skill for formatting.
```
3. **エージェントから使う**
スキルを登録すると、やりたいことを伝えるだけで bee を使って Backlog を操作してくれます。プロンプトに「Backlog」や課題キーなど、Backlog に関連する単語を含めるとスキルがトリガーされます。
## Backlog MCP Server のセットアップ
セットアップ方法は [Backlog MCP Server の README](https://github.com/nulab/backlog-mcp-server) を参照してください。
## `bee api` で柔軟な API アクセス
`bee api` コマンドを使うと、Backlog の任意の API エンドポイントを直接呼び出せます。MCP ツールとしてまだカバーされていない API にアクセスする場合に便利です。
```sh
# ユーザー情報の取得
bee api users/myself
# 課題の検索(クエリパラメータ付き)
bee api issues -f 'projectId[]=12345' -f count=5
# 課題の作成(POST)
bee api issues -X POST -f projectId=12345 -f summary="API から作成した課題"
# 特定フィールドだけ取得
bee api users/myself --json id,name,mailAddress
```
## `--json` を活用したデータ連携
AI エージェントに構造化データを渡すには、`--json` フラグが便利です。
```sh
# プロジェクトの課題をすべて JSON で取得
bee issue list --project MY_PROJECT --json
# 必要なフィールドだけに絞る
bee issue list --project MY_PROJECT --json id,summary,status,assignee
```
## レシピ
実践的なプロンプトの例を用意しています。
# CI/CD での利用
import { Steps, Tabs, TabItem, LinkCard, CardGrid } from "@astrojs/starlight/components";
bee は CI/CD 環境でも利用できます。自動テストやデプロイのパイプラインから Backlog の課題やプルリクエストを操作できます。
## セットアップ
1. **API キー認証を設定する**
CI/CD では API キー認証を使います。CI/CD サービスのシークレット機能を使って、環境変数に API キーとスペース情報を設定してください。
```sh
export BACKLOG_API_KEY=your-api-key
export BACKLOG_SPACE=your-space.backlog.com
```
2. **パイプラインから bee を呼び出す**
`npx` を使えばインストール不要で bee を実行できます。
```sh
npx @nulab/bee issue list --project MY_PROJECT
```
:::caution
API キーをコードにハードコードせず、CI/CD サービスのシークレット機能を使って管理してください。
:::
## コミットを課題に通知する
ブランチ名が `PROJECT-123/機能名` の形式であれば、プッシュ時にコミットへのリンクを課題にコメントします。
```yaml
name: Notify Backlog on Commit
on: push
permissions: {}
env:
BACKLOG_API_KEY: ${{ secrets.BACKLOG_API_KEY }}
BACKLOG_SPACE: ${{ secrets.BACKLOG_SPACE }}
jobs:
notify:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Notify linked issue
run: |
KEY=$(echo "$BRANCH" | grep -oE '^[A-Z_]+-[0-9]+')
npx @nulab/bee issue comment "$KEY" \
--body "[${COMMIT_SHA:0:7}]($COMMIT_URL) がプッシュされました"
env:
BRANCH: ${{ github.ref_name }}
COMMIT_SHA: ${{ github.sha }}
COMMIT_URL: ${{ github.server_url }}/${{ github.repository }}/commit/${{ github.sha }}
```
:::tip
リポジトリのシークレットに `BACKLOG_API_KEY` と `BACKLOG_SPACE` を登録してください。
:::
```yaml
notify-backlog:
image: node:lts
stage: notify
script:
- |
KEY=$(echo "$CI_COMMIT_BRANCH" | grep -oE '^[A-Z_]+-[0-9]+')
npx @nulab/bee issue comment "$KEY" \
--body "[$CI_COMMIT_SHORT_SHA]($CI_PROJECT_URL/-/commit/$CI_COMMIT_SHA) がプッシュされました"
rules:
- if: $CI_COMMIT_BRANCH
```
:::tip
プロジェクトの環境変数に `BACKLOG_API_KEY` と `BACKLOG_SPACE` を登録してください。
:::
```yaml
pipelines:
default:
- step:
name: Notify Backlog
image: node:lts
script:
- |
KEY=$(echo "$BITBUCKET_BRANCH" | grep -oE '^[A-Z_]+-[0-9]+')
COMMIT_URL="https://bitbucket.org/${BITBUCKET_WORKSPACE}/${BITBUCKET_REPO_SLUG}/commits/${BITBUCKET_COMMIT}"
npx @nulab/bee issue comment "$KEY" \
--body "[${BITBUCKET_COMMIT:0:7}]($COMMIT_URL) がプッシュされました"
```
:::tip
リポジトリの環境変数に `BACKLOG_API_KEY` と `BACKLOG_SPACE` を登録してください。
:::
```yaml
version: 2.1
jobs:
notify-backlog:
docker:
- image: cimg/node:lts
steps:
- run:
name: Notify linked issue
command: |
KEY=$(echo "$CIRCLE_BRANCH" | grep -oE '^[A-Z_]+-[0-9]+')
COMMIT_URL="${CIRCLE_REPOSITORY_URL%.git}/commit/${CIRCLE_SHA1}"
npx @nulab/bee issue comment "$KEY" \
--body "[${CIRCLE_SHA1:0:7}]($COMMIT_URL) がプッシュされました"
workflows:
notify:
jobs:
- notify-backlog
```
:::tip
プロジェクトの環境変数に `BACKLOG_API_KEY` と `BACKLOG_SPACE` を登録してください。
:::
:::note
Multibranch Pipeline で使用してください。
:::
```groovy
pipeline {
agent { docker { image 'node:lts' } }
options { skipDefaultCheckout() }
environment {
BACKLOG_API_KEY = credentials('backlog-api-key')
BACKLOG_SPACE = 'myspace.backlog.com'
}
stages {
stage('Notify Backlog') {
steps {
sh '''
KEY=$(echo "$BRANCH_NAME" | grep -oE '^[A-Z_]+-[0-9]+')
COMMIT_URL="${GIT_URL%.git}/commit/${GIT_COMMIT}"
npx @nulab/bee issue comment "$KEY" \
--body "[${GIT_COMMIT:0:7}]($COMMIT_URL) がプッシュされました"
'''
}
}
}
}
```
:::tip
Jenkins の認証情報に `backlog-api-key` と `backlog-space` を登録してください。
:::
## レシピ
実践的なワークフローの例を用意しています。
# Pull Request と課題を連動させる
import { Steps, LinkCard, CardGrid } from "@astrojs/starlight/components";
GitHub Issues では、PR に `Closes #123` と書くだけで Issue のリンク・ステータス更新・クローズが自動で行われます。このレシピで Backlog 課題でも同じ操作感を実現できます。PR 本文に `PROJECT-123` のような課題キーを書くだけで動作します。
1. **PR 作成**
課題に PR リンクをコメント+ステータスを「処理中」に
2. **PR 本文の編集**
新たに追加された課題キーにだけコメント
3. **PR マージ**
課題を自動クローズ
:::note[前提]
リポジトリに `BACKLOG_API_KEY` と `BACKLOG_SPACE` のシークレットを登録する必要があります。詳しくは [CI/CD での利用](/bee/integrations/ci-cd/) を参照してください。
:::
```yaml
name: Sync PR Lifecycle to Backlog Issues
on:
pull_request:
types: [opened, edited, closed]
branches: [main]
# リポジトリへの書き込みは不要なので全権限を無効化
permissions: {}
env:
BACKLOG_API_KEY: ${{ secrets.BACKLOG_API_KEY }}
BACKLOG_SPACE: ${{ secrets.BACKLOG_SPACE }}
# 「処理中」ステータスの ID(bee status list で確認)
STATUS_IN_PROGRESS: "2"
jobs:
sync:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
# PR 本文から課題キーを抽出する
# edited イベントでは変更前の本文からもキーを取得して差分を計算する
- name: Collect issue keys from PR body
id: collect
run: |
KEYS=$(echo "$PR_BODY" | grep -oE '[A-Z_]+-[0-9]+' | sort -u | tr '\n' ' ')
echo "Detected issue keys: ${KEYS:-(none)}"
echo "keys=$KEYS" >> "$GITHUB_OUTPUT"
if [ "$EVENT_ACTION" = "edited" ]; then
PREV=$(echo "$PREV_BODY" | grep -oE '[A-Z_]+-[0-9]+' | sort -u | tr '\n' ' ')
echo "Previous issue keys: ${PREV:-(none)}"
echo "prev=$PREV" >> "$GITHUB_OUTPUT"
fi
env:
PR_BODY: ${{ github.event.pull_request.body }}
PREV_BODY: ${{ github.event.changes.body.from }}
EVENT_ACTION: ${{ github.event.action }}
- name: Build PR link text
id: pr-link
run: |
echo "md=[${REPO}#${PR_NUMBER}](${PR_URL})" >> "$GITHUB_OUTPUT"
env:
REPO: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
PR_URL: ${{ github.event.pull_request.html_url }}
# PR 作成 → 課題にリンク+ステータスを「処理中」に
- name: Update status to "In Progress" and comment PR link
if: github.event.action == 'opened' && steps.collect.outputs.keys != ''
run: |
for KEY in $KEYS; do
echo "Updating status: $KEY -> In Progress"
npx @nulab/bee issue edit "$KEY" --status "$STATUS_IN_PROGRESS" || echo "::warning::Failed to process $KEY"
echo "Commenting on: $KEY"
npx @nulab/bee issue comment "$KEY" \
--body "PR ${PR_LINK} が作成されました" || echo "::warning::Failed to process $KEY"
done
env:
KEYS: ${{ steps.collect.outputs.keys }}
PR_LINK: ${{ steps.pr-link.outputs.md }}
# PR 本文の編集 → 新しく追加された課題キーにだけコメント
- name: Comment PR link on newly added issues
if: github.event.action == 'edited' && steps.collect.outputs.keys != ''
run: |
for KEY in $KEYS; do
if echo "$PREV_KEYS" | grep -qw "$KEY"; then
echo "Skipping: $KEY (already linked)"
continue
fi
echo "Commenting on: $KEY"
npx @nulab/bee issue comment "$KEY" \
--body "PR ${PR_LINK} にリンクされました" || echo "::warning::Failed to process $KEY"
done
env:
KEYS: ${{ steps.collect.outputs.keys }}
PREV_KEYS: ${{ steps.collect.outputs.prev }}
PR_LINK: ${{ steps.pr-link.outputs.md }}
# PR マージ → 課題をクローズ
- name: Close linked issues
if: github.event.action == 'closed' && github.event.pull_request.merged == true && steps.collect.outputs.keys != ''
run: |
for KEY in $KEYS; do
echo "Closing: $KEY"
npx @nulab/bee issue close "$KEY" \
--comment "PR ${PR_LINK} のマージにより自動クローズ" || echo "::warning::Failed to process $KEY"
done
env:
KEYS: ${{ steps.collect.outputs.keys }}
PR_LINK: ${{ steps.pr-link.outputs.md }}
```
## カスタマイズ
ステータス ID を確認するには
: `bee status list ` でプロジェクトのステータス一覧と ID を確認できます。`STATUS_IN_PROGRESS` の値をプロジェクトに合わせて変更してください。
ステータス変更が不要
: `bee issue edit` の行と `STATUS_IN_PROGRESS` 環境変数を削除すれば、リンクのコメントだけになります。
自動クローズが不要
: 「Close linked issues」ステップを削除してください。
クローズではなく別のステータスにしたい
: `bee issue close` を `bee issue edit --status <ステータスID>` に変更してください。ステータス ID は `bee status list ` で確認できます。
`edited` イベントが不要
: トリガーの `types` から `edited` を削除し、「Comment PR link on newly added issues」ステップを削除してください。
## 関連するコマンド
# リリース時に関連課題へ通知する
import { LinkCard, CardGrid } from "@astrojs/starlight/components";
リリースタグの作成をトリガーに、前回タグからのコミットに含まれる課題キーを抽出し、各課題にリリースバージョンをコメントします。あわせて、GitHub Release の本文を Backlog ドキュメントとしても投稿します。
:::note[前提]
リポジトリに `BACKLOG_API_KEY` と `BACKLOG_SPACE` のシークレットを登録する必要があります。詳しくは [CI/CD での利用](/bee/integrations/ci-cd/) を参照してください。
:::
```yaml
name: Notify Backlog Issues on Release
on:
release:
types: [published]
# actions/checkout が contents: read を必要とするため明示的に指定
permissions:
contents: read
env:
BACKLOG_API_KEY: ${{ secrets.BACKLOG_API_KEY }}
BACKLOG_SPACE: ${{ secrets.BACKLOG_SPACE }}
# ドキュメント投稿先のプロジェクトキー
BACKLOG_PROJECT: MY_PROJECT
# ドキュメントの親フォルダ ID(空の場合はルートに作成)
DOCUMENT_PARENT_ID: ""
jobs:
notify:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
# 前回タグから現在のタグまでのコミットに含まれる課題キーを収集する
- name: Collect issue keys from commits since last tag
id: collect
run: |
PREV_TAG=$(git describe --tags --abbrev=0 HEAD^ 2>/dev/null || echo "")
if [ -n "$PREV_TAG" ]; then
RANGE="${PREV_TAG}..HEAD"
echo "Range: ${PREV_TAG}..HEAD"
else
RANGE="HEAD"
echo "Range: all commits (no previous tag)"
fi
KEYS=$(git log "$RANGE" --oneline | grep -oE '[A-Z_]+-[0-9]+' | sort -u | tr '\n' ' ')
echo "Detected issue keys: ${KEYS:-(none)}"
echo "issue_keys=$KEYS" >> "$GITHUB_OUTPUT"
# 各課題にリリースバージョンをコメントする
- name: Comment release info on each issue
if: steps.collect.outputs.issue_keys != ''
run: |
for KEY in $ISSUE_KEYS; do
echo "Commenting on: $KEY (release $TAG_NAME)"
npx @nulab/bee issue comment "$KEY" \
--body "リリース [$TAG_NAME]($RELEASE_URL) に含まれています" \
|| echo "::warning::Failed to process $KEY"
done
env:
ISSUE_KEYS: ${{ steps.collect.outputs.issue_keys }}
TAG_NAME: ${{ github.event.release.tag_name }}
RELEASE_URL: ${{ github.event.release.html_url }}
# GitHub Release の本文を Backlog ドキュメントとして投稿する
- name: Post release notes to Backlog document
run: |
echo "Creating document: $TAG_NAME"
npx @nulab/bee document create \
--project "$BACKLOG_PROJECT" \
--title "リリースノート $TAG_NAME" \
--body "$RELEASE_BODY" \
--parent-id "$DOCUMENT_PARENT_ID" \
|| echo "::warning::Failed to create release document"
env:
TAG_NAME: ${{ github.event.release.tag_name }}
RELEASE_BODY: ${{ github.event.release.body }}
```
## カスタマイズ
ドキュメント投稿が不要
: 「Post release notes to Backlog document」ステップと `BACKLOG_PROJECT`・`DOCUMENT_PARENT_ID` 環境変数を削除してください。
課題への通知が不要
: 「Collect issue keys ...」と「Comment release info ...」の2ステップを削除してください。
ドキュメントを特定のフォルダに入れたい
: `DOCUMENT_PARENT_ID` にフォルダのドキュメント ID を設定してください。
## 関連するコマンド
# AI エージェント向けプロンプト集
import { Tabs, TabItem } from "@astrojs/starlight/components";
:::tip[using-bee スキルとの組み合わせ]
[using-bee スキル](/bee/integrations/ai-agent/)を導入済みであれば、bee のコマンド体系や `--json`・`@me` などの規約はスキルの定義に含まれているため、プロンプトで bee コマンドの書き方まで指示する必要はありません。やりたいことだけ伝えれば十分です。
プロンプトに「Backlog」や課題キーなど、Backlog に関連する単語を含めるとスキルがトリガーされます。以下のプロンプト例にはすべて含めてあります。
:::
:::note
プロンプト中の `MY_PROJECT` や課題キーは、実際のプロジェクトキーや課題キーに読み替えてください。
:::
## 課題の棚卸し
```
Backlog の MY_PROJECT で、完了以外かつ期限切れの課題を一覧にして。
課題キー・タイトル・担当者・期限・ステータスを列にした表で、期限の早い順に並べて。
```
```
Backlog の MY_PROJECT で、完了以外の課題を担当者別に件数集計して。
担当者名と件数の表を、件数の多い順で出力して。担当者が未設定のものは「未割り当て」として集計して。
```
```
Backlog の MY_PROJECT で、ステータスが「処理中」のまま最終更新日から2週間以上経過している課題を一覧にして。
課題キー・タイトル・担当者・最終更新日を列にして、担当者ごとにグルーピングして出力して。
```
## 課題の一括操作
```
Backlog の MY_PROJECT で、マイルストーン「v1.0」に紐づいている完了以外の課題を、
すべてマイルストーン「v1.1」に付け替えて。
完了したら、変更した課題キーとタイトルの一覧を出力して。
```
```
Backlog の MY_PROJECT で、種別が「バグ」かつカテゴリ未設定の完了以外の課題に
「要トリアージ」カテゴリを設定して。
完了したら、変更した課題キーとタイトルの一覧を出力して。
```
## リリース準備
```
Backlog の MY_PROJECT で、マイルストーン「v1.2」に含まれる完了済み課題からリリースノートを作成して。
課題の種別をもとに「新機能」「バグ修正」「改善」の3セクションに分類して、
各項目は「- [課題キー] タイトル」の形式で、Markdown で出力して。
```
```
Backlog の MY_PROJECT で、マイルストーン「v1.2」の進捗状況をまとめて。
以下の情報を出力して:
- ステータスごとの課題件数
- 完了以外の課題を優先度の高い順に並べた一覧(課題キー・タイトル・担当者・ステータス)
- リリースのブロッカーになりそうな課題があればその指摘
```
## ドキュメント・Wiki
```
Backlog の MY_PROJECT に、今日の日付入りの議事録ドキュメントを作成して。
本文は以下のセクション構成にして:
- 日時
- 参加者
- アジェンダ
- 決定事項
- TODO
```
```
Backlog の MY_PROJECT で、最終更新日が6ヶ月以上前の Wiki ページを一覧にして。
ページ名と最終更新日を列にした表を、更新日の古い順で出力して。
```
## プロジェクト横断
:::caution[注意]
プロジェクト横断のプロンプトは、参加しているすべてのプロジェクトに対して API リクエストを発行します。プロジェクト数が多いと Backlog API のレート制限に抵触する場合があります。その場合は、対象とするプロジェクトキーを明示的に指定して実行してください。
:::
```
Backlog の全プロジェクトから、自分がアサインされている完了以外の課題を集めて。
プロジェクトキー・課題キー・タイトル・期限・優先度を列にした表で、期限の早い順に並べて。
期限切れの課題は別セクションとして先頭にまとめて。
```
```
Backlog の未読通知を取得して、1週間以上前のものを既読にしたい。
まず対象件数を教えて。確認が取れたら既読処理を実行して、最後に残りの未読件数を出力して。
```
# Command reference
# bee auth login
Authenticate with a Backlog space
The default mode is API key with interactive prompts.
Use `--with-token` to pass an API key on standard input.
Use `--method oauth` for OAuth authentication via the browser.
## Usage
```sh
bee auth login [flags]
```
## Flags
- `-s, --space `: Space hostname
- `-m, --method `: The authentication method to use (default: `api-key`)
- `--with-token`: Read token from standard input
## Examples
Start interactive setup
```sh
bee auth login
```
Login with API key from stdin
```sh
echo 'your-api-key' | bee auth login --with-token
```
Login with OAuth
```sh
bee auth login -m oauth
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_OAUTH_CLIENT_ID`: OAuth Client ID
- `BACKLOG_OAUTH_CLIENT_SECRET`: OAuth Client Secret
- `BACKLOG_OAUTH_PORT`: OAuth callback port (default: 5033)
# bee auth logout
Remove authentication for a Backlog space
Removes stored credentials locally. Does not revoke API keys or OAuth tokens on the server.
## Usage
```sh
bee auth logout [flags]
```
## Flags
- `-s, --space `: Space hostname
- `--all`: Log out of all spaces
## Examples
Select space via prompt
```sh
bee auth logout
```
Log out of a specific space
```sh
bee auth logout -s xxx.backlog.com
```
Log out of all spaces
```sh
bee auth logout --all
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
# bee auth refresh
Refresh OAuth token
Only available for spaces authenticated with OAuth. If the refresh token is expired, re-authenticate with `bee auth login -m oauth`.
## Usage
```sh
bee auth refresh [flags]
```
## Flags
- `-s, --space `: Space hostname
## Examples
Refresh token for default space
```sh
bee auth refresh
```
Refresh token for specific space
```sh
bee auth refresh -s xxx.backlog.com
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
# bee auth status
Show authentication status
Verifies credential validity for each configured space via the Backlog API. The active (default) space is indicated.
## Usage
```sh
bee auth status [flags]
```
## Flags
- `-s, --space `: Space hostname
- `--show-token`: Display the auth token
## Examples
Display status for all spaces
```sh
bee auth status
```
Check a specific space
```sh
bee auth status -s xxx.backlog.com
```
Show auth tokens in the output
```sh
bee auth status --show-token
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
# bee auth switch
Switch active space
Changes which space is used by default when `--space` is not provided.
## Usage
```sh
bee auth switch [flags]
```
## Flags
- `-s, --space `: Space hostname
## Examples
Select space via prompt
```sh
bee auth switch
```
Switch to a specific space
```sh
bee auth switch -s xxx.backlog.com
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
# bee auth token
Print the auth token to stdout
Prints the token for the default space, or the space given by `--space`. Useful for piping to other commands.
## Usage
```sh
bee auth token [flags]
```
## Flags
- `-s, --space `: Space hostname
## Examples
Print token for default space
```sh
bee auth token
```
Print token for specific space
```sh
bee auth token -s xxx.backlog.com
```
Use token in a script
```sh
TOKEN=$(bee auth token) && curl -H "X-Api-Key: $TOKEN" https://xxx.backlog.com/api/v2/users/myself
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
# bee category create
Create a category
Omitted fields will be prompted interactively.
## Usage
```sh
bee category create [flags]
```
## Flags
- `-p, --project `: Project ID or project key (required)
- `-n, --name `: Category name
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Create a category
```sh
bee category create -p PROJECT -n "Bug Report"
```
Create interactively
```sh
bee category create -p PROJECT
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee category delete
Delete a category
This action is irreversible.
## Usage
```sh
bee category delete [flags]
```
## Arguments
- `CATEGORY`: Category ID
## Flags
- `-p, --project `: Project ID or project key (required)
- `-y, --yes`: Skip confirmation prompt
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Delete a category (with confirmation)
```sh
bee category delete 12345 -p PROJECT
```
Delete without confirmation
```sh
bee category delete 12345 -p PROJECT --yes
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee category edit
Edit a category
Renames the specified category.
## Usage
```sh
bee category edit [flags]
```
## Arguments
- `CATEGORY`: Category ID
## Flags
- `-p, --project `: Project ID or project key (required)
- `-n, --name `: New name of the category
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Rename a category
```sh
bee category edit 12345 -p PROJECT -n "New Name"
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee category list
List categories
Categories help organize issues by grouping them into logical areas.
## Usage
```sh
bee category list [flags] [PROJECT]
```
## Arguments
- `PROJECT`: Project ID or project key
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List all categories in a project
```sh
bee category list PROJECT
```
Output as JSON
```sh
bee category list PROJECT --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee document attachments
List document attachments
Shows file name, size, creator, and creation date.
## Usage
```sh
bee document attachments [flags]
```
## Arguments
- `DOCUMENT`: Document ID
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List attachments
```sh
bee document attachments 12345
```
Output as JSON
```sh
bee document attachments 12345 --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee document create
Create a document
Omitted required fields will be prompted interactively. When input is piped, it is used as the body automatically.
## Usage
```sh
bee document create [flags]
```
## Flags
- `-p, --project `: Project ID or project key
- `-t, --title `: Document title
- `-b, --body `: Document body content
- `--emoji `: Emoji for the document
- `--parent-id `: Parent document ID for creating as a child document
- `--add-last`: Add document to the end of the list
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Create a document with title and body
```sh
bee document create -p PROJECT -t "Meeting Notes" -b "Content here"
```
Create a document from stdin
```sh
echo "Content" | bee document create -p PROJECT -t "Notes"
```
Create a child document
```sh
bee document create -p PROJECT -t "Sub Page" --parent-id 12345
```
Output as JSON
```sh
bee document create -p PROJECT -t "Title" --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee document delete
Delete a document
This action is irreversible.
## Usage
```sh
bee document delete [flags]
```
## Arguments
- `DOCUMENT`: Document ID
## Flags
- `-y, --yes`: Skip confirmation prompt
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Delete a document (with confirmation)
```sh
bee document delete 12345
```
Delete a document without confirmation
```sh
bee document delete 12345 --yes
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee document list
List documents
Use `--keyword` to search within document titles and content.
## Usage
```sh
bee document list [flags]
```
## Flags
- `-p, --project `: Project ID or project key (required)
- `-k, --keyword `: Keyword search
- `--sort `: Sort field {created|updated}
- `--order `: Sort order
- `-L, --count `: Number of results (default: 20)
- `--offset `: Offset for pagination
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List documents in a project
```sh
bee document list -p PROJECT
```
Search documents by keyword
```sh
bee document list -p PROJECT -k "meeting notes"
```
Output as JSON
```sh
bee document list -p PROJECT --json
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee document tree
Display document tree
Shows the hierarchical structure of documents with tree-style indentation.
## Usage
```sh
bee document tree [flags] [PROJECT]
```
## Arguments
- `PROJECT`: Project ID or project key
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Show document tree
```sh
bee document tree PROJECT
```
Output as JSON
```sh
bee document tree PROJECT --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee document view
View a document
Use `--web` to open in the browser (`--project` is required for `--web`).
## Usage
```sh
bee document view [flags]
```
## Arguments
- `DOCUMENT`: Document ID
## Flags
- `-p, --project `: Project ID or project key (required for --web)
- `-w, --web`: Open the document in the browser
- `-n, --no-browser`: Print the URL instead of opening the browser
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
View document details
```sh
bee document view 12345
```
Open document in browser
```sh
bee document view 12345 --web -p PROJECT
```
Output as JSON
```sh
bee document view 12345 --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue attachments
List issue attachments
Shows file name, size, creator, and creation date.
## Usage
```sh
bee issue attachments [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List attachments
```sh
bee issue attachments PROJECT-123
```
Output as JSON
```sh
bee issue attachments PROJECT-123 --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue close
Close an issue
Sets the status to Closed with resolution `Fixed` by default. Use `--resolution` for a different resolution.
## Usage
```sh
bee issue close [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `-c, --comment `: Comment to add when closing
- `--resolution `: Resolution
- `--notify `: User IDs to notify (repeatable)
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Close an issue
```sh
bee issue close PROJECT-123
```
Close with a comment
```sh
bee issue close PROJECT-123 -c "Done"
```
Close as duplicate
```sh
bee issue close PROJECT-123 --resolution duplicate
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue comment
Add a comment to an issue
When input is piped, it is used as the body automatically.
Use `--list`, `--edit-last`, or `--delete-last` for other comment operations.
## Usage
```sh
bee issue comment [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `-b, --body `: Comment body
- `--notify `: User IDs to notify (repeatable)
- `--attachment `: Attachment IDs (repeatable)
- `--list`: List comments on the issue
- `--edit-last`: Edit your most recent comment
- `--delete-last`: Delete your most recent comment
- `--yes`: Skip confirmation prompt for delete
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Add a comment
```sh
bee issue comment PROJECT-123 -b "This is a comment"
```
Add a comment from stdin
```sh
echo "Comment body" | bee issue comment PROJECT-123
```
List all comments
```sh
bee issue comment PROJECT-123 --list
```
Edit your last comment
```sh
bee issue comment PROJECT-123 --edit-last -b "Updated text"
```
Delete your last comment
```sh
bee issue comment PROJECT-123 --delete-last --yes
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue count
Count issues
Accepts the same filter flags as `bee issue list`.
## Usage
```sh
bee issue count [flags]
```
## Flags
- `-p, --project `: Project ID or project key (comma-separated for multiple)
- `-a, --assignee `: Assignee user ID (repeatable). Use @me for yourself.
- `-S, --status `: Status ID (repeatable)
- `-P, --priority `: Priority name (repeatable)
- `-k, --keyword `: Keyword search
- `--created-since `: Show issues created on or after this date
- `--created-until `: Show issues created on or before this date
- `--updated-since `: Show issues updated on or after this date
- `--updated-until `: Show issues updated on or before this date
- `--due-since `: Show issues due on or after this date
- `--due-until `: Show issues due on or before this date
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Count all issues in a project
```sh
bee issue count -p PROJECT
```
Count open bugs assigned to you
```sh
bee issue count -p PROJECT -a @me -k "bug"
```
Output as JSON
```sh
bee issue count -p PROJECT --json
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (comma-separated for multiple)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue create
Create an issue
Omitted required fields will be prompted interactively. Priority accepts a name: `high`, `normal`, or `low`.
## Usage
```sh
bee issue create [flags]
```
## Flags
- `-p, --project `: Project ID or project key
- `-t, --title `: Issue title
- `-T, --type `: Issue type ID
- `-P, --priority `: Priority
- `-d, --description `: Issue description
- `-a, --assignee `: Assignee user ID. Use @me for yourself.
- `--category `: Category IDs (repeatable)
- `--version `: Version IDs (repeatable)
- `--milestone `: Milestone IDs (repeatable)
- `--parent-issue `: Parent issue ID
- `--start-date `: Start date
- `--due-date `: Due date
- `--estimated-hours `: Estimated hours
- `--actual-hours `: Actual hours
- `--notify `: User IDs to notify (repeatable)
- `--attachment `: Attachment IDs (repeatable)
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Create an issue with required fields
```sh
bee issue create -p PROJECT --type 1 --priority normal -t "Fix login bug"
```
Create an issue with description
```sh
bee issue create -p PROJECT --type 1 --priority normal -t "Title" -d "Details here"
```
Create an issue assigned to yourself
```sh
bee issue create -p PROJECT --type 1 --priority high -t "Title" --assignee @me
```
Output as JSON
```sh
bee issue create -p PROJECT --type 1 --priority normal -t "Title" --json
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue delete
Delete an issue
This action is irreversible.
## Usage
```sh
bee issue delete [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `-y, --yes`: Skip confirmation prompt
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Delete an issue (with confirmation)
```sh
bee issue delete PROJECT-123
```
Delete an issue without confirmation
```sh
bee issue delete PROJECT-123 --yes
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue edit
Edit an issue
Only specified fields are updated; others remain unchanged.
## Usage
```sh
bee issue edit [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `-t, --title `: New title of the issue
- `-d, --description `: New description of the issue
- `-S, --status `: New status ID
- `-P, --priority `: Change priority
- `-T, --type `: New issue type ID
- `--assignee `: New assignee user ID. Use @me for yourself.
- `--category `: Category IDs (repeatable)
- `--version `: Version IDs (repeatable)
- `--milestone `: Milestone IDs (repeatable)
- `--resolution `: Resolution ID
- `--parent-issue `: New parent issue ID
- `--start-date `: New start date
- `--due-date `: New due date
- `--estimated-hours `: New estimated hours
- `--actual-hours `: New actual hours
- `-c, --comment `: Comment to add with the update
- `--notify `: User IDs to notify (repeatable)
- `--attachment `: Attachment IDs (repeatable)
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Update issue title
```sh
bee issue edit PROJECT-123 -t "New title"
```
Change assignee and priority
```sh
bee issue edit PROJECT-123 --assignee 12345 --priority high
```
Add a comment with the update
```sh
bee issue edit PROJECT-123 -t "New title" --comment "Updated title"
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue list
List issues
By default, sorted by last updated date in descending order. Multiple project keys can be comma-separated.
## Usage
```sh
bee issue list [flags]
```
## Flags
- `-p, --project `: Project ID or project key (comma-separated for multiple)
- `-a, --assignee `: Assignee user ID (repeatable). Use @me for yourself.
- `-S, --status `: Status ID (repeatable)
- `-P, --priority `: Priority name (repeatable)
- `-T, --type `: Issue type ID (repeatable)
- `--category `: Category ID (repeatable)
- `--version `: Version ID (repeatable)
- `--milestone `: Milestone ID (repeatable)
- `--resolution `: Resolution ID (repeatable)
- `--parent-issue `: Parent issue ID (repeatable)
- `-k, --keyword `: Keyword search
- `--created-since `: Show issues created on or after this date
- `--created-until `: Show issues created on or before this date
- `--updated-since `: Show issues updated on or after this date
- `--updated-until `: Show issues updated on or before this date
- `--start-since `: Show issues starting on or after this date
- `--start-until `: Show issues starting on or before this date
- `--due-since `: Show issues due on or after this date
- `--due-until `: Show issues due on or before this date
- `--sort `: Sort field
- `--order `: Sort order
- `-L, --count `: Number of results (default: 20)
- `--offset `: Offset for pagination
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List issues in a project
```sh
bee issue list -p PROJECT
```
List your assigned issues
```sh
bee issue list -p PROJECT -a @me
```
Filter by keyword and priority
```sh
bee issue list -p PROJECT -k "login bug" --priority high
```
Output as JSON
```sh
bee issue list -p PROJECT --json
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (comma-separated for multiple)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue reopen
Reopen an issue
Sets the status back to Open.
## Usage
```sh
bee issue reopen [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `-c, --comment `: Comment to add when reopening
- `--notify `: User IDs to notify (repeatable)
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Reopen an issue
```sh
bee issue reopen PROJECT-123
```
Reopen with a comment
```sh
bee issue reopen PROJECT-123 -c "Reopening due to regression"
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue status
Show issue status summary for yourself
Displays your assigned issues grouped by status (e.g., Open, In Progress, Resolved).
## Usage
```sh
bee issue status [flags]
```
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Show your issue status summary
```sh
bee issue status
```
Output as JSON
```sh
bee issue status --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue view
View an issue
Use `--comments` to include comments. Use `--web` to open in the browser.
## Usage
```sh
bee issue view [flags]
```
## Arguments
- `ISSUE`: Issue ID or issue key
## Flags
- `--comments`: Include comments
- `-w, --web`: Open the issue in the browser
- `-n, --no-browser`: Print the URL instead of opening the browser
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
View issue details
```sh
bee issue view PROJECT-123
```
View with comments
```sh
bee issue view PROJECT-123 --comments
```
Open issue in browser
```sh
bee issue view PROJECT-123 --web
```
Output as JSON
```sh
bee issue view PROJECT-123 --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee issue-type create
Create an issue type
Omitted fields will be prompted interactively.
## Usage
```sh
bee issue-type create [flags]
```
## Flags
- `-p, --project `: Project ID or project key (required)
- `-n, --name `: Issue type name
- `--color `: Display color {#e30000|#990000|#934981|#814fbc|#2779ca|#007e9a|#7ea800|#ff9200|#ff3265|#666665}
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Create an issue type
```sh
bee issue-type create -p PROJECT -n "Enhancement" --color "#2779ca"
```
Create interactively
```sh
bee issue-type create -p PROJECT --color "#2779ca"
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue-type delete
Delete an issue type
All issues of this type are reassigned to the substitute issue type. This action is irreversible.
## Usage
```sh
bee issue-type delete [flags]
```
## Arguments
- `ISSUETYPE`: Issue type ID
## Flags
- `-p, --project `: Project ID or project key (required)
- `--substitute-issue-type-id `: Replacement issue type ID for affected issues
- `-y, --yes`: Skip confirmation prompt
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Delete an issue type
```sh
bee issue-type delete 12345 -p PROJECT --substitute-issue-type-id 67890
```
Delete without confirmation
```sh
bee issue-type delete 12345 -p PROJECT --substitute-issue-type-id 67890 --yes
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue-type edit
Edit an issue type
Only specified fields are updated; others remain unchanged.
## Usage
```sh
bee issue-type edit [flags]
```
## Arguments
- `ISSUETYPE`: Issue type ID
## Flags
- `-p, --project `: Project ID or project key (required)
- `-n, --name `: New name of the issue type
- `--color `: Change display color {#e30000|#990000|#934981|#814fbc|#2779ca|#007e9a|#7ea800|#ff9200|#ff3265|#666665}
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Rename an issue type
```sh
bee issue-type edit 12345 -p PROJECT -n "New Name"
```
Change issue type color
```sh
bee issue-type edit 12345 -p PROJECT --color "#e30000"
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee issue-type list
List issue types
Issue types categorize issues and are displayed with their associated color.
## Usage
```sh
bee issue-type list [flags] [PROJECT]
```
## Arguments
- `PROJECT`: Project ID or project key
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List all issue types
```sh
bee issue-type list PROJECT
```
Output as JSON
```sh
bee issue-type list PROJECT --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee milestone create
Create a milestone
Omitted fields will be prompted interactively.
## Usage
```sh
bee milestone create [flags]
```
## Flags
- `-p, --project `: Project ID or project key (required)
- `-n, --name `: Milestone name
- `-d, --description `: Milestone description
- `--start-date `: Start date
- `--release-due-date `: Release due date
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Create a milestone
```sh
bee milestone create -p PROJECT -n "v1.0.0"
```
Create with dates
```sh
bee milestone create -p PROJECT -n "v1.0.0" --start-date 2026-04-01 --release-due-date 2026-06-30
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee milestone delete
Delete a milestone
This action is irreversible.
## Usage
```sh
bee milestone delete [flags]
```
## Arguments
- `MILESTONE`: Milestone ID
## Flags
- `-p, --project `: Project ID or project key (required)
- `-y, --yes`: Skip confirmation prompt
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Delete a milestone (with confirmation)
```sh
bee milestone delete 12345 -p PROJECT
```
Delete without confirmation
```sh
bee milestone delete 12345 -p PROJECT --yes
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee milestone edit
Edit a milestone
Only specified fields are updated; others remain unchanged.
## Usage
```sh
bee milestone edit [flags]
```
## Arguments
- `MILESTONE`: Milestone ID
## Flags
- `-p, --project `: Project ID or project key (required)
- `-n, --name `: New name of the milestone
- `-d, --description `: New description of the milestone
- `--start-date `: New start date
- `--release-due-date `: New release due date
- `--archived`: Change whether the milestone is archived
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Rename a milestone
```sh
bee milestone edit 12345 -p PROJECT -n "v2.0.0"
```
Archive a milestone
```sh
bee milestone edit 12345 -p PROJECT --archived
```
Update release date
```sh
bee milestone edit 12345 -p PROJECT --release-due-date 2026-12-31
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee milestone list
List milestones
Milestones (versions) track release schedules and group issues by development cycle.
## Usage
```sh
bee milestone list [flags] [PROJECT]
```
## Arguments
- `PROJECT`: Project ID or project key
## Flags
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List all milestones
```sh
bee milestone list PROJECT
```
Output as JSON
```sh
bee milestone list PROJECT --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
# bee notification count
Count notifications
By default, counts all notifications regardless of read status.
For details, see:
https://developer.nulab.com/docs/backlog/api/2/count-notification/
## Usage
```sh
bee notification count [flags]
```
## Flags
- `--already-read `: Filter by read status. If omitted, count all. {read|unread|all}
- `--resource-already-read `: Filter by resource read status. If omitted, count all. {read|unread|all}
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Count all notifications
```sh
bee notification count
```
Count only unread notifications
```sh
bee notification count --already-read unread
```
Count only read notifications
```sh
bee notification count --already-read read
```
Output as JSON
```sh
bee notification count --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee notification list
List notifications
Unread notifications are marked with `*`. Use `--min-id` / `--max-id` for cursor-based pagination.
## Usage
```sh
bee notification list [flags]
```
## Flags
- `-L, --count `: Number of results (default: 20)
- `--min-id `: Minimum ID for cursor-based pagination
- `--max-id `: Maximum ID for cursor-based pagination
- `--order `: Sort order
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List recent notifications
```sh
bee notification list
```
List the last 5 notifications
```sh
bee notification list --count 5
```
List notifications in ascending order
```sh
bee notification list --order asc
```
Output as JSON
```sh
bee notification list --json
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee notification read-all
Mark all notifications as read
Resets the unread notification count to zero.
## Usage
```sh
bee notification read-all [flags]
```
## Flags
- `-s, --space `: Space hostname
## Examples
Mark all notifications as read
```sh
bee notification read-all
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee notification read
Mark a notification as read
Use `bee notification list` to find notification IDs.
## Usage
```sh
bee notification read [flags]
```
## Arguments
- `ID`: Notification ID
## Flags
- `-s, --space `: Space hostname
## Examples
Mark a notification as read
```sh
bee notification read 12345
```
## Environment variables
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
# bee pr comment
Add a comment to a pull request
When input is piped, it is used as the body automatically.
Use `--list` or `--edit-last` for other comment operations.
## Usage
```sh
bee pr comment [flags]
```
## Arguments
- `NUMBER`: Pull request number
## Flags
- `-p, --project `: Project ID or project key (required)
- `-R, --repo `: Repository name or ID (required)
- `-b, --body `: Comment body
- `--notify `: User IDs to notify (repeatable)
- `--list`: List comments on the pull request
- `--edit-last`: Edit your most recent comment
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Add a comment
```sh
bee pr comment 42 -p PROJECT -R repo -b "Looks good!"
```
Add a comment from stdin
```sh
echo "Comment body" | bee pr comment 42 -p PROJECT -R repo
```
List all comments
```sh
bee pr comment 42 -p PROJECT -R repo --list
```
Edit your last comment
```sh
bee pr comment 42 -p PROJECT -R repo --edit-last -b "Updated"
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_REPO`: Repository name or ID (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
- `BACKLOG_REPO`: Default repository name
# bee pr comments
List comments on a pull request
Displays all comments in chronological order.
## Usage
```sh
bee pr comments [flags]
```
## Arguments
- `NUMBER`: Pull request number
## Flags
- `-p, --project `: Project ID or project key (required)
- `-R, --repo `: Repository name or ID (required)
- `--min-id `: Minimum ID for cursor-based pagination
- `--max-id `: Maximum ID for cursor-based pagination
- `-L, --count `: Number of results (default: 20)
- `--order `: Sort order
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
List pull request comments
```sh
bee pr comments 42 -p PROJECT -R repo
```
Output as JSON
```sh
bee pr comments 42 -p PROJECT -R repo --json
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_REPO`: Repository name or ID (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
- `BACKLOG_REPO`: Default repository name
# bee pr count
Count pull requests
Accepts the same filter flags as `bee pr list`.
## Usage
```sh
bee pr count [flags]
```
## Flags
- `-p, --project `: Project ID or project key (required)
- `-R, --repo `: Repository name or ID (required)
- `-S, --status `: Status name (repeatable)
- `-a, --assignee `: Assignee user ID (repeatable). Use @me for yourself.
- `--issue `: Issue ID (repeatable)
- `--created-user `: Created user ID (repeatable)
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Count all pull requests
```sh
bee pr count -p PROJECT -R repo
```
Count open pull requests
```sh
bee pr count -p PROJECT -R repo --status open
```
Output as JSON
```sh
bee pr count -p PROJECT -R repo --json
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_REPO`: Repository name or ID (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
- `BACKLOG_REPO`: Default repository name
# bee pr create
Create a pull request
Omitted required fields will be prompted interactively.
## Usage
```sh
bee pr create [flags]
```
## Flags
- `-p, --project `: Project ID or project key (required)
- `-R, --repo `: Repository name or ID (required)
- `--base `: Base branch name
- `--head `: Head branch name
- `-t, --title `: Pull request title
- `-b, --body `: Pull request description
- `-a, --assignee `: Assignee user ID. Use @me for yourself.
- `--issue `: Related issue ID or issue key
- `--notify `: User IDs to notify (repeatable)
- `--attachment `: Attachment IDs (repeatable)
- `--json `: Output as JSON (optionally filter by field names, comma-separated)
- `-s, --space `: Space hostname
## Examples
Create a pull request
```sh
bee pr create -p PROJECT -R repo --base main --head feature -t "Add login" -b "Details"
```
Create a pull request assigned to yourself
```sh
bee pr create -p PROJECT -R repo --base main --head feature -t "Title" -b "Desc" --assignee @me
```
Create a pull request linked to an issue
```sh
bee pr create -p PROJECT -R repo --base main --head feature -t "Title" -b "Desc" --issue 123
```
## Environment variables
- `BACKLOG_PROJECT`: Project ID or project key (required)
- `BACKLOG_REPO`: Repository name or ID (required)
- `BACKLOG_SPACE`: Space hostname
- `BACKLOG_API_KEY`: Authenticate with an API key
- `BACKLOG_PROJECT`: Default project ID or project key
- `BACKLOG_REPO`: Default repository name
# bee pr edit
Edit a pull request
Only specified fields are updated; others remain unchanged.
## Usage
```sh
bee pr edit [flags]
```
## Arguments
- `NUMBER`: Pull request number
## Flags
- `-p, --project `: Project ID or project key (required)
- `-R, --repo `: Repository name or ID (required)
- `-t, --title `: New title of the pull request
- `-b, --body `: New description of the pull request
- `--assignee `: New assignee user ID. Use @me for yourself.
- `--issue `: New related issue ID or issue key
- `-c, --comment `: Comment to add with the update
- `--notify