# 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 `: User IDs to notify (repeatable) - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Update pull request title ```sh bee pr edit 42 -p PROJECT -R repo -t "New title" ``` Change assignee ```sh bee pr edit 42 -p PROJECT -R repo --assignee 12345 ``` Add a comment with the update ```sh bee pr edit 42 -p PROJECT -R repo -t "New title" --comment "Updated title" ``` ## 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 list List pull requests Use `--status` to filter by status (open, closed, merged). ## Usage ```sh bee pr list [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) - `-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 pull requests ```sh bee pr list -p PROJECT -R repo ``` List open pull requests only ```sh bee pr list -p PROJECT -R repo --status open ``` List your assigned pull requests ```sh bee pr list -p PROJECT -R repo --assignee @me ``` Output as JSON ```sh bee pr list -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 status Show pull request status summary for yourself Displays your assigned pull requests grouped by status (Open, Closed, Merged). ## Usage ```sh bee pr status [flags] ``` ## Flags - `-p, --project `: Project ID or project key (required) - `-R, --repo `: Repository name or ID (required) - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Show your pull request status summary ```sh bee pr status -p PROJECT -R repo ``` Output as JSON ```sh bee pr status -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 view View a pull request Use `--web` to open in the browser. ## Usage ```sh bee pr view [flags] ``` ## Arguments - `NUMBER`: Pull request number ## Flags - `-p, --project `: Project ID or project key (required) - `-R, --repo `: Repository name or ID (required) - `-w, --web`: Open the pull request 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 pull request details ```sh bee pr view 42 -p PROJECT -R repo ``` Open pull request in browser ```sh bee pr view 42 -p PROJECT -R repo --web ``` Output as JSON ```sh bee pr view 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 project activities List project activities Results are ordered by most recent first. Use `--activity-type` to filter by type. For activity type IDs, see: https://developer.nulab.com/docs/backlog/api/2/get-project-recent-updates/#response-description ## Usage ```sh bee project activities [flags] ``` ## Arguments - `PROJECT`: Project ID or project key ## Flags - `--activity-type `: Filter by activity type IDs (repeatable) - `-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 recent activities ```sh bee project activities PROJECT_KEY ``` Show only issue-related activities ```sh bee project activities PROJECT_KEY --activity-type 1 --activity-type 2 --activity-type 3 ``` Show last 50 activities ```sh bee project activities PROJECT_KEY --count 50 ``` Output as JSON ```sh bee project activities PROJECT_KEY --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee project add-user Add a user to a project Use `bee project users` to look up user IDs. ## Usage ```sh bee project add-user [flags] ``` ## Flags - `-p, --project `: Project ID or project key (required) - `--user-id `: User ID (required) - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Add a user to a project ```sh bee project add-user -p PROJECT_KEY --user-id 12345 ``` ## 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 project create Create a project Project key must consist of uppercase letters, numbers, and underscores. Omitted fields will be prompted interactively. ## Usage ```sh bee project create [flags] ``` ## Flags - `-k, --key `: Project key - `-n, --name `: Project name - `--chart-enabled`: Enable chart - `--subtasking-enabled`: Enable subtasking - `--project-leader-can-edit-project-leader`: Allow project administrators to manage each other - `--text-formatting-rule `: Formatting rules - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Create a project with key and name ```sh bee project create --key TEST --name "Test Project" ``` Create a project with markdown formatting ```sh bee project create --key TEST --name "Test Project" --text-formatting-rule markdown ``` Create a project interactively ```sh bee project create ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee project delete Delete a project This action is irreversible. Requires Administrator role. ## Usage ```sh bee project delete [flags] ``` ## Arguments - `PROJECT`: Project ID or project key ## Flags - `-y, --yes`: Skip confirmation prompt - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Delete a project (with confirmation) ```sh bee project delete PROJECT_KEY ``` Delete a project without confirmation ```sh bee project delete PROJECT_KEY --yes ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee project edit Edit a project Only specified fields are updated; others remain unchanged. ## Usage ```sh bee project edit [flags] ``` ## Arguments - `PROJECT`: Project ID or project key ## Flags - `-n, --name `: New name of the project - `-k, --key `: New key of the project - `--chart-enabled`: Change whether the chart is enabled - `--subtasking-enabled`: Change whether subtasking is enabled - `--project-leader-can-edit-project-leader`: Change whether project administrators can manage each other - `--text-formatting-rule `: Change text formatting rule - `--archived`: Change whether the project is archived - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Rename a project ```sh bee project edit PROJECT_KEY --name "New Name" ``` Archive a project ```sh bee project edit PROJECT_KEY --archived ``` Change formatting rule to markdown ```sh bee project edit PROJECT_KEY --text-formatting-rule markdown ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee project list List projects By default, only active (non-archived) projects are shown. Use `--all` to list all projects in the space (admin only). ## Usage ```sh bee project list [flags] ``` ## Flags - `--archived`: Include archived projects - `--all`: Include all projects (admin only) - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List your active projects ```sh bee project list ``` Include archived projects ```sh bee project list --archived ``` List all projects (admin only) ```sh bee project list --all ``` Output as JSON ```sh bee project list --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee project remove-user Remove a user from a project Use `bee project users` to look up user IDs. ## Usage ```sh bee project remove-user [flags] ``` ## Flags - `-p, --project `: Project ID or project key (required) - `--user-id `: User ID (required) - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Remove a user from a project ```sh bee project remove-user -p PROJECT_KEY --user-id 12345 ``` ## 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 project users List project users Displays each member's ID, name, and role. ## Usage ```sh bee project users [flags] ``` ## 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 project members ```sh bee project users PROJECT_KEY ``` Output as JSON ```sh bee project users PROJECT_KEY --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee project view View a project Use `--web` to open in the browser. ## Usage ```sh bee project view [flags] ``` ## Arguments - `PROJECT`: Project ID or project key ## Flags - `-w, --web`: Open the project 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 project details ```sh bee project view PROJECT_KEY ``` Open project in browser ```sh bee project view PROJECT_KEY --web ``` Output as JSON ```sh bee project view PROJECT_KEY --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee repo clone Clone a repository By default the SSH URL is used; pass `--http` to clone over HTTPS instead. ## Usage ```sh bee repo clone [flags] ``` ## Arguments - `REPOSITORY`: Repository name or ID ## Flags - `-p, --project `: Project ID or project key (required) - `-d, --directory `: Directory to clone into - `--http`: Clone using HTTP URL instead of SSH - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Clone a repository ```sh bee repo clone api-server -p PROJECT_KEY ``` Clone to a specific directory ```sh bee repo clone api-server -p PROJECT_KEY --directory ./dest ``` Clone using HTTP URL ```sh bee repo clone api-server -p PROJECT_KEY --http ``` ## 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 repo list List repositories in a project Repositories are listed in the configured display order. ## Usage ```sh bee repo list [flags] ``` ## 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 repositories in a project ```sh bee repo list PROJECT_KEY ``` Output as JSON ```sh bee repo list PROJECT_KEY --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee repo view View a repository Use `--web` to open in the browser. ## Usage ```sh bee repo view [flags] ``` ## Arguments - `REPOSITORY`: Repository name or ID ## Flags - `-p, --project `: Project ID or project key (required) - `-w, --web`: Open the repository 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 repository details ```sh bee repo view api-server -p PROJECT_KEY ``` Open repository in browser ```sh bee repo view api-server -p PROJECT_KEY --web ``` Output as JSON ```sh bee repo view api-server -p PROJECT_KEY --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 space activities List space activities Results are ordered by most recent first. Use `--activity-type` to filter by type. For activity type IDs, see: https://developer.nulab.com/docs/backlog/api/2/get-recent-updates/#response-description ## Usage ```sh bee space activities [flags] ``` ## Flags - `--activity-type `: Filter by activity type IDs (repeatable) - `-L, --count `: Number of results (default: 20) - `--order `: Sort order - `--min-id `: Minimum ID for cursor-based pagination - `--max-id `: Maximum ID for cursor-based pagination - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List space activities ```sh bee space activities ``` Show only issue-related activities ```sh bee space activities --activity-type 1 --activity-type 2 --activity-type 3 ``` Show last 50 activities ```sh bee space activities --count 50 ``` Output as JSON ```sh bee space activities --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee star add Add a star Specify exactly one target: `--issue` (accepts key or ID), `--comment`, `--wiki`, or `--pr-comment`. ## Usage ```sh bee star add [flags] ``` ## Flags - `--issue `: Issue ID or issue key - `--comment `: Comment ID to star - `--wiki `: Wiki page ID to star - `--pr-comment `: Pull request comment ID to star - `-s, --space `: Space hostname ## Examples Star an issue by key ```sh bee star add --issue PROJECT-123 ``` Star an issue by ID ```sh bee star add --issue 12345 ``` Star a comment ```sh bee star add --comment 67890 ``` Star a wiki page ```sh bee star add --wiki 111 ``` Star a pull request comment ```sh bee star add --pr-comment 222 ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee star count Count received stars Defaults to the authenticated user if no user ID is given. ## Usage ```sh bee star count [flags] [USER] ``` ## Arguments - `USER`: User ID ## Flags - `--since `: Count stars received on or after this date - `--until `: Count stars received on or before this date - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Count your stars ```sh bee star count ``` Count stars for a specific user ```sh bee star count 12345 ``` Count stars in a date range ```sh bee star count --since 2025-01-01 --until 2025-12-31 ``` Output as JSON ```sh bee star count --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee star list List received stars Defaults to the authenticated user if no user ID is given. ## Usage ```sh bee star list [flags] [USER] ``` ## Arguments - `USER`: User ID ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List your stars ```sh bee star list ``` List stars for a specific user ```sh bee star list 12345 ``` Output as JSON ```sh bee star list --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee star remove Remove a star Use `bee star list` to find star IDs. ## Usage ```sh bee star remove [flags] ``` ## Arguments - `STAR`: Star ID ## Flags - `-s, --space `: Space hostname ## Examples Remove a star ```sh bee star remove 12345 ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee status create Create a status Omitted fields will be prompted interactively. ## Usage ```sh bee status create [flags] ``` ## Flags - `-p, --project `: Project ID or project key (required) - `-n, --name `: Status name - `--color `: Display color {#ea2c00|#e87758|#e07b9a|#868cb7|#3b9dbd|#4caf93|#b0be3c|#eda62a|#f42858|#393939} - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Create a status ```sh bee status create -p PROJECT -n "In Review" --color "#3b9dbd" ``` Create interactively ```sh bee status create -p PROJECT --color "#3b9dbd" ``` ## 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 status delete Delete a status All issues with this status are reassigned to the substitute status. This action is irreversible. ## Usage ```sh bee status delete [flags] ``` ## Arguments - `STATUS`: Status ID ## Flags - `-p, --project `: Project ID or project key (required) - `--substitute-status-id `: Replacement status 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 a status ```sh bee status delete 12345 -p PROJECT --substitute-status-id 67890 ``` Delete without confirmation ```sh bee status delete 12345 -p PROJECT --substitute-status-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 status edit Edit a status Only specified fields are updated; others remain unchanged. ## Usage ```sh bee status edit [flags] ``` ## Arguments - `STATUS`: Status ID ## Flags - `-p, --project `: Project ID or project key (required) - `-n, --name `: New name of the status - `--color `: Change display color {#ea2c00|#e87758|#e07b9a|#868cb7|#3b9dbd|#4caf93|#b0be3c|#eda62a|#f42858|#393939} - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Rename a status ```sh bee status edit 12345 -p PROJECT -n "New Name" ``` Change status color ```sh bee status 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 status list List statuses Statuses define the workflow states that issues move through. ## Usage ```sh bee status 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 statuses ```sh bee status list PROJECT ``` Output as JSON ```sh bee status 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 team list List teams Teams are groups of users that can be assigned to projects collectively. ## Usage ```sh bee team list [flags] ``` ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `--order `: Sort order - `--offset `: Offset for pagination - `-L, --count `: Number of results (default: 20) - `-s, --space `: Space hostname ## Examples List all teams ```sh bee team list ``` List teams in descending order ```sh bee team list --order desc ``` Output as JSON ```sh bee team list --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee team view View a team Shows team details and the list of members. ## Usage ```sh bee team view [flags] ``` ## Arguments - `TEAM`: Team ID ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples View team details ```sh bee team view 12345 ``` Output as JSON ```sh bee team view 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee user activities List user activities Results are ordered by most recent first. Use `--activity-type` to filter by type. For activity type IDs, see: https://developer.nulab.com/docs/backlog/api/2/get-user-recent-updates/#response-description ## Usage ```sh bee user activities [flags] ``` ## Arguments - `USER`: User ID ## Flags - `--activity-type `: Filter by activity type IDs (repeatable) - `-L, --count `: Number of results (default: 20) - `--order `: Sort order - `--min-id `: Minimum ID for cursor-based pagination - `--max-id `: Maximum ID for cursor-based pagination - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List user activities ```sh bee user activities 12345 ``` Show only issue-related activities ```sh bee user activities 12345 --activity-type 1 --activity-type 2 --activity-type 3 ``` Show last 50 activities ```sh bee user activities 12345 --count 50 ``` Output as JSON ```sh bee user activities 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee user list List users Only space administrators can see the full list of users. ## Usage ```sh bee user list [flags] ``` ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List all users ```sh bee user list ``` Output as JSON ```sh bee user list --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee user me View the authenticated user Shortcut for `bee user view` using the currently authenticated user. ## Usage ```sh bee user me [flags] ``` ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples View your own profile ```sh bee user me ``` Output as JSON ```sh bee user me --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee user view View a user Use `bee user me` as a shortcut to view your own profile. ## Usage ```sh bee user view [flags] ``` ## Arguments - `USER`: User ID ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples View user details ```sh bee user view 12345 ``` Output as JSON ```sh bee user view 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee watching add Add a watching item Subscribe to an issue to receive update notifications. ## Usage ```sh bee watching add [flags] ``` ## Flags - `--issue `: Issue ID or issue key - `--note `: Note to attach to the watching item - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Watch an issue ```sh bee watching add --issue PROJECT-123 ``` Watch an issue with a note ```sh bee watching add --issue PROJECT-123 --note "Track progress" ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee watching delete Delete a watching item Removes the issue from your watching list. You will no longer receive update notifications. ## Usage ```sh bee watching delete [flags] ``` ## Arguments - `WATCHING`: Watching 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 watching item (with confirmation) ```sh bee watching delete 12345 ``` Delete without confirmation ```sh bee watching delete 12345 --yes ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee watching list List watching items Unread items are marked with an asterisk (`*`). ## Usage ```sh bee watching list [flags] ``` ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List your watching items ```sh bee watching list ``` Output as JSON ```sh bee watching list --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee watching read Mark a watching item as read Use `bee watching list` to find watching IDs. ## Usage ```sh bee watching read [flags] ``` ## Arguments - `WATCHING`: Watching ID ## Flags - `-s, --space `: Space hostname ## Examples Mark a watching item as read ```sh bee watching read 12345 ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee watching view View a watching item Shows the associated issue, note, read status, and timestamps. ## Usage ```sh bee watching view [flags] ``` ## Arguments - `WATCHING`: Watching ID ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples View a watching item ```sh bee watching view 12345 ``` Output as JSON ```sh bee watching view 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee wiki attachments List wiki page attachments Shows file name, size, creator, and creation date. ## Usage ```sh bee wiki attachments [flags] ``` ## Arguments - `WIKI`: Wiki page ID ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List wiki attachments ```sh bee wiki attachments 12345 ``` Output as JSON ```sh bee wiki attachments 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee wiki count Count wiki pages Counts all wiki pages regardless of tag or keyword. ## Usage ```sh bee wiki count [flags] ``` ## Arguments - `PROJECT`: Project ID or project key ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Count wiki pages ```sh bee wiki count PROJECT ``` Output as JSON ```sh bee wiki count 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 wiki create Create a wiki page When input is piped, it is used as the body automatically. ## Usage ```sh bee wiki create [flags] ``` ## Flags - `-p, --project `: Project ID or project key - `-n, --name `: Wiki page name - `-b, --body `: Wiki page content - `--mail-notify`: Send notification email - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Create a wiki page ```sh bee wiki create -p PROJECT -n "Page Name" -b "Content" ``` Create a wiki page from stdin ```sh echo "Body" | bee wiki create -p PROJECT -n "Name" ``` Create and send notification email ```sh bee wiki create -p PROJECT -n "Name" -b "Content" --mail-notify ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key - `BACKLOG_PROJECT`: Default project ID or project key # bee wiki delete Delete a wiki page This action is irreversible. ## Usage ```sh bee wiki delete [flags] ``` ## Arguments - `WIKI`: Wiki page ID ## Flags - `-y, --yes`: Skip confirmation prompt - `--mail-notify`: Send notification email - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Delete a wiki page (with confirmation) ```sh bee wiki delete 12345 ``` Delete a wiki page without confirmation ```sh bee wiki delete 12345 --yes ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee wiki edit Edit a wiki page Only specified fields are updated. When input is piped, it is used as the body automatically. ## Usage ```sh bee wiki edit [flags] ``` ## Arguments - `WIKI`: Wiki page ID ## Flags - `-n, --name `: New name of the wiki page - `-b, --body `: New content of the wiki page - `--mail-notify`: Send notification email - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples Update wiki page name ```sh bee wiki edit 12345 -n "New Name" ``` Update wiki page body ```sh bee wiki edit 12345 -b "New content" ``` Update body from stdin ```sh echo "New content" | bee wiki edit 12345 ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee wiki history View wiki page history Shows version number, updater, and update date for each revision. ## Usage ```sh bee wiki history [flags] ``` ## Arguments - `WIKI`: Wiki page ID ## Flags - `--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 View wiki page history ```sh bee wiki history 12345 ``` View history in ascending order ```sh bee wiki history 12345 --order asc ``` Output as JSON ```sh bee wiki history 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee wiki list List wiki pages Use `--keyword` to filter pages by name or content. ## Usage ```sh bee wiki list [flags] ``` ## Arguments - `PROJECT`: Project ID or project key ## Flags - `-k, --keyword `: Keyword search - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-s, --space `: Space hostname ## Examples List all wiki pages in a project ```sh bee wiki list PROJECT ``` Search wiki pages by keyword ```sh bee wiki list PROJECT --keyword "setup" ``` Output as JSON ```sh bee wiki 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 wiki tags List wiki tags Tags are labels attached to wiki pages for organization. ## Usage ```sh bee wiki tags [flags] ``` ## 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 wiki tags ```sh bee wiki tags PROJECT ``` Output as JSON ```sh bee wiki tags 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 wiki view View a wiki page Use `--web` to open in the browser. ## Usage ```sh bee wiki view [flags] ``` ## Arguments - `WIKI`: Wiki page ID ## Flags - `-w, --web`: Open the wiki page 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 a wiki page ```sh bee wiki view 12345 ``` Open wiki page in browser ```sh bee wiki view 12345 --web ``` Output as JSON ```sh bee wiki view 12345 --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee api Make an authenticated API request The endpoint is a Backlog API path (e.g. `users/myself`). A leading `/api/v2/` prefix is stripped automatically. `-f` infers types (number, boolean, string); `-F` always sends strings. Repeated keys become arrays. Append `[]` for a single-element array (e.g. `-f projectId[]=12345`). For GET, fields are query parameters. For POST/PUT/PATCH/DELETE, fields are the request body. ## Usage ```sh bee api [flags] ``` ## Arguments - `ENDPOINT`: API endpoint path ## Flags - `-X, --method `: HTTP method (default: `GET`) - `-f, --field `: Add a parameter with type inference (key=value, repeatable) - `-F, --raw-field `: Add a string parameter (key=value, repeatable) - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `--silent`: Do not print the response body - `-s, --space `: Space hostname ## Examples Get your user profile ```sh bee api users/myself ``` List issues in a project ```sh bee api issues -f 'projectId[]=12345' -f count=5 ``` Filter by multiple statuses ```sh bee api issues -f 'projectId[]=12345' -f statusId=1 -f statusId=2 ``` Create an issue ```sh bee api issues -X POST -f projectId=12345 -f summary="Test issue" -f issueTypeId=1 -f priorityId=3 ``` Select specific fields ```sh bee api users/myself --json id,name,mailAddress ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key # bee browse Open a Backlog page in the browser With no arguments, opens the repository page (inside a Backlog repo) or the dashboard. Accepts an issue key (`PROJECT-123`), bare number (`123`, project inferred from Git remote), file path (`src/main.ts`), or path with line (`src/main.ts:42`). Paths ending with `/` open the directory tree. Use `--project` with section flags (e.g. `--issues`, `--board`) for project pages. ## Usage ```sh bee browse [flags] [TARGET] ``` ## Arguments - `TARGET`: Issue key, issue number, file path, or project key ## Flags - `-p, --project `: Project ID or project key (required) - `-b, --branch `: View file at a specific branch - `-c, --commit`: View file at the latest commit - `-n, --no-browser`: Print the URL instead of opening the browser - `--issues`: Open the issues page - `--board`: Open the board page - `--gantt`: Open the Gantt chart page - `--wiki`: Open the wiki page - `--documents`: Open the documents page - `--files`: Open the shared files page - `--git`: Open the git repositories page - `--svn`: Open the Subversion page - `--settings`: Open the project settings page - `-s, --space `: Space hostname ## Examples Open repository page (in a Backlog repo) ```sh bee browse ``` Open dashboard (outside a Backlog repo) ```sh bee browse ``` Open an issue ```sh bee browse PROJECT-123 ``` Open issue by number (inferred project) ```sh bee browse 123 ``` Open a file in git viewer ```sh bee browse src/main.ts ``` Open a file at a specific line ```sh bee browse src/main.ts:42 ``` Open a directory in git viewer ```sh bee browse src/ ``` Browse at a specific branch ```sh bee browse src/main.ts -b develop ``` Browse at the latest commit ```sh bee browse -c ``` Print URL without opening browser ```sh bee browse -n ``` Open project issues page ```sh bee browse -p PROJECT --issues ``` Open project board ```sh bee browse -p PROJECT --board ``` Open Gantt chart ```sh bee browse -p PROJECT --gantt ``` ## 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 completion Generate shell completion scripts Supported shells: bash, zsh, fish. Source the output in your shell configuration. ## Usage ```sh bee completion ``` ## Arguments - `SHELL`: Shell to generate completions for ## Examples Set up completions for bash (add to ~/.bashrc) ```sh echo 'eval "$(bee completion bash)"' >> ~/.bashrc ``` Set up completions for zsh (add to ~/.zshrc) ```sh echo 'eval "$(bee completion zsh)"' >> ~/.zshrc ``` Set up completions for fish ```sh bee completion fish > ~/.config/fish/completions/bee.fish ``` # bee dashboard Show a summary of your Backlog activity Displays assigned issues, unread notifications, and projects. Use `--web` to open in the browser. ## Usage ```sh bee dashboard [flags] ``` ## Flags - `--json `: Output as JSON (optionally filter by field names, comma-separated) - `-w, --web`: Open the dashboard in the browser - `-n, --no-browser`: Print the URL instead of opening the browser - `-s, --space `: Space hostname ## Examples Show dashboard ```sh bee dashboard ``` Open dashboard in browser ```sh bee dashboard --web ``` Output as JSON ```sh bee dashboard --json ``` ## Environment variables - `BACKLOG_SPACE`: Space hostname - `BACKLOG_API_KEY`: Authenticate with an API key