メインコンテンツまでスキップ

コマンド

ルートオプション

以下のオプションはルートの bl コマンドにのみ指定できます。サブコマンドには指定できません。

オプション説明
--bannerBacklog CLI バナーを表示して終了

グローバルオプション

以下のオプションはすべてのサブコマンドで指定できます。

オプション説明
--no-colorカラー出力を無効化
--space <SPACE_KEY>このコマンドのみ対象スペースを上書き
--verbose / -v詳細なログを stderr に出力

bl auth

コマンド説明
bl auth loginBacklog API キーで認証(スペースの追加または更新)。--no-banner でバナーをスキップ
bl auth login-oauthブラウザ経由の OAuth 2.0 で認証。--port <port> でデフォルトのコールバックポート(54321)を変更。--no-banner でバナーをスキップ
bl auth status現在の認証状態を表示して認証情報を検証
bl auth list設定済みスペースを一覧表示
bl auth use <space-key>カレントスペースを切り替え
bl auth keyringシステムキーリングが利用可能か確認
bl auth logout [<space-key>]カレントまたは指定スペースの認証情報を削除
bl auth logout --allすべてのスペースを削除してすべての設定ファイルを削除

bl space

Backlog スペースの情報を表示します。

bl space

出力例:

Space key:  mycompany
Name: My Company
Language: ja
Timezone: Asia/Tokyo
Formatting: markdown
Created: 2020-01-01T00:00:00Z
Updated: 2024-06-01T00:00:00Z

bl space activities

Backlog スペースの最近のアクティビティを表示します。

bl space activities
bl space activities --json

出力例:

[123] type=1 project=TEST user=John Doe created=2024-06-01T00:00:00Z
[124] type=2 project=TEST user=Jane Smith created=2024-06-02T00:00:00Z

bl space disk-usage

Backlog スペースのディスク使用量を表示します。 スペース管理者権限が必要です。管理者以外のユーザーには 403 Forbidden が返されます。

bl space disk-usage
bl space disk-usage --json

出力例:

Capacity:   5242880 bytes
Issue: 2048 bytes
Wiki: 512 bytes
File: 1024 bytes
Subversion: 64 bytes
Git: 256 bytes
Git LFS: 128 bytes
Details: 3 project(s) — use --json for breakdown

bl space notification

Backlog スペースに設定された通知メッセージを表示します。

bl space notification
bl space notification --json

出力例:

Updated: 2024-06-18T07:55:37Z

Scheduled maintenance on 2024-07-01.

通知が設定されていない場合:

Updated: (not set)

(no notification set)

bl project list

アクセス可能なプロジェクトを一覧表示します。

bl project list
bl project list --json

出力例:

[TEST] Test Project
[PROD] Production [archived]

bl project show

特定のプロジェクトの詳細を表示します。

bl project show <id-or-key>
bl project show <id-or-key> --json

出力例:

ID:         1
Key: TEST
Name: Test Project
Formatting: markdown
Archived: false

bl project activities

特定のプロジェクトの最近のアクティビティを表示します。

bl project activities <id-or-key>
bl project activities <id-or-key> --json

出力例:

[123] type=1 project=TEST user=John Doe created=2024-06-01T00:00:00Z

bl project disk-usage

特定のプロジェクトのディスク使用量を表示します。 スペース管理者権限が必要です。管理者以外のユーザーには 403 Forbidden が返されます。

bl project disk-usage <id-or-key>
bl project disk-usage <id-or-key> --json

出力例:

Issue:      2048 bytes
Wiki: 512 bytes
Document: 0 bytes
File: 1024 bytes
Subversion: 64 bytes
Git: 256 bytes
Git LFS: 128 bytes

bl project user list

特定のプロジェクトのメンバーを一覧表示します。

bl project user list <id-or-key>
bl project user list <id-or-key> --json

出力例:

[john] John Doe
[jane] Jane Smith

bl project status list

特定のプロジェクトの課題ステータスを一覧表示します。

bl project status list <id-or-key>
bl project status list <id-or-key> --json

出力例:

[1] Open
[2] In Progress
[3] Resolved
[4] Closed

bl project issue-type list

特定のプロジェクトの課題種別を一覧表示します。

bl project issue-type list <id-or-key>
bl project issue-type list <id-or-key> --json

出力例:

[1] Bug
[2] Task
[3] Feature Request

bl project category list

特定のプロジェクトのカテゴリーを一覧表示します。

bl project category list <id-or-key>
bl project category list <id-or-key> --json

出力例:

[11] Development
[12] Design

bl project version list

特定のプロジェクトのバージョン(マイルストーン)を一覧表示します。

bl project version list <id-or-key>
bl project version list <id-or-key> --json

出力例:

[3] Version 0.1 (2024-01-01T00:00:00Z → 2024-01-31T00:00:00Z)
[4] Version 0.2 [archived]

bl issue list

オプションのフィルターで課題を一覧表示します。

bl issue list
bl issue list --project-id 1 --status-id 1
bl issue list --issue-type-id 1 --category-id 2 --milestone-id 3
bl issue list --parent-child not-child --keyword "login" --count 50
bl issue list --json

--parent-child の値: allnot-childchildstandaloneparent

出力例:

[TEST-1] Fix login issue (Open, Normal, -)
[TEST-2] Add dark mode (In Progress, Normal, John Doe)

bl issue count

オプションのフィルターで課題数をカウントします。bl issue list と同じフィルターを使用できます。

bl issue count
bl issue count --project-id 1 --issue-type-id 1 --parent-child not-child --json

出力例:

42

bl issue show

特定の課題の詳細を表示します。

bl issue show <id-or-key>
bl issue show TEST-1 --json

出力例:

TEST-1 Fix login issue
Status: Open
Priority: Normal
Type: Bug
Assignee: -
Created: 2024-01-01T00:00:00Z
Updated: 2024-06-01T00:00:00Z

bl issue create

新しい課題を作成します。--project-id--summary--issue-type-id--priority-id が必須です。

bl issue create --project-id 1 --summary "Fix login" --issue-type-id 1 --priority-id 2
bl issue create --project-id 1 --summary "Bug" --issue-type-id 1 --priority-id 2 \
--description "Details..." --assignee-id 123 --due-date 2024-12-31 --json

優先度 ID: 1 = 高、2 = 中、3 = 低

bl issue update

既存の課題を更新します。すべてのフィールドはオプションです。

bl issue update TEST-1 --summary "Updated summary"
bl issue update TEST-1 --status-id 2 --comment "Fixed in v1.2" --json

bl issue delete

課題を削除します。

bl issue delete TEST-1
bl issue delete TEST-1 --json

出力例:

Deleted: TEST-1

bl issue comment list

課題のコメントを一覧表示します。

bl issue comment list TEST-1
bl issue comment list TEST-1 --json

出力例:

[1] John Doe (2024-01-01T00:00:00Z): Fixed the issue.
[2] Jane Smith (2024-01-02T00:00:00Z): Confirmed.

bl issue comment add

課題にコメントを追加します。

bl issue comment add TEST-1 --content "This is a comment"
bl issue comment add TEST-1 --content "Done" --json

bl issue comment update

既存のコメントを更新します。

bl issue comment update TEST-1 42 --content "Updated comment"
bl issue comment update TEST-1 42 --content "Fixed" --json

bl issue comment delete

コメントを削除します。

bl issue comment delete TEST-1 42
bl issue comment delete TEST-1 42 --json

bl issue attachment list

課題の添付ファイルを一覧表示します。

bl issue attachment list TEST-1
bl issue attachment list TEST-1 --json

出力例:

[1] screenshot.png (204800 bytes)
[2] log.txt (1024 bytes)

bl wiki list

プロジェクトの Wiki ページを一覧表示します。

bl wiki list TEST
bl wiki list TEST --keyword setup
bl wiki list TEST --json

出力例:

Home [guide, onboarding]
Setup
API Reference

bl wiki show

Wiki ページの内容を表示します。

bl wiki show 12345
bl wiki show 12345 --json

出力例:

Home
Tags: guide, onboarding
Created: 2024-01-01T00:00:00Z
Updated: 2024-06-01T00:00:00Z

# Home
Welcome to the project wiki!

bl wiki create

新しい Wiki ページを作成します。

bl wiki create --project-id 1 --name "Setup" --content "# Setup\nSee README."
bl wiki create --project-id 1 --name "Setup" --content "# Setup" --mail-notify --json

bl wiki update

既存の Wiki ページを更新します。--name または --content のいずれかが必須です。

bl wiki update 12345 --content "# Updated content"
bl wiki update 12345 --name "New Title" --content "New content" --mail-notify
bl wiki update 12345 --name "Renamed" --json

bl wiki delete

Wiki ページを削除します。

bl wiki delete 12345
bl wiki delete 12345 --mail-notify --json

bl wiki history

Wiki ページの変更履歴を表示します。

bl wiki history 12345
bl wiki history 12345 --json

出力例:

v3 Home — 2024-06-01T00:00:00Z
v2 Home — 2024-03-15T00:00:00Z
v1 Home — 2024-01-01T00:00:00Z

bl wiki attachment list

Wiki ページの添付ファイルを一覧表示します。

bl wiki attachment list 12345
bl wiki attachment list 12345 --json

出力例:

[1] diagram.png (204800 bytes)
[2] notes.txt (1024 bytes)

bl team list

スペース内のチームを一覧表示します。

bl team list
bl team list --json

出力例:

[1] dev-team (3 members)
[2] design-team (2 members)

bl team show

特定のチームの詳細を表示します。 スペースの設定によっては 403 Forbidden が返ることがあります。

bl team show <id>
bl team show <id> --json

出力例:

ID:      1
Name: dev-team
Created: 2024-01-01T00:00:00Z
Updated: 2024-06-01T00:00:00Z
Members:
[2] Developer
[3] Engineer

bl user activities

特定のユーザーの最近のアクティビティを表示します。

bl user activities <id>
bl user activities <id> --json

出力例:

[3153] type=2 project=SUB user=admin created=2024-06-01T00:00:00Z

bl user recently-viewed

認証ユーザーが最近閲覧した課題を表示します。

bl user recently-viewed
bl user recently-viewed --json

出力例:

[BLG-1] Fix login (Open, -)
[BLG-2] Add dark mode (In Progress, John Doe)

bl user list

スペース内のユーザーを一覧表示します。 Space Administrator 権限が必要です。権限がない場合は 403 Forbidden が返ります。

bl user list
bl user list --json

出力例:

[john] John Doe
[jane] Jane Smith
[12345] Bot User

bl user show

数値 ID でユーザーの詳細を表示します。

bl user show <id>
bl user show <id> --json

出力例:

ID:           123
User ID: john
Name: John Doe
Mail: john@example.com
Role: 1
Lang: ja
Last login: 2024-06-01T00:00:00Z

コマンドカバレッジ

Backlog API v2 エンドポイントと bl コマンドの対応表です。

Space

コマンドAPI エンドポイント状態
bl spaceGET /api/v2/space✅ 実装済み
bl space activitiesGET /api/v2/space/activities✅ 実装済み
bl space disk-usageGET /api/v2/space/diskUsage✅ 実装済み
bl space notificationGET /api/v2/space/notification✅ 実装済み

Projects

コマンドAPI エンドポイント状態
bl project listGET /api/v2/projects✅ 実装済み
bl project show <id-or-key>GET /api/v2/projects/{projectIdOrKey}✅ 実装済み
bl project activities <id-or-key>GET /api/v2/projects/{projectIdOrKey}/activities✅ 実装済み
bl project disk-usage <id-or-key>GET /api/v2/projects/{projectIdOrKey}/diskUsage✅ 実装済み
bl project user list <id-or-key>GET /api/v2/projects/{projectIdOrKey}/users✅ 実装済み
bl project status list <id-or-key>GET /api/v2/projects/{projectIdOrKey}/statuses✅ 実装済み
bl project issue-type list <id-or-key>GET /api/v2/projects/{projectIdOrKey}/issueTypes✅ 実装済み
bl project category list <id-or-key>GET /api/v2/projects/{projectIdOrKey}/categories✅ 実装済み
bl project version list <id-or-key>GET /api/v2/projects/{projectIdOrKey}/versions✅ 実装済み

Issues

コマンドAPI エンドポイント状態
bl issue listGET /api/v2/issues✅ 実装済み
bl issue countGET /api/v2/issues/count✅ 実装済み
bl issue show <id-or-key>GET /api/v2/issues/{issueIdOrKey}✅ 実装済み
bl issue createPOST /api/v2/issues✅ 実装済み
bl issue update <id-or-key>PATCH /api/v2/issues/{issueIdOrKey}✅ 実装済み
bl issue delete <id-or-key>DELETE /api/v2/issues/{issueIdOrKey}✅ 実装済み
bl issue comment list <id-or-key>GET /api/v2/issues/{issueIdOrKey}/comments✅ 実装済み
bl issue comment add <id-or-key>POST /api/v2/issues/{issueIdOrKey}/comments✅ 実装済み
bl issue comment update <id-or-key> <comment-id>PATCH /api/v2/issues/{issueIdOrKey}/comments/{commentId}✅ 実装済み
bl issue comment delete <id-or-key> <comment-id>DELETE /api/v2/issues/{issueIdOrKey}/comments/{commentId}✅ 実装済み
bl issue attachment list <id-or-key>GET /api/v2/issues/{issueIdOrKey}/attachments✅ 実装済み

Wiki

コマンドAPI エンドポイント状態
bl wiki listGET /api/v2/wikis✅ 実装済み
bl wiki show <id>GET /api/v2/wikis/{wikiId}✅ 実装済み
bl wiki createPOST /api/v2/wikis✅ 実装済み
bl wiki update <id>PATCH /api/v2/wikis/{wikiId}✅ 実装済み
bl wiki delete <id>DELETE /api/v2/wikis/{wikiId}✅ 実装済み
bl wiki history <id>GET /api/v2/wikis/{wikiId}/history✅ 実装済み
bl wiki attachment list <id>GET /api/v2/wikis/{wikiId}/attachments✅ 実装済み

Pull Requests

コマンドAPI エンドポイント状態
bl pr listGET /api/v2/projects/{projectIdOrKey}/pullRequests計画中
bl pr show <number>GET /api/v2/projects/{projectIdOrKey}/pullRequests/{number}計画中
bl pr createPOST /api/v2/projects/{projectIdOrKey}/pullRequests計画中
bl pr update <number>PUT /api/v2/projects/{projectIdOrKey}/pullRequests/{number}計画中
bl pr comment list <number>GET /api/v2/projects/{projectIdOrKey}/pullRequests/{number}/comments計画中
bl pr comment add <number>POST /api/v2/projects/{projectIdOrKey}/pullRequests/{number}/comments計画中
bl pr comment update <number> <comment-id>PUT /api/v2/projects/{projectIdOrKey}/pullRequests/{number}/comments/{commentId}計画中

Git Repositories

コマンドAPI エンドポイント状態
bl git repo listGET /api/v2/projects/{projectIdOrKey}/repositories計画中
bl git repo show <repo>GET /api/v2/projects/{projectIdOrKey}/repositories/{repoId}計画中

Users

コマンドAPI エンドポイント状態
bl auth statusGET /api/v2/users/myself✅ 実装済み(内部)
bl user listGET /api/v2/users✅ 実装済み
bl user show <id>GET /api/v2/users/{userId}✅ 実装済み
bl user activities <id>GET /api/v2/users/{userId}/activities✅ 実装済み
bl user recently-viewedGET /api/v2/users/myself/recentlyViewedIssues✅ 実装済み

Notifications

コマンドAPI エンドポイント状態
bl notification listGET /api/v2/notifications計画中
bl notification read <id>PUT /api/v2/notifications/{notificationId}計画中
bl notification read-allDELETE /api/v2/notifications/unread計画中

Watching

コマンドAPI エンドポイント状態
bl watch listGET /api/v2/watching計画中
bl watch addPOST /api/v2/watching計画中
bl watch delete <id>DELETE /api/v2/watching/{watchingId}計画中

Teams

コマンドAPI エンドポイント状態
bl team listGET /api/v2/teams✅ 実装済み
bl team show <id>GET /api/v2/teams/{teamId}✅ 実装済み