diff --git a/docs/astro.config.ts b/docs/astro.config.ts index 7702ec6..3ff0a36 100644 --- a/docs/astro.config.ts +++ b/docs/astro.config.ts @@ -2,10 +2,18 @@ import starlight from "@astrojs/starlight"; import { defineConfig } from "astro/config"; export default defineConfig({ - base: "backlog-cli", + site: "https://simochee.github.io", + base: "/backlog-cli", integrations: [ starlight({ title: "Backlog CLI", + defaultLocale: "root", + locales: { + root: { + label: "日本語", + lang: "ja", + }, + }, social: [ { icon: "github", @@ -13,6 +21,338 @@ export default defineConfig({ href: "https://github.com/simochee/backlog-cli", }, ], + sidebar: [ + { + label: "はじめに", + items: [ + { label: "インストール", link: "/getting-started/installation/" }, + { label: "クイックスタート", link: "/getting-started/quickstart/" }, + ], + }, + { + label: "ガイド", + items: [ + { label: "認証", link: "/guides/authentication/" }, + { label: "設定", link: "/guides/configuration/" }, + { label: "出力形式", link: "/guides/output-formatting/" }, + { label: "シェル補完", link: "/guides/shell-completion/" }, + ], + }, + { + label: "コマンドリファレンス", + items: [ + { + label: "backlog auth", + collapsed: true, + items: [ + { label: "概要", link: "/commands/auth/" }, + { label: "auth login", link: "/commands/auth/login/" }, + { label: "auth logout", link: "/commands/auth/logout/" }, + { label: "auth status", link: "/commands/auth/status/" }, + { label: "auth token", link: "/commands/auth/token/" }, + { label: "auth refresh", link: "/commands/auth/refresh/" }, + { label: "auth switch", link: "/commands/auth/switch/" }, + ], + }, + { + label: "backlog config", + collapsed: true, + items: [ + { label: "概要", link: "/commands/config/" }, + { label: "config get", link: "/commands/config/get/" }, + { label: "config set", link: "/commands/config/set/" }, + { label: "config list", link: "/commands/config/list/" }, + ], + }, + { + label: "backlog issue", + collapsed: true, + items: [ + { label: "概要", link: "/commands/issue/" }, + { label: "issue list", link: "/commands/issue/list/" }, + { label: "issue view", link: "/commands/issue/view/" }, + { label: "issue create", link: "/commands/issue/create/" }, + { label: "issue edit", link: "/commands/issue/edit/" }, + { label: "issue close", link: "/commands/issue/close/" }, + { label: "issue reopen", link: "/commands/issue/reopen/" }, + { label: "issue comment", link: "/commands/issue/comment/" }, + { label: "issue status", link: "/commands/issue/status/" }, + ], + }, + { + label: "backlog project", + collapsed: true, + items: [ + { label: "概要", link: "/commands/project/" }, + { label: "project list", link: "/commands/project/list/" }, + { label: "project view", link: "/commands/project/view/" }, + { label: "project create", link: "/commands/project/create/" }, + { label: "project edit", link: "/commands/project/edit/" }, + { label: "project delete", link: "/commands/project/delete/" }, + { label: "project users", link: "/commands/project/users/" }, + { + label: "project add-user", + link: "/commands/project/add-user/", + }, + { + label: "project remove-user", + link: "/commands/project/remove-user/", + }, + { + label: "project activities", + link: "/commands/project/activities/", + }, + ], + }, + { + label: "backlog pr", + collapsed: true, + items: [ + { label: "概要", link: "/commands/pr/" }, + { label: "pr list", link: "/commands/pr/list/" }, + { label: "pr view", link: "/commands/pr/view/" }, + { label: "pr create", link: "/commands/pr/create/" }, + { label: "pr edit", link: "/commands/pr/edit/" }, + { label: "pr close", link: "/commands/pr/close/" }, + { label: "pr merge", link: "/commands/pr/merge/" }, + { label: "pr reopen", link: "/commands/pr/reopen/" }, + { label: "pr comment", link: "/commands/pr/comment/" }, + { label: "pr comments", link: "/commands/pr/comments/" }, + { label: "pr status", link: "/commands/pr/status/" }, + ], + }, + { + label: "backlog repo", + collapsed: true, + items: [ + { label: "概要", link: "/commands/repo/" }, + { label: "repo list", link: "/commands/repo/list/" }, + { label: "repo view", link: "/commands/repo/view/" }, + { label: "repo clone", link: "/commands/repo/clone/" }, + ], + }, + { + label: "backlog notification", + collapsed: true, + items: [ + { label: "概要", link: "/commands/notification/" }, + { + label: "notification list", + link: "/commands/notification/list/", + }, + { + label: "notification count", + link: "/commands/notification/count/", + }, + { + label: "notification read", + link: "/commands/notification/read/", + }, + { + label: "notification read-all", + link: "/commands/notification/read-all/", + }, + ], + }, + { + label: "backlog wiki", + collapsed: true, + items: [ + { label: "概要", link: "/commands/wiki/" }, + { label: "wiki list", link: "/commands/wiki/list/" }, + { label: "wiki view", link: "/commands/wiki/view/" }, + { label: "wiki create", link: "/commands/wiki/create/" }, + { label: "wiki edit", link: "/commands/wiki/edit/" }, + { label: "wiki delete", link: "/commands/wiki/delete/" }, + { label: "wiki count", link: "/commands/wiki/count/" }, + { label: "wiki tags", link: "/commands/wiki/tags/" }, + { label: "wiki history", link: "/commands/wiki/history/" }, + { + label: "wiki attachments", + link: "/commands/wiki/attachments/", + }, + ], + }, + { + label: "backlog user", + collapsed: true, + items: [ + { label: "概要", link: "/commands/user/" }, + { label: "user list", link: "/commands/user/list/" }, + { label: "user view", link: "/commands/user/view/" }, + { label: "user me", link: "/commands/user/me/" }, + { + label: "user activities", + link: "/commands/user/activities/", + }, + ], + }, + { + label: "backlog team", + collapsed: true, + items: [ + { label: "概要", link: "/commands/team/" }, + { label: "team list", link: "/commands/team/list/" }, + { label: "team view", link: "/commands/team/view/" }, + { label: "team create", link: "/commands/team/create/" }, + { label: "team edit", link: "/commands/team/edit/" }, + { label: "team delete", link: "/commands/team/delete/" }, + ], + }, + { + label: "backlog category", + collapsed: true, + items: [ + { label: "概要", link: "/commands/category/" }, + { label: "category list", link: "/commands/category/list/" }, + { + label: "category create", + link: "/commands/category/create/", + }, + { label: "category edit", link: "/commands/category/edit/" }, + { + label: "category delete", + link: "/commands/category/delete/", + }, + ], + }, + { + label: "backlog milestone", + collapsed: true, + items: [ + { label: "概要", link: "/commands/milestone/" }, + { label: "milestone list", link: "/commands/milestone/list/" }, + { + label: "milestone create", + link: "/commands/milestone/create/", + }, + { label: "milestone edit", link: "/commands/milestone/edit/" }, + { + label: "milestone delete", + link: "/commands/milestone/delete/", + }, + ], + }, + { + label: "backlog issue-type", + collapsed: true, + items: [ + { label: "概要", link: "/commands/issue-type/" }, + { + label: "issue-type list", + link: "/commands/issue-type/list/", + }, + { + label: "issue-type create", + link: "/commands/issue-type/create/", + }, + { + label: "issue-type edit", + link: "/commands/issue-type/edit/", + }, + { + label: "issue-type delete", + link: "/commands/issue-type/delete/", + }, + ], + }, + { + label: "backlog status-type", + collapsed: true, + items: [ + { label: "概要", link: "/commands/status-type/" }, + { + label: "status-type list", + link: "/commands/status-type/list/", + }, + { + label: "status-type create", + link: "/commands/status-type/create/", + }, + { + label: "status-type edit", + link: "/commands/status-type/edit/", + }, + { + label: "status-type delete", + link: "/commands/status-type/delete/", + }, + ], + }, + { + label: "backlog space", + collapsed: true, + items: [ + { label: "概要", link: "/commands/space/" }, + { label: "space info", link: "/commands/space/info/" }, + { + label: "space activities", + link: "/commands/space/activities/", + }, + { + label: "space disk-usage", + link: "/commands/space/disk-usage/", + }, + { + label: "space notification", + link: "/commands/space/notification/", + }, + ], + }, + { + label: "backlog webhook", + collapsed: true, + items: [ + { label: "概要", link: "/commands/webhook/" }, + { label: "webhook list", link: "/commands/webhook/list/" }, + { label: "webhook view", link: "/commands/webhook/view/" }, + { label: "webhook create", link: "/commands/webhook/create/" }, + { label: "webhook edit", link: "/commands/webhook/edit/" }, + { label: "webhook delete", link: "/commands/webhook/delete/" }, + ], + }, + { + label: "backlog star", + collapsed: true, + items: [ + { label: "概要", link: "/commands/star/" }, + { label: "star add", link: "/commands/star/add/" }, + { label: "star list", link: "/commands/star/list/" }, + { label: "star count", link: "/commands/star/count/" }, + ], + }, + { + label: "backlog watching", + collapsed: true, + items: [ + { label: "概要", link: "/commands/watching/" }, + { label: "watching list", link: "/commands/watching/list/" }, + { label: "watching add", link: "/commands/watching/add/" }, + { label: "watching view", link: "/commands/watching/view/" }, + { + label: "watching delete", + link: "/commands/watching/delete/", + }, + { label: "watching read", link: "/commands/watching/read/" }, + ], + }, + { + label: "backlog alias", + collapsed: true, + items: [ + { label: "概要", link: "/commands/alias/" }, + { label: "alias set", link: "/commands/alias/set/" }, + { label: "alias list", link: "/commands/alias/list/" }, + { label: "alias delete", link: "/commands/alias/delete/" }, + ], + }, + { label: "backlog status", link: "/commands/status/" }, + { label: "backlog browse", link: "/commands/browse/" }, + { label: "backlog api", link: "/commands/api/" }, + { label: "backlog completion", link: "/commands/completion/" }, + ], + }, + ], }), ], }); diff --git a/docs/src/content.config.ts b/docs/src/content.config.ts new file mode 100644 index 0000000..acfd7f7 --- /dev/null +++ b/docs/src/content.config.ts @@ -0,0 +1,8 @@ +import { defineCollection } from "astro:content"; +import { docsLoader, i18nLoader } from "@astrojs/starlight/loaders"; +import { docsSchema, i18nSchema } from "@astrojs/starlight/schema"; + +export const collections = { + docs: defineCollection({ loader: docsLoader(), schema: docsSchema() }), + i18n: defineCollection({ loader: i18nLoader(), schema: i18nSchema() }), +}; diff --git a/docs/src/content/docs/commands/alias/delete.md b/docs/src/content/docs/commands/alias/delete.md new file mode 100644 index 0000000..83b17b5 --- /dev/null +++ b/docs/src/content/docs/commands/alias/delete.md @@ -0,0 +1,20 @@ +--- +title: backlog alias delete +description: エイリアスを削除する +--- + +``` +backlog alias delete +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | エイリアス名 | + +## 使用例 + +```bash +backlog alias delete my-issues +``` diff --git a/docs/src/content/docs/commands/alias/index.md b/docs/src/content/docs/commands/alias/index.md new file mode 100644 index 0000000..8974c69 --- /dev/null +++ b/docs/src/content/docs/commands/alias/index.md @@ -0,0 +1,14 @@ +--- +title: backlog alias +description: コマンドエイリアスを管理します +--- + +よく使うコマンドにエイリアスを設定して、短縮して実行できるようにするコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [alias set](/backlog-cli/commands/alias/set/) | エイリアスを設定する | +| [alias list](/backlog-cli/commands/alias/list/) | エイリアスの一覧を表示する | +| [alias delete](/backlog-cli/commands/alias/delete/) | エイリアスを削除する | diff --git a/docs/src/content/docs/commands/alias/list.md b/docs/src/content/docs/commands/alias/list.md new file mode 100644 index 0000000..a47d01d --- /dev/null +++ b/docs/src/content/docs/commands/alias/list.md @@ -0,0 +1,16 @@ +--- +title: backlog alias list +description: エイリアスの一覧を表示する +--- + +``` +backlog alias list +``` + +設定済みのエイリアス一覧を表示します。 + +## 使用例 + +```bash +backlog alias list +``` diff --git a/docs/src/content/docs/commands/alias/set.md b/docs/src/content/docs/commands/alias/set.md new file mode 100644 index 0000000..71b971b --- /dev/null +++ b/docs/src/content/docs/commands/alias/set.md @@ -0,0 +1,33 @@ +--- +title: backlog alias set +description: エイリアスを設定する +--- + +``` +backlog alias set [flags] +``` + +コマンドのエイリアスを設定します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | エイリアス名 | +| `` | string | Yes | 展開されるコマンド | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--shell` | boolean | シェルコマンドとして登録 | + +## 使用例 + +```bash +# 課題一覧のエイリアス +backlog alias set my-issues "issue list --assignee @me" + +# シェルコマンドとして登録 +backlog alias set --shell open-proj "open https://your-space.backlog.com/projects/PROJ" +``` diff --git a/docs/src/content/docs/commands/api.md b/docs/src/content/docs/commands/api.md new file mode 100644 index 0000000..09d2906 --- /dev/null +++ b/docs/src/content/docs/commands/api.md @@ -0,0 +1,59 @@ +--- +title: backlog api +description: 認証済み API リクエストを実行する +--- + +``` +backlog api [flags] +``` + +Backlog API に対して認証済みのリクエストを送信します。任意のエンドポイントにアクセスできます。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | API パス(例: `/api/v2/users/myself`) | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--method` | `-X` | string | `GET` | HTTP メソッド | +| `--field` | `-f` | string | — | リクエストフィールド(`key=value`、繰り返し可) | +| `--header` | `-H` | string | — | 追加ヘッダー(繰り返し可) | +| `--include` | `-i` | boolean | `false` | レスポンスヘッダーを含める | +| `--paginate` | | boolean | `false` | ページネーションで全件取得 | +| `--silent` | | boolean | `false` | 出力を抑制 | + +## フィールドの型変換 + +`--field` で指定した値は自動的に型変換されます。 + +- `key=123` → 数値 +- `key=true` / `key=false` → 真偽値 +- `key=text` → 文字列 + +## 使用例 + +```bash +# 自分のユーザー情報を取得 +backlog api /api/v2/users/myself + +# 課題を作成 +backlog api /api/v2/issues -X POST \ + -f projectId=12345 \ + -f summary="新しい課題" \ + -f issueTypeId=67890 \ + -f priorityId=3 + +# ページネーションで全件取得 +backlog api /api/v2/issues --paginate + +# レスポンスヘッダーを表示 +backlog api /api/v2/space -i +``` + +## 関連コマンド + +- [auth token](/backlog-cli/commands/auth/token/) diff --git a/docs/src/content/docs/commands/auth/index.md b/docs/src/content/docs/commands/auth/index.md new file mode 100644 index 0000000..888f2fe --- /dev/null +++ b/docs/src/content/docs/commands/auth/index.md @@ -0,0 +1,17 @@ +--- +title: backlog auth +description: Backlog スペースの認証を管理します +--- + +Backlog スペースの認証を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [auth login](/backlog-cli/commands/auth/login/) | Backlog スペースに認証する | +| [auth logout](/backlog-cli/commands/auth/logout/) | 認証情報を削除する | +| [auth status](/backlog-cli/commands/auth/status/) | 認証状態を表示する | +| [auth token](/backlog-cli/commands/auth/token/) | 認証トークンを標準出力に表示する | +| [auth refresh](/backlog-cli/commands/auth/refresh/) | OAuth トークンをリフレッシュする | +| [auth switch](/backlog-cli/commands/auth/switch/) | アクティブなスペースを切り替える | diff --git a/docs/src/content/docs/commands/auth/login.md b/docs/src/content/docs/commands/auth/login.md new file mode 100644 index 0000000..2ed25fd --- /dev/null +++ b/docs/src/content/docs/commands/auth/login.md @@ -0,0 +1,49 @@ +--- +title: backlog auth login +description: Backlog スペースに認証する +--- + +``` +backlog auth login [flags] +``` + +Backlog スペースに対して認証を行います。API キーまたは OAuth 2.0 による認証をサポートしています。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--hostname` | `-h` | string | — | スペースホスト名(例: `xxx.backlog.com`) | +| `--method` | `-m` | string | `api-key` | 認証方式(`api-key` / `oauth`) | +| `--with-token` | | boolean | `false` | 標準入力からトークンを読み込む | + +## 使用例 + +### 対話形式で認証 + +```bash +backlog auth login +``` + +### API キーで認証 + +```bash +backlog auth login --hostname your-space.backlog.com --method api-key +``` + +### 標準入力からトークンを渡す + +```bash +echo "YOUR_API_KEY" | backlog auth login --hostname your-space.backlog.com --with-token +``` + +### OAuth 2.0 で認証 + +```bash +backlog auth login --hostname your-space.backlog.com --method oauth +``` + +## 関連コマンド + +- [auth logout](/backlog-cli/commands/auth/logout/) +- [auth status](/backlog-cli/commands/auth/status/) diff --git a/docs/src/content/docs/commands/auth/logout.md b/docs/src/content/docs/commands/auth/logout.md new file mode 100644 index 0000000..b5e637d --- /dev/null +++ b/docs/src/content/docs/commands/auth/logout.md @@ -0,0 +1,31 @@ +--- +title: backlog auth logout +description: 認証情報を削除する +--- + +``` +backlog auth logout [flags] +``` + +指定したスペースの認証情報を設定ファイルから削除します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--hostname` | `-h` | string | アクティブスペース | 対象スペースのホスト名 | + +## 使用例 + +```bash +# デフォルトスペースからログアウト +backlog auth logout + +# 特定のスペースからログアウト +backlog auth logout --hostname your-space.backlog.com +``` + +## 関連コマンド + +- [auth login](/backlog-cli/commands/auth/login/) +- [auth status](/backlog-cli/commands/auth/status/) diff --git a/docs/src/content/docs/commands/auth/refresh.md b/docs/src/content/docs/commands/auth/refresh.md new file mode 100644 index 0000000..115e0a8 --- /dev/null +++ b/docs/src/content/docs/commands/auth/refresh.md @@ -0,0 +1,31 @@ +--- +title: backlog auth refresh +description: OAuth トークンをリフレッシュする +--- + +``` +backlog auth refresh [flags] +``` + +OAuth 2.0 のアクセストークンをリフレッシュトークンを使って更新します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--hostname` | `-h` | string | アクティブスペース | 対象スペースのホスト名 | + +## 使用例 + +```bash +# デフォルトスペースのトークンをリフレッシュ +backlog auth refresh + +# 特定のスペースのトークンをリフレッシュ +backlog auth refresh --hostname your-space.backlog.com +``` + +## 関連コマンド + +- [auth login](/backlog-cli/commands/auth/login/) +- [auth status](/backlog-cli/commands/auth/status/) diff --git a/docs/src/content/docs/commands/auth/status.md b/docs/src/content/docs/commands/auth/status.md new file mode 100644 index 0000000..2246d77 --- /dev/null +++ b/docs/src/content/docs/commands/auth/status.md @@ -0,0 +1,35 @@ +--- +title: backlog auth status +description: 認証状態を表示する +--- + +``` +backlog auth status [flags] +``` + +認証済みスペースの認証状態を表示します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--hostname` | `-h` | string | 全スペース | 対象スペースのホスト名 | +| `--show-token` | | boolean | `false` | トークンを表示する | + +## 使用例 + +```bash +# 全スペースの認証状態を表示 +backlog auth status + +# 特定のスペースの認証状態を表示 +backlog auth status --hostname your-space.backlog.com + +# トークンを表示 +backlog auth status --show-token +``` + +## 関連コマンド + +- [auth login](/backlog-cli/commands/auth/login/) +- [auth token](/backlog-cli/commands/auth/token/) diff --git a/docs/src/content/docs/commands/auth/switch.md b/docs/src/content/docs/commands/auth/switch.md new file mode 100644 index 0000000..db37282 --- /dev/null +++ b/docs/src/content/docs/commands/auth/switch.md @@ -0,0 +1,31 @@ +--- +title: backlog auth switch +description: アクティブなスペースを切り替える +--- + +``` +backlog auth switch [flags] +``` + +デフォルトのアクティブスペースを切り替えます。複数のスペースに認証している場合に使用します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--hostname` | `-h` | string | — | 切り替え先のスペースホスト名 | + +## 使用例 + +```bash +# 対話的にスペースを選択 +backlog auth switch + +# 特定のスペースに切り替え +backlog auth switch --hostname other-space.backlog.com +``` + +## 関連コマンド + +- [auth status](/backlog-cli/commands/auth/status/) +- [auth login](/backlog-cli/commands/auth/login/) diff --git a/docs/src/content/docs/commands/auth/token.md b/docs/src/content/docs/commands/auth/token.md new file mode 100644 index 0000000..86b2041 --- /dev/null +++ b/docs/src/content/docs/commands/auth/token.md @@ -0,0 +1,34 @@ +--- +title: backlog auth token +description: 認証トークンを標準出力に表示する +--- + +``` +backlog auth token [flags] +``` + +認証トークンを標準出力に出力します。スクリプトや他のツールとの連携に使用します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--hostname` | `-h` | string | アクティブスペース | 対象スペースのホスト名 | + +## 使用例 + +```bash +# トークンを表示 +backlog auth token + +# 特定のスペースのトークンを表示 +backlog auth token --hostname your-space.backlog.com + +# 他のコマンドにトークンを渡す +curl -H "X-Api-Key: $(backlog auth token)" https://your-space.backlog.com/api/v2/users/myself +``` + +## 関連コマンド + +- [auth status](/backlog-cli/commands/auth/status/) +- [auth login](/backlog-cli/commands/auth/login/) diff --git a/docs/src/content/docs/commands/browse.md b/docs/src/content/docs/commands/browse.md new file mode 100644 index 0000000..53fb8b1 --- /dev/null +++ b/docs/src/content/docs/commands/browse.md @@ -0,0 +1,45 @@ +--- +title: backlog browse +description: Backlog をブラウザで開く +--- + +``` +backlog browse [target] [flags] +``` + +Backlog のページをデフォルトブラウザで開きます。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `[target]` | string | No | 課題キーまたはパス | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--issues` | | boolean | 課題一覧を開く | +| `--wiki` | | boolean | Wiki を開く | +| `--git` | | boolean | Git リポジトリページを開く | +| `--settings` | | boolean | プロジェクト設定を開く | + +## 使用例 + +```bash +# プロジェクトのトップを開く +backlog browse --project PROJ + +# 課題を開く +backlog browse PROJECT-123 + +# 課題一覧を開く +backlog browse --project PROJ --issues + +# Wiki を開く +backlog browse --project PROJ --wiki + +# Git リポジトリページを開く +backlog browse --project PROJ --git +``` diff --git a/docs/src/content/docs/commands/category/create.md b/docs/src/content/docs/commands/category/create.md new file mode 100644 index 0000000..939e0f2 --- /dev/null +++ b/docs/src/content/docs/commands/category/create.md @@ -0,0 +1,21 @@ +--- +title: backlog category create +description: カテゴリを作成する +--- + +``` +backlog category create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes | カテゴリ名 | + +## 使用例 + +```bash +backlog category create --project PROJ --name "フロントエンド" +``` diff --git a/docs/src/content/docs/commands/category/delete.md b/docs/src/content/docs/commands/category/delete.md new file mode 100644 index 0000000..b20855d --- /dev/null +++ b/docs/src/content/docs/commands/category/delete.md @@ -0,0 +1,28 @@ +--- +title: backlog category delete +description: カテゴリを削除する +--- + +``` +backlog category delete [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | カテゴリ ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--confirm` | | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog category delete 12345 --project PROJ +backlog category delete 12345 --project PROJ --confirm +``` diff --git a/docs/src/content/docs/commands/category/edit.md b/docs/src/content/docs/commands/category/edit.md new file mode 100644 index 0000000..46fc928 --- /dev/null +++ b/docs/src/content/docs/commands/category/edit.md @@ -0,0 +1,27 @@ +--- +title: backlog category edit +description: カテゴリを編集する +--- + +``` +backlog category edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | カテゴリ ID | + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes | カテゴリ名 | + +## 使用例 + +```bash +backlog category edit 12345 --project PROJ --name "バックエンド" +``` diff --git a/docs/src/content/docs/commands/category/index.md b/docs/src/content/docs/commands/category/index.md new file mode 100644 index 0000000..a6efca6 --- /dev/null +++ b/docs/src/content/docs/commands/category/index.md @@ -0,0 +1,15 @@ +--- +title: backlog category +description: カテゴリを管理します +--- + +プロジェクトの課題カテゴリを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [category list](/backlog-cli/commands/category/list/) | カテゴリの一覧を表示する | +| [category create](/backlog-cli/commands/category/create/) | カテゴリを作成する | +| [category edit](/backlog-cli/commands/category/edit/) | カテゴリを編集する | +| [category delete](/backlog-cli/commands/category/delete/) | カテゴリを削除する | diff --git a/docs/src/content/docs/commands/category/list.md b/docs/src/content/docs/commands/category/list.md new file mode 100644 index 0000000..b5dbe09 --- /dev/null +++ b/docs/src/content/docs/commands/category/list.md @@ -0,0 +1,20 @@ +--- +title: backlog category list +description: カテゴリの一覧を表示する +--- + +``` +backlog category list [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog category list --project PROJ +``` diff --git a/docs/src/content/docs/commands/completion.md b/docs/src/content/docs/commands/completion.md new file mode 100644 index 0000000..5ab8c59 --- /dev/null +++ b/docs/src/content/docs/commands/completion.md @@ -0,0 +1,31 @@ +--- +title: backlog completion +description: シェル補完スクリプトを生成する +--- + +``` +backlog completion +``` + +指定したシェル向けの補完スクリプトを生成します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | シェル種別(`bash` / `zsh` / `fish`) | + +## 使用例 + +```bash +# Bash +backlog completion bash > /etc/bash_completion.d/backlog + +# Zsh +backlog completion zsh > "${fpath[1]}/_backlog" + +# Fish +backlog completion fish > ~/.config/fish/completions/backlog.fish +``` + +詳しいセットアップ方法は[シェル補完ガイド](/backlog-cli/guides/shell-completion/)を参照してください。 diff --git a/docs/src/content/docs/commands/config/get.md b/docs/src/content/docs/commands/config/get.md new file mode 100644 index 0000000..e2289c5 --- /dev/null +++ b/docs/src/content/docs/commands/config/get.md @@ -0,0 +1,37 @@ +--- +title: backlog config get +description: 設定値を取得する +--- + +``` +backlog config get [flags] +``` + +指定したキーの設定値を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 設定キー(例: `default_space`) | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--hostname` | string | スペース固有の設定を取得 | + +## 使用例 + +```bash +# グローバル設定を取得 +backlog config get default_space + +# スペース固有の設定を取得 +backlog config get pager --hostname your-space.backlog.com +``` + +## 関連コマンド + +- [config set](/backlog-cli/commands/config/set/) +- [config list](/backlog-cli/commands/config/list/) diff --git a/docs/src/content/docs/commands/config/index.md b/docs/src/content/docs/commands/config/index.md new file mode 100644 index 0000000..4d77b5e --- /dev/null +++ b/docs/src/content/docs/commands/config/index.md @@ -0,0 +1,14 @@ +--- +title: backlog config +description: CLI の設定を管理します +--- + +CLI の設定を管理するコマンド群です。設定は `~/.backlogrc` ファイルに保存されます。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [config get](/backlog-cli/commands/config/get/) | 設定値を取得する | +| [config set](/backlog-cli/commands/config/set/) | 設定値を変更する | +| [config list](/backlog-cli/commands/config/list/) | すべての設定を一覧表示する | diff --git a/docs/src/content/docs/commands/config/list.md b/docs/src/content/docs/commands/config/list.md new file mode 100644 index 0000000..9db3db0 --- /dev/null +++ b/docs/src/content/docs/commands/config/list.md @@ -0,0 +1,31 @@ +--- +title: backlog config list +description: すべての設定を一覧表示する +--- + +``` +backlog config list [flags] +``` + +すべての設定値を一覧表示します。 + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--hostname` | string | スペース固有の設定のみ表示 | + +## 使用例 + +```bash +# すべての設定を表示 +backlog config list + +# スペース固有の設定のみ表示 +backlog config list --hostname your-space.backlog.com +``` + +## 関連コマンド + +- [config get](/backlog-cli/commands/config/get/) +- [config set](/backlog-cli/commands/config/set/) diff --git a/docs/src/content/docs/commands/config/set.md b/docs/src/content/docs/commands/config/set.md new file mode 100644 index 0000000..7233e1b --- /dev/null +++ b/docs/src/content/docs/commands/config/set.md @@ -0,0 +1,38 @@ +--- +title: backlog config set +description: 設定値を変更する +--- + +``` +backlog config set [flags] +``` + +指定したキーの設定値を変更します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 設定キー | +| `` | string | Yes | 設定値 | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--hostname` | string | スペース固有の設定を変更 | + +## 使用例 + +```bash +# デフォルトスペースを設定 +backlog config set default_space your-space.backlog.com + +# スペース固有の設定を変更 +backlog config set pager less --hostname your-space.backlog.com +``` + +## 関連コマンド + +- [config get](/backlog-cli/commands/config/get/) +- [config list](/backlog-cli/commands/config/list/) diff --git a/docs/src/content/docs/commands/issue-type/create.md b/docs/src/content/docs/commands/issue-type/create.md new file mode 100644 index 0000000..0769360 --- /dev/null +++ b/docs/src/content/docs/commands/issue-type/create.md @@ -0,0 +1,22 @@ +--- +title: backlog issue-type create +description: 課題種別を作成する +--- + +``` +backlog issue-type create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes | 種別名 | +| `--color` | | string | Yes | 表示色(`#hex` 形式) | + +## 使用例 + +```bash +backlog issue-type create --project PROJ --name "機能追加" --color "#ff0000" +``` diff --git a/docs/src/content/docs/commands/issue-type/delete.md b/docs/src/content/docs/commands/issue-type/delete.md new file mode 100644 index 0000000..9ca44a6 --- /dev/null +++ b/docs/src/content/docs/commands/issue-type/delete.md @@ -0,0 +1,30 @@ +--- +title: backlog issue-type delete +description: 課題種別を削除する +--- + +``` +backlog issue-type delete [flags] +``` + +削除する種別に紐づく課題の移行先として、代替の種別 ID を指定する必要があります。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | 種別 ID | + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--substitute-issue-type-id` | | number | Yes | 代替種別 ID | +| `--confirm` | | boolean | No | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog issue-type delete 12345 --project PROJ --substitute-issue-type-id 67890 +``` diff --git a/docs/src/content/docs/commands/issue-type/edit.md b/docs/src/content/docs/commands/issue-type/edit.md new file mode 100644 index 0000000..cdcb2c0 --- /dev/null +++ b/docs/src/content/docs/commands/issue-type/edit.md @@ -0,0 +1,29 @@ +--- +title: backlog issue-type edit +description: 課題種別を編集する +--- + +``` +backlog issue-type edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | 種別 ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--name` | `-n` | string | 種別名 | +| `--color` | | string | 表示色(`#hex` 形式) | + +## 使用例 + +```bash +backlog issue-type edit 12345 --project PROJ --name "バグ修正" +backlog issue-type edit 12345 --project PROJ --color "#00ff00" +``` diff --git a/docs/src/content/docs/commands/issue-type/index.md b/docs/src/content/docs/commands/issue-type/index.md new file mode 100644 index 0000000..f019f5d --- /dev/null +++ b/docs/src/content/docs/commands/issue-type/index.md @@ -0,0 +1,15 @@ +--- +title: backlog issue-type +description: 課題種別を管理します +--- + +プロジェクトの課題種別を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [issue-type list](/backlog-cli/commands/issue-type/list/) | 課題種別の一覧を表示する | +| [issue-type create](/backlog-cli/commands/issue-type/create/) | 課題種別を作成する | +| [issue-type edit](/backlog-cli/commands/issue-type/edit/) | 課題種別を編集する | +| [issue-type delete](/backlog-cli/commands/issue-type/delete/) | 課題種別を削除する | diff --git a/docs/src/content/docs/commands/issue-type/list.md b/docs/src/content/docs/commands/issue-type/list.md new file mode 100644 index 0000000..dc5ff5d --- /dev/null +++ b/docs/src/content/docs/commands/issue-type/list.md @@ -0,0 +1,20 @@ +--- +title: backlog issue-type list +description: 課題種別の一覧を表示する +--- + +``` +backlog issue-type list [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog issue-type list --project PROJ +``` diff --git a/docs/src/content/docs/commands/issue/close.md b/docs/src/content/docs/commands/issue/close.md new file mode 100644 index 0000000..9768bbb --- /dev/null +++ b/docs/src/content/docs/commands/issue/close.md @@ -0,0 +1,41 @@ +--- +title: backlog issue close +description: 課題を完了にする +--- + +``` +backlog issue close [flags] +``` + +課題のステータスを「完了」に変更します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 課題キー(例: `PROJECT-123`) | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--comment` | `-c` | string | — | 完了コメント | +| `--resolution` | `-r` | string | `完了` | 完了理由名 | + +## 使用例 + +```bash +# 課題を完了にする +backlog issue close PROJECT-123 + +# コメント付きで完了 +backlog issue close PROJECT-123 --comment "修正をリリースしました" + +# 完了理由を指定 +backlog issue close PROJECT-123 --resolution 対応済み +``` + +## 関連コマンド + +- [issue reopen](/backlog-cli/commands/issue/reopen/) +- [issue edit](/backlog-cli/commands/issue/edit/) diff --git a/docs/src/content/docs/commands/issue/comment.md b/docs/src/content/docs/commands/issue/comment.md new file mode 100644 index 0000000..ba0ae4e --- /dev/null +++ b/docs/src/content/docs/commands/issue/comment.md @@ -0,0 +1,37 @@ +--- +title: backlog issue comment +description: 課題にコメントを追加する +--- + +``` +backlog issue comment [flags] +``` + +課題にコメントを追加します。`--body` を省略するとエディタが起動します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 課題キー(例: `PROJECT-123`) | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--body` | `-b` | string | コメント本文(`-` で標準入力) | + +## 使用例 + +```bash +# コメントを追加 +backlog issue comment PROJECT-123 --body "確認しました" + +# 標準入力から本文を読み込む +echo "対応中です" | backlog issue comment PROJECT-123 --body - +``` + +## 関連コマンド + +- [issue view](/backlog-cli/commands/issue/view/) +- [issue edit](/backlog-cli/commands/issue/edit/) diff --git a/docs/src/content/docs/commands/issue/create.md b/docs/src/content/docs/commands/issue/create.md new file mode 100644 index 0000000..9dd6eee --- /dev/null +++ b/docs/src/content/docs/commands/issue/create.md @@ -0,0 +1,53 @@ +--- +title: backlog issue create +description: 課題を作成する +--- + +``` +backlog issue create [flags] +``` + +新しい課題を作成します。必須オプションが省略された場合は対話形式で入力を求めます。 + +## オプション + +| フラグ | 短縮 | 型 | 必須 | デフォルト | 説明 | +|--------|------|------|------|------------|------| +| `--project` | `-p` | string | Yes* | — | プロジェクトキー | +| `--title` | `-t` | string | Yes* | — | 課題の件名 | +| `--type` | `-T` | string | Yes* | — | 課題種別名 | +| `--priority` | `-P` | string | Yes* | — | 優先度名 | +| `--description` | `-d` | string | No | — | 課題の詳細(`-` で標準入力) | +| `--assignee` | `-a` | string | No | — | 担当者 | +| `--start-date` | | string | No | — | 開始日(`yyyy-MM-dd`) | +| `--due-date` | | string | No | — | 期限日(`yyyy-MM-dd`) | +| `--web` | | boolean | No | `false` | 作成後ブラウザで開く | + +> *: インタラクティブモードでは省略可能 + +## 使用例 + +```bash +# 対話形式で作成 +backlog issue create + +# すべてのオプションを指定 +backlog issue create \ + --project PROJ \ + --title "ログイン画面のバグ修正" \ + --type バグ \ + --priority 高 \ + --assignee yamada \ + --description "ログインボタンが反応しない" + +# 作成後にブラウザで開く +backlog issue create --project PROJ --title "新機能" --type タスク --priority 中 --web + +# 標準入力から説明を読み込む +cat description.md | backlog issue create --project PROJ --title "課題" --type タスク --priority 中 --description - +``` + +## 関連コマンド + +- [issue list](/backlog-cli/commands/issue/list/) +- [issue edit](/backlog-cli/commands/issue/edit/) diff --git a/docs/src/content/docs/commands/issue/edit.md b/docs/src/content/docs/commands/issue/edit.md new file mode 100644 index 0000000..c70b004 --- /dev/null +++ b/docs/src/content/docs/commands/issue/edit.md @@ -0,0 +1,46 @@ +--- +title: backlog issue edit +description: 課題を編集する +--- + +``` +backlog issue edit [flags] +``` + +既存の課題を編集します。指定したフィールドのみ更新されます。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 課題キー(例: `PROJECT-123`) | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--title` | `-t` | string | 件名 | +| `--description` | `-d` | string | 詳細 | +| `--status` | `-S` | string | ステータス名 | +| `--type` | `-T` | string | 課題種別名 | +| `--priority` | `-P` | string | 優先度名 | +| `--assignee` | `-a` | string | 担当者 | +| `--comment` | `-c` | string | 更新コメント | + +## 使用例 + +```bash +# ステータスを変更 +backlog issue edit PROJECT-123 --status 処理中 + +# 担当者と優先度を変更 +backlog issue edit PROJECT-123 --assignee yamada --priority 高 + +# コメント付きで更新 +backlog issue edit PROJECT-123 --status 処理済み --comment "対応完了しました" +``` + +## 関連コマンド + +- [issue view](/backlog-cli/commands/issue/view/) +- [issue close](/backlog-cli/commands/issue/close/) diff --git a/docs/src/content/docs/commands/issue/index.md b/docs/src/content/docs/commands/issue/index.md new file mode 100644 index 0000000..c52f8a4 --- /dev/null +++ b/docs/src/content/docs/commands/issue/index.md @@ -0,0 +1,19 @@ +--- +title: backlog issue +description: 課題を管理します +--- + +Backlog の課題を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [issue list](/backlog-cli/commands/issue/list/) | 課題の一覧を表示する | +| [issue view](/backlog-cli/commands/issue/view/) | 課題の詳細を表示する | +| [issue create](/backlog-cli/commands/issue/create/) | 課題を作成する | +| [issue edit](/backlog-cli/commands/issue/edit/) | 課題を編集する | +| [issue close](/backlog-cli/commands/issue/close/) | 課題を完了にする | +| [issue reopen](/backlog-cli/commands/issue/reopen/) | 課題を再オープンする | +| [issue comment](/backlog-cli/commands/issue/comment/) | 課題にコメントを追加する | +| [issue status](/backlog-cli/commands/issue/status/) | 自分の課題ステータスを表示する | diff --git a/docs/src/content/docs/commands/issue/list.md b/docs/src/content/docs/commands/issue/list.md new file mode 100644 index 0000000..2b1a762 --- /dev/null +++ b/docs/src/content/docs/commands/issue/list.md @@ -0,0 +1,55 @@ +--- +title: backlog issue list +description: 課題の一覧を表示する +--- + +``` +backlog issue list [flags] +``` + +条件を指定して課題の一覧を取得します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--project` | `-p` | string | — | プロジェクトキー(カンマ区切りで複数可) | +| `--assignee` | `-a` | string | — | 担当者(ユーザー名 or `@me`) | +| `--status` | `-S` | string | — | ステータス名(カンマ区切りで複数可) | +| `--type` | `-T` | string | — | 課題種別名(カンマ区切りで複数可) | +| `--priority` | `-P` | string | — | 優先度名 | +| `--keyword` | `-k` | string | — | キーワード検索 | +| `--created-since` | | string | — | 作成日 FROM(`yyyy-MM-dd`) | +| `--created-until` | | string | — | 作成日 TO(`yyyy-MM-dd`) | +| `--updated-since` | | string | — | 更新日 FROM(`yyyy-MM-dd`) | +| `--updated-until` | | string | — | 更新日 TO(`yyyy-MM-dd`) | +| `--due-since` | | string | — | 期限日 FROM(`yyyy-MM-dd`) | +| `--due-until` | | string | — | 期限日 TO(`yyyy-MM-dd`) | +| `--sort` | | string | `updated` | ソートキー | +| `--order` | | string | `desc` | 並び順(`asc` / `desc`) | +| `--limit` | `-L` | number | `20` | 取得件数(1-100) | +| `--offset` | | number | `0` | オフセット | + +## 使用例 + +```bash +# プロジェクトの課題一覧 +backlog issue list --project PROJ + +# 自分に割り当てられた課題 +backlog issue list --assignee @me + +# ステータスでフィルタ +backlog issue list --project PROJ --status 処理中,未対応 + +# キーワード検索 +backlog issue list --project PROJ --keyword "ログイン" + +# 最新20件を更新日順で取得 +backlog issue list --project PROJ --sort updated --order desc --limit 20 +``` + +## 関連コマンド + +- [issue view](/backlog-cli/commands/issue/view/) +- [issue create](/backlog-cli/commands/issue/create/) diff --git a/docs/src/content/docs/commands/issue/reopen.md b/docs/src/content/docs/commands/issue/reopen.md new file mode 100644 index 0000000..bd02d2a --- /dev/null +++ b/docs/src/content/docs/commands/issue/reopen.md @@ -0,0 +1,37 @@ +--- +title: backlog issue reopen +description: 課題を再オープンする +--- + +``` +backlog issue reopen [flags] +``` + +完了した課題を「未対応」ステータスに戻します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 課題キー(例: `PROJECT-123`) | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--comment` | `-c` | string | 再オープンコメント | + +## 使用例 + +```bash +# 課題を再オープン +backlog issue reopen PROJECT-123 + +# コメント付きで再オープン +backlog issue reopen PROJECT-123 --comment "再現しました" +``` + +## 関連コマンド + +- [issue close](/backlog-cli/commands/issue/close/) +- [issue edit](/backlog-cli/commands/issue/edit/) diff --git a/docs/src/content/docs/commands/issue/status.md b/docs/src/content/docs/commands/issue/status.md new file mode 100644 index 0000000..20c0620 --- /dev/null +++ b/docs/src/content/docs/commands/issue/status.md @@ -0,0 +1,21 @@ +--- +title: backlog issue status +description: 自分の課題ステータスを表示する +--- + +``` +backlog issue status +``` + +自分に割り当てられた課題をステータス別に集計して表示します。 + +## 使用例 + +```bash +backlog issue status +``` + +## 関連コマンド + +- [issue list](/backlog-cli/commands/issue/list/) +- [status](/backlog-cli/commands/status/) diff --git a/docs/src/content/docs/commands/issue/view.md b/docs/src/content/docs/commands/issue/view.md new file mode 100644 index 0000000..5839b6a --- /dev/null +++ b/docs/src/content/docs/commands/issue/view.md @@ -0,0 +1,41 @@ +--- +title: backlog issue view +description: 課題の詳細を表示する +--- + +``` +backlog issue view [flags] +``` + +指定した課題の詳細情報を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | 課題キー(例: `PROJECT-123`) | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--comments` | boolean | コメントも表示する | +| `--web` | boolean | ブラウザで開く | + +## 使用例 + +```bash +# 課題の詳細を表示 +backlog issue view PROJECT-123 + +# コメント付きで表示 +backlog issue view PROJECT-123 --comments + +# ブラウザで開く +backlog issue view PROJECT-123 --web +``` + +## 関連コマンド + +- [issue list](/backlog-cli/commands/issue/list/) +- [issue edit](/backlog-cli/commands/issue/edit/) diff --git a/docs/src/content/docs/commands/milestone/create.md b/docs/src/content/docs/commands/milestone/create.md new file mode 100644 index 0000000..869d972 --- /dev/null +++ b/docs/src/content/docs/commands/milestone/create.md @@ -0,0 +1,26 @@ +--- +title: backlog milestone create +description: マイルストーンを作成する +--- + +``` +backlog milestone create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes | マイルストーン名 | +| `--description` | `-d` | string | No | 説明 | +| `--start-date` | | string | No | 開始日(`yyyy-MM-dd`) | +| `--release-due-date` | | string | No | リリース予定日(`yyyy-MM-dd`) | + +## 使用例 + +```bash +backlog milestone create --project PROJ --name "v1.0.0" +backlog milestone create --project PROJ --name "Sprint 1" \ + --start-date 2025-01-01 --release-due-date 2025-01-14 +``` diff --git a/docs/src/content/docs/commands/milestone/delete.md b/docs/src/content/docs/commands/milestone/delete.md new file mode 100644 index 0000000..70c6882 --- /dev/null +++ b/docs/src/content/docs/commands/milestone/delete.md @@ -0,0 +1,28 @@ +--- +title: backlog milestone delete +description: マイルストーンを削除する +--- + +``` +backlog milestone delete [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | マイルストーン ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--confirm` | | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog milestone delete 12345 --project PROJ +backlog milestone delete 12345 --project PROJ --confirm +``` diff --git a/docs/src/content/docs/commands/milestone/edit.md b/docs/src/content/docs/commands/milestone/edit.md new file mode 100644 index 0000000..4592cb8 --- /dev/null +++ b/docs/src/content/docs/commands/milestone/edit.md @@ -0,0 +1,32 @@ +--- +title: backlog milestone edit +description: マイルストーンを編集する +--- + +``` +backlog milestone edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | マイルストーン ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--name` | `-n` | string | マイルストーン名 | +| `--description` | `-d` | string | 説明 | +| `--start-date` | | string | 開始日(`yyyy-MM-dd`) | +| `--release-due-date` | | string | リリース予定日(`yyyy-MM-dd`) | +| `--archived` | | boolean | アーカイブ | + +## 使用例 + +```bash +backlog milestone edit 12345 --project PROJ --name "v1.1.0" +backlog milestone edit 12345 --project PROJ --archived +``` diff --git a/docs/src/content/docs/commands/milestone/index.md b/docs/src/content/docs/commands/milestone/index.md new file mode 100644 index 0000000..7d5c6a5 --- /dev/null +++ b/docs/src/content/docs/commands/milestone/index.md @@ -0,0 +1,15 @@ +--- +title: backlog milestone +description: マイルストーンを管理します +--- + +プロジェクトのマイルストーンを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [milestone list](/backlog-cli/commands/milestone/list/) | マイルストーンの一覧を表示する | +| [milestone create](/backlog-cli/commands/milestone/create/) | マイルストーンを作成する | +| [milestone edit](/backlog-cli/commands/milestone/edit/) | マイルストーンを編集する | +| [milestone delete](/backlog-cli/commands/milestone/delete/) | マイルストーンを削除する | diff --git a/docs/src/content/docs/commands/milestone/list.md b/docs/src/content/docs/commands/milestone/list.md new file mode 100644 index 0000000..31af067 --- /dev/null +++ b/docs/src/content/docs/commands/milestone/list.md @@ -0,0 +1,20 @@ +--- +title: backlog milestone list +description: マイルストーンの一覧を表示する +--- + +``` +backlog milestone list [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog milestone list --project PROJ +``` diff --git a/docs/src/content/docs/commands/notification/count.md b/docs/src/content/docs/commands/notification/count.md new file mode 100644 index 0000000..ad48ece --- /dev/null +++ b/docs/src/content/docs/commands/notification/count.md @@ -0,0 +1,23 @@ +--- +title: backlog notification count +description: 未読通知数を表示する +--- + +``` +backlog notification count [flags] +``` + +未読の通知数を表示します。 + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--already-read` | boolean | 既読を含める | +| `--resource-already-read` | boolean | リソース既読を含める | + +## 使用例 + +```bash +backlog notification count +``` diff --git a/docs/src/content/docs/commands/notification/index.md b/docs/src/content/docs/commands/notification/index.md new file mode 100644 index 0000000..1ccf2bd --- /dev/null +++ b/docs/src/content/docs/commands/notification/index.md @@ -0,0 +1,15 @@ +--- +title: backlog notification +description: 通知を管理します +--- + +Backlog の通知を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [notification list](/backlog-cli/commands/notification/list/) | 通知の一覧を表示する | +| [notification count](/backlog-cli/commands/notification/count/) | 未読通知数を表示する | +| [notification read](/backlog-cli/commands/notification/read/) | 通知を既読にする | +| [notification read-all](/backlog-cli/commands/notification/read-all/) | すべての通知を既読にする | diff --git a/docs/src/content/docs/commands/notification/list.md b/docs/src/content/docs/commands/notification/list.md new file mode 100644 index 0000000..837449c --- /dev/null +++ b/docs/src/content/docs/commands/notification/list.md @@ -0,0 +1,26 @@ +--- +title: backlog notification list +description: 通知の一覧を表示する +--- + +``` +backlog notification list [flags] +``` + +通知の一覧を表示します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--min-id` | | number | — | 最小通知 ID | +| `--max-id` | | number | — | 最大通知 ID | +| `--order` | | string | `desc` | 並び順(`asc` / `desc`) | + +## 使用例 + +```bash +backlog notification list +backlog notification list --limit 50 +``` diff --git a/docs/src/content/docs/commands/notification/read-all.md b/docs/src/content/docs/commands/notification/read-all.md new file mode 100644 index 0000000..cae1fbe --- /dev/null +++ b/docs/src/content/docs/commands/notification/read-all.md @@ -0,0 +1,16 @@ +--- +title: backlog notification read-all +description: すべての通知を既読にする +--- + +``` +backlog notification read-all +``` + +すべての未読通知を既読にします。 + +## 使用例 + +```bash +backlog notification read-all +``` diff --git a/docs/src/content/docs/commands/notification/read.md b/docs/src/content/docs/commands/notification/read.md new file mode 100644 index 0000000..5cd05c9 --- /dev/null +++ b/docs/src/content/docs/commands/notification/read.md @@ -0,0 +1,22 @@ +--- +title: backlog notification read +description: 通知を既読にする +--- + +``` +backlog notification read +``` + +指定した通知を既読にします。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | 通知 ID | + +## 使用例 + +```bash +backlog notification read 12345 +``` diff --git a/docs/src/content/docs/commands/pr/close.md b/docs/src/content/docs/commands/pr/close.md new file mode 100644 index 0000000..9d5e6e9 --- /dev/null +++ b/docs/src/content/docs/commands/pr/close.md @@ -0,0 +1,31 @@ +--- +title: backlog pr close +description: プルリクエストをクローズする +--- + +``` +backlog pr close [flags] +``` + +プルリクエストをクローズします。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | +| `--comment` | `-c` | string | クローズコメント | + +## 使用例 + +```bash +backlog pr close 42 --project PROJ --repo my-repo +backlog pr close 42 --project PROJ --repo my-repo --comment "別の PR に統合しました" +``` diff --git a/docs/src/content/docs/commands/pr/comment.md b/docs/src/content/docs/commands/pr/comment.md new file mode 100644 index 0000000..1c330ce --- /dev/null +++ b/docs/src/content/docs/commands/pr/comment.md @@ -0,0 +1,30 @@ +--- +title: backlog pr comment +description: プルリクエストにコメントを追加する +--- + +``` +backlog pr comment [flags] +``` + +プルリクエストにコメントを追加します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | +| `--body` | `-b` | string | コメント本文(`-` で標準入力) | + +## 使用例 + +```bash +backlog pr comment 42 --project PROJ --repo my-repo --body "確認しました" +``` diff --git a/docs/src/content/docs/commands/pr/comments.md b/docs/src/content/docs/commands/pr/comments.md new file mode 100644 index 0000000..522dca0 --- /dev/null +++ b/docs/src/content/docs/commands/pr/comments.md @@ -0,0 +1,31 @@ +--- +title: backlog pr comments +description: プルリクエストのコメント一覧を表示する +--- + +``` +backlog pr comments [flags] +``` + +プルリクエストのコメント一覧を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--project` | `-p` | string | — | プロジェクトキー | +| `--repo` | `-R` | string | — | リポジトリ名 | +| `--limit` | `-L` | number | `20` | 取得件数 | + +## 使用例 + +```bash +backlog pr comments 42 --project PROJ --repo my-repo +backlog pr comments 42 --project PROJ --repo my-repo --limit 50 +``` diff --git a/docs/src/content/docs/commands/pr/create.md b/docs/src/content/docs/commands/pr/create.md new file mode 100644 index 0000000..cbf68d5 --- /dev/null +++ b/docs/src/content/docs/commands/pr/create.md @@ -0,0 +1,37 @@ +--- +title: backlog pr create +description: プルリクエストを作成する +--- + +``` +backlog pr create [flags] +``` + +新しいプルリクエストを作成します。 + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--repo` | `-R` | string | Yes | リポジトリ名 | +| `--title` | `-t` | string | Yes* | PR タイトル | +| `--body` | `-b` | string | Yes* | PR 説明 | +| `--base` | `-B` | string | Yes* | マージ先ブランチ | +| `--branch` | | string | No | マージ元ブランチ(デフォルト: 現在のブランチ) | +| `--assignee` | `-a` | string | No | 担当者 | +| `--issue` | | string | No | 関連課題キー | +| `--web` | | boolean | No | 作成後ブラウザで開く | + +> *: インタラクティブモードでは省略可能 + +## 使用例 + +```bash +backlog pr create --project PROJ --repo my-repo \ + --title "機能追加" --body "詳細な説明" \ + --base main --branch feature/new-feature + +backlog pr create --project PROJ --repo my-repo \ + --title "バグ修正" --base develop --issue PROJ-123 --web +``` diff --git a/docs/src/content/docs/commands/pr/edit.md b/docs/src/content/docs/commands/pr/edit.md new file mode 100644 index 0000000..c136b85 --- /dev/null +++ b/docs/src/content/docs/commands/pr/edit.md @@ -0,0 +1,33 @@ +--- +title: backlog pr edit +description: プルリクエストを編集する +--- + +``` +backlog pr edit [flags] +``` + +プルリクエストの情報を編集します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | +| `--title` | `-t` | string | タイトル | +| `--body` | `-b` | string | 説明 | +| `--assignee` | `-a` | string | 担当者 | +| `--issue` | | string | 関連課題キー | + +## 使用例 + +```bash +backlog pr edit 42 --project PROJ --repo my-repo --title "新しいタイトル" +``` diff --git a/docs/src/content/docs/commands/pr/index.md b/docs/src/content/docs/commands/pr/index.md new file mode 100644 index 0000000..9bf8fd2 --- /dev/null +++ b/docs/src/content/docs/commands/pr/index.md @@ -0,0 +1,21 @@ +--- +title: backlog pr +description: プルリクエストを管理します +--- + +Backlog Git のプルリクエストを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [pr list](/backlog-cli/commands/pr/list/) | プルリクエストの一覧を表示する | +| [pr view](/backlog-cli/commands/pr/view/) | プルリクエストの詳細を表示する | +| [pr create](/backlog-cli/commands/pr/create/) | プルリクエストを作成する | +| [pr edit](/backlog-cli/commands/pr/edit/) | プルリクエストを編集する | +| [pr close](/backlog-cli/commands/pr/close/) | プルリクエストをクローズする | +| [pr merge](/backlog-cli/commands/pr/merge/) | プルリクエストをマージする | +| [pr reopen](/backlog-cli/commands/pr/reopen/) | プルリクエストを再オープンする | +| [pr comment](/backlog-cli/commands/pr/comment/) | プルリクエストにコメントを追加する | +| [pr comments](/backlog-cli/commands/pr/comments/) | プルリクエストのコメント一覧を表示する | +| [pr status](/backlog-cli/commands/pr/status/) | 自分のプルリクエストの状態を表示する | diff --git a/docs/src/content/docs/commands/pr/list.md b/docs/src/content/docs/commands/pr/list.md new file mode 100644 index 0000000..10ab2d0 --- /dev/null +++ b/docs/src/content/docs/commands/pr/list.md @@ -0,0 +1,31 @@ +--- +title: backlog pr list +description: プルリクエストの一覧を表示する +--- + +``` +backlog pr list [flags] +``` + +プルリクエストの一覧を取得します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--project` | `-p` | string | — | プロジェクトキー | +| `--repo` | `-R` | string | — | リポジトリ名 | +| `--status` | `-S` | string | `open` | ステータス(`open` / `closed` / `merged`、カンマ区切り) | +| `--assignee` | `-a` | string | — | 担当者(ユーザー名 or `@me`) | +| `--created-by` | | string | — | 作成者 | +| `--issue` | | string | — | 関連課題キー | +| `--limit` | `-L` | number | `20` | 取得件数(1-100) | +| `--offset` | | number | `0` | オフセット | + +## 使用例 + +```bash +backlog pr list --project PROJ --repo my-repo +backlog pr list --project PROJ --repo my-repo --status closed +backlog pr list --project PROJ --repo my-repo --assignee @me +``` diff --git a/docs/src/content/docs/commands/pr/merge.md b/docs/src/content/docs/commands/pr/merge.md new file mode 100644 index 0000000..a8b5fd9 --- /dev/null +++ b/docs/src/content/docs/commands/pr/merge.md @@ -0,0 +1,31 @@ +--- +title: backlog pr merge +description: プルリクエストをマージする +--- + +``` +backlog pr merge [flags] +``` + +プルリクエストをマージします。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | +| `--comment` | `-c` | string | マージコメント | + +## 使用例 + +```bash +backlog pr merge 42 --project PROJ --repo my-repo +backlog pr merge 42 --project PROJ --repo my-repo --comment "LGTM" +``` diff --git a/docs/src/content/docs/commands/pr/reopen.md b/docs/src/content/docs/commands/pr/reopen.md new file mode 100644 index 0000000..dcc106b --- /dev/null +++ b/docs/src/content/docs/commands/pr/reopen.md @@ -0,0 +1,29 @@ +--- +title: backlog pr reopen +description: プルリクエストを再オープンする +--- + +``` +backlog pr reopen [flags] +``` + +クローズしたプルリクエストを再オープンします。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | + +## 使用例 + +```bash +backlog pr reopen 42 --project PROJ --repo my-repo +``` diff --git a/docs/src/content/docs/commands/pr/status.md b/docs/src/content/docs/commands/pr/status.md new file mode 100644 index 0000000..ee752e7 --- /dev/null +++ b/docs/src/content/docs/commands/pr/status.md @@ -0,0 +1,28 @@ +--- +title: backlog pr status +description: 自分のプルリクエストの状態を表示する +--- + +``` +backlog pr status [flags] +``` + +自分に割り当てられたプルリクエストの状態を表示します。 + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | + +## 使用例 + +```bash +backlog pr status --project PROJ --repo my-repo +``` + +## 関連コマンド + +- [pr list](/backlog-cli/commands/pr/list/) +- [status](/backlog-cli/commands/status/) diff --git a/docs/src/content/docs/commands/pr/view.md b/docs/src/content/docs/commands/pr/view.md new file mode 100644 index 0000000..17ceee4 --- /dev/null +++ b/docs/src/content/docs/commands/pr/view.md @@ -0,0 +1,33 @@ +--- +title: backlog pr view +description: プルリクエストの詳細を表示する +--- + +``` +backlog pr view [flags] +``` + +プルリクエストの詳細情報を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | プルリクエスト番号 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--repo` | `-R` | string | リポジトリ名 | +| `--comments` | | boolean | コメントも表示する | +| `--web` | | boolean | ブラウザで開く | + +## 使用例 + +```bash +backlog pr view 42 --project PROJ --repo my-repo +backlog pr view 42 --project PROJ --repo my-repo --comments +backlog pr view 42 --project PROJ --repo my-repo --web +``` diff --git a/docs/src/content/docs/commands/project/activities.md b/docs/src/content/docs/commands/project/activities.md new file mode 100644 index 0000000..f7d0925 --- /dev/null +++ b/docs/src/content/docs/commands/project/activities.md @@ -0,0 +1,30 @@ +--- +title: backlog project activities +description: プロジェクトの最近の更新を表示する +--- + +``` +backlog project activities [flags] +``` + +プロジェクトの最近のアクティビティを表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--activity-type` | | string | — | アクティビティタイプ ID(カンマ区切り) | + +## 使用例 + +```bash +backlog project activities PROJ +backlog project activities PROJ --limit 50 +``` diff --git a/docs/src/content/docs/commands/project/add-user.md b/docs/src/content/docs/commands/project/add-user.md new file mode 100644 index 0000000..fba81a5 --- /dev/null +++ b/docs/src/content/docs/commands/project/add-user.md @@ -0,0 +1,28 @@ +--- +title: backlog project add-user +description: プロジェクトにメンバーを追加する +--- + +``` +backlog project add-user [flags] +``` + +プロジェクトにメンバーを追加します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## オプション + +| フラグ | 型 | 必須 | 説明 | +|--------|------|------|------| +| `--user-id` | number | Yes | ユーザー ID | + +## 使用例 + +```bash +backlog project add-user PROJ --user-id 12345 +``` diff --git a/docs/src/content/docs/commands/project/create.md b/docs/src/content/docs/commands/project/create.md new file mode 100644 index 0000000..cec7c87 --- /dev/null +++ b/docs/src/content/docs/commands/project/create.md @@ -0,0 +1,28 @@ +--- +title: backlog project create +description: プロジェクトを作成する +--- + +``` +backlog project create [flags] +``` + +新しいプロジェクトを作成します。 + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--name` | `-n` | string | Yes | プロジェクト名 | +| `--key` | `-k` | string | Yes | プロジェクトキー(英大文字) | +| `--chart-enabled` | | boolean | No | チャート有効 | +| `--subtasking-enabled` | | boolean | No | サブタスク有効 | +| `--project-leader-can-edit-project-leader` | | boolean | No | PL 変更権限 | +| `--text-formatting-rule` | | string | No | 書式ルール(`markdown` / `backlog`) | + +## 使用例 + +```bash +backlog project create --name "新プロジェクト" --key NEWPROJ +backlog project create --name "開発プロジェクト" --key DEV --text-formatting-rule markdown +``` diff --git a/docs/src/content/docs/commands/project/delete.md b/docs/src/content/docs/commands/project/delete.md new file mode 100644 index 0000000..768ec4f --- /dev/null +++ b/docs/src/content/docs/commands/project/delete.md @@ -0,0 +1,29 @@ +--- +title: backlog project delete +description: プロジェクトを削除する +--- + +``` +backlog project delete [flags] +``` + +プロジェクトを削除します。この操作は元に戻せません。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--confirm` | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog project delete PROJ +backlog project delete PROJ --confirm +``` diff --git a/docs/src/content/docs/commands/project/edit.md b/docs/src/content/docs/commands/project/edit.md new file mode 100644 index 0000000..d976160 --- /dev/null +++ b/docs/src/content/docs/commands/project/edit.md @@ -0,0 +1,32 @@ +--- +title: backlog project edit +description: プロジェクトを編集する +--- + +``` +backlog project edit [flags] +``` + +プロジェクトの設定を編集します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--name` | `-n` | string | プロジェクト名 | +| `--key` | `-k` | string | 新しいプロジェクトキー | +| `--chart-enabled` | | boolean | チャート有効 | +| `--archived` | | boolean | アーカイブ | + +## 使用例 + +```bash +backlog project edit PROJ --name "リネーム後" +backlog project edit PROJ --archived +``` diff --git a/docs/src/content/docs/commands/project/index.md b/docs/src/content/docs/commands/project/index.md new file mode 100644 index 0000000..b808964 --- /dev/null +++ b/docs/src/content/docs/commands/project/index.md @@ -0,0 +1,20 @@ +--- +title: backlog project +description: プロジェクトを管理します +--- + +Backlog のプロジェクトを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [project list](/backlog-cli/commands/project/list/) | プロジェクトの一覧を表示する | +| [project view](/backlog-cli/commands/project/view/) | プロジェクトの詳細を表示する | +| [project create](/backlog-cli/commands/project/create/) | プロジェクトを作成する | +| [project edit](/backlog-cli/commands/project/edit/) | プロジェクトを編集する | +| [project delete](/backlog-cli/commands/project/delete/) | プロジェクトを削除する | +| [project users](/backlog-cli/commands/project/users/) | プロジェクトメンバーを表示する | +| [project add-user](/backlog-cli/commands/project/add-user/) | プロジェクトにメンバーを追加する | +| [project remove-user](/backlog-cli/commands/project/remove-user/) | プロジェクトからメンバーを削除する | +| [project activities](/backlog-cli/commands/project/activities/) | プロジェクトの最近の更新を表示する | diff --git a/docs/src/content/docs/commands/project/list.md b/docs/src/content/docs/commands/project/list.md new file mode 100644 index 0000000..c246e78 --- /dev/null +++ b/docs/src/content/docs/commands/project/list.md @@ -0,0 +1,31 @@ +--- +title: backlog project list +description: プロジェクトの一覧を表示する +--- + +``` +backlog project list [flags] +``` + +アクセス可能なプロジェクトの一覧を表示します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--archived` | | boolean | — | アーカイブ済みを含める | +| `--all` | | boolean | `false` | 全プロジェクト(管理者のみ) | +| `--limit` | `-L` | number | `20` | 表示件数 | + +## 使用例 + +```bash +# プロジェクト一覧 +backlog project list + +# アーカイブ済みを含める +backlog project list --archived + +# 全プロジェクトを表示(管理者のみ) +backlog project list --all +``` diff --git a/docs/src/content/docs/commands/project/remove-user.md b/docs/src/content/docs/commands/project/remove-user.md new file mode 100644 index 0000000..5240daa --- /dev/null +++ b/docs/src/content/docs/commands/project/remove-user.md @@ -0,0 +1,28 @@ +--- +title: backlog project remove-user +description: プロジェクトからメンバーを削除する +--- + +``` +backlog project remove-user [flags] +``` + +プロジェクトからメンバーを削除します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## オプション + +| フラグ | 型 | 必須 | 説明 | +|--------|------|------|------| +| `--user-id` | number | Yes | ユーザー ID | + +## 使用例 + +```bash +backlog project remove-user PROJ --user-id 12345 +``` diff --git a/docs/src/content/docs/commands/project/users.md b/docs/src/content/docs/commands/project/users.md new file mode 100644 index 0000000..5cdb4e1 --- /dev/null +++ b/docs/src/content/docs/commands/project/users.md @@ -0,0 +1,22 @@ +--- +title: backlog project users +description: プロジェクトメンバーを表示する +--- + +``` +backlog project users +``` + +プロジェクトに所属するメンバーの一覧を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## 使用例 + +```bash +backlog project users PROJ +``` diff --git a/docs/src/content/docs/commands/project/view.md b/docs/src/content/docs/commands/project/view.md new file mode 100644 index 0000000..edcda7d --- /dev/null +++ b/docs/src/content/docs/commands/project/view.md @@ -0,0 +1,29 @@ +--- +title: backlog project view +description: プロジェクトの詳細を表示する +--- + +``` +backlog project view [flags] +``` + +プロジェクトの詳細情報を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--web` | boolean | ブラウザで開く | + +## 使用例 + +```bash +backlog project view PROJ +backlog project view PROJ --web +``` diff --git a/docs/src/content/docs/commands/repo/clone.md b/docs/src/content/docs/commands/repo/clone.md new file mode 100644 index 0000000..198ae13 --- /dev/null +++ b/docs/src/content/docs/commands/repo/clone.md @@ -0,0 +1,30 @@ +--- +title: backlog repo clone +description: リポジトリをクローンする +--- + +``` +backlog repo clone [flags] +``` + +Backlog Git リポジトリをローカルにクローンします。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | リポジトリ名 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--directory` | `-d` | string | クローン先ディレクトリ | + +## 使用例 + +```bash +backlog repo clone my-repo --project PROJ +backlog repo clone my-repo --project PROJ --directory ./my-local-repo +``` diff --git a/docs/src/content/docs/commands/repo/index.md b/docs/src/content/docs/commands/repo/index.md new file mode 100644 index 0000000..88dd779 --- /dev/null +++ b/docs/src/content/docs/commands/repo/index.md @@ -0,0 +1,14 @@ +--- +title: backlog repo +description: Git リポジトリを管理します +--- + +Backlog Git のリポジトリを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [repo list](/backlog-cli/commands/repo/list/) | リポジトリの一覧を表示する | +| [repo view](/backlog-cli/commands/repo/view/) | リポジトリの詳細を表示する | +| [repo clone](/backlog-cli/commands/repo/clone/) | リポジトリをクローンする | diff --git a/docs/src/content/docs/commands/repo/list.md b/docs/src/content/docs/commands/repo/list.md new file mode 100644 index 0000000..9e63486 --- /dev/null +++ b/docs/src/content/docs/commands/repo/list.md @@ -0,0 +1,22 @@ +--- +title: backlog repo list +description: リポジトリの一覧を表示する +--- + +``` +backlog repo list +``` + +プロジェクトの Git リポジトリ一覧を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | プロジェクトキー | + +## 使用例 + +```bash +backlog repo list PROJ +``` diff --git a/docs/src/content/docs/commands/repo/view.md b/docs/src/content/docs/commands/repo/view.md new file mode 100644 index 0000000..c6e6065 --- /dev/null +++ b/docs/src/content/docs/commands/repo/view.md @@ -0,0 +1,30 @@ +--- +title: backlog repo view +description: リポジトリの詳細を表示する +--- + +``` +backlog repo view [flags] +``` + +Git リポジトリの詳細情報を表示します。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | string | Yes | リポジトリ名 | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--web` | | boolean | ブラウザで開く | + +## 使用例 + +```bash +backlog repo view my-repo --project PROJ +backlog repo view my-repo --project PROJ --web +``` diff --git a/docs/src/content/docs/commands/space/activities.md b/docs/src/content/docs/commands/space/activities.md new file mode 100644 index 0000000..9641fc1 --- /dev/null +++ b/docs/src/content/docs/commands/space/activities.md @@ -0,0 +1,24 @@ +--- +title: backlog space activities +description: スペースのアクティビティを表示する +--- + +``` +backlog space activities [flags] +``` + +スペース全体の最近のアクティビティを表示します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--activity-type` | | string | — | アクティビティタイプ ID(カンマ区切り) | + +## 使用例 + +```bash +backlog space activities +backlog space activities --limit 50 +``` diff --git a/docs/src/content/docs/commands/space/disk-usage.md b/docs/src/content/docs/commands/space/disk-usage.md new file mode 100644 index 0000000..87c8e10 --- /dev/null +++ b/docs/src/content/docs/commands/space/disk-usage.md @@ -0,0 +1,16 @@ +--- +title: backlog space disk-usage +description: ディスク使用量を表示する +--- + +``` +backlog space disk-usage +``` + +スペースのディスク使用量を表示します。 + +## 使用例 + +```bash +backlog space disk-usage +``` diff --git a/docs/src/content/docs/commands/space/index.md b/docs/src/content/docs/commands/space/index.md new file mode 100644 index 0000000..4b0ef0b --- /dev/null +++ b/docs/src/content/docs/commands/space/index.md @@ -0,0 +1,15 @@ +--- +title: backlog space +description: スペースを管理します +--- + +Backlog スペースの情報を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [space info](/backlog-cli/commands/space/info/) | スペース情報を表示する | +| [space activities](/backlog-cli/commands/space/activities/) | スペースのアクティビティを表示する | +| [space disk-usage](/backlog-cli/commands/space/disk-usage/) | ディスク使用量を表示する | +| [space notification](/backlog-cli/commands/space/notification/) | スペース通知を表示する | diff --git a/docs/src/content/docs/commands/space/info.md b/docs/src/content/docs/commands/space/info.md new file mode 100644 index 0000000..d31b5c6 --- /dev/null +++ b/docs/src/content/docs/commands/space/info.md @@ -0,0 +1,16 @@ +--- +title: backlog space info +description: スペース情報を表示する +--- + +``` +backlog space info +``` + +スペースの基本情報を表示します。 + +## 使用例 + +```bash +backlog space info +``` diff --git a/docs/src/content/docs/commands/space/notification.md b/docs/src/content/docs/commands/space/notification.md new file mode 100644 index 0000000..13fde9e --- /dev/null +++ b/docs/src/content/docs/commands/space/notification.md @@ -0,0 +1,16 @@ +--- +title: backlog space notification +description: スペース通知を表示する +--- + +``` +backlog space notification +``` + +スペースのお知らせ通知を表示します。 + +## 使用例 + +```bash +backlog space notification +``` diff --git a/docs/src/content/docs/commands/star/add.md b/docs/src/content/docs/commands/star/add.md new file mode 100644 index 0000000..29c154e --- /dev/null +++ b/docs/src/content/docs/commands/star/add.md @@ -0,0 +1,26 @@ +--- +title: backlog star add +description: スターを追加する +--- + +``` +backlog star add [flags] +``` + +課題、コメント、Wiki ページ、PR コメントにスターを追加します。いずれか1つを指定してください。 + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--issue` | string | 課題キー | +| `--comment` | number | コメント ID | +| `--wiki` | number | Wiki ID | +| `--pr-comment` | number | PR コメント ID | + +## 使用例 + +```bash +backlog star add --issue PROJECT-123 +backlog star add --wiki 12345 +``` diff --git a/docs/src/content/docs/commands/star/count.md b/docs/src/content/docs/commands/star/count.md new file mode 100644 index 0000000..66d317d --- /dev/null +++ b/docs/src/content/docs/commands/star/count.md @@ -0,0 +1,28 @@ +--- +title: backlog star count +description: スター数を表示する +--- + +``` +backlog star count [user-id] [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `[user-id]` | number | No | ユーザー ID(省略時は自分) | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--since` | string | 開始日(`yyyy-MM-dd`) | +| `--until` | string | 終了日(`yyyy-MM-dd`) | + +## 使用例 + +```bash +backlog star count +backlog star count --since 2025-01-01 --until 2025-12-31 +``` diff --git a/docs/src/content/docs/commands/star/index.md b/docs/src/content/docs/commands/star/index.md new file mode 100644 index 0000000..d04f8d7 --- /dev/null +++ b/docs/src/content/docs/commands/star/index.md @@ -0,0 +1,14 @@ +--- +title: backlog star +description: スターを管理します +--- + +スターの追加・一覧表示を行うコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [star add](/backlog-cli/commands/star/add/) | スターを追加する | +| [star list](/backlog-cli/commands/star/list/) | スターの一覧を表示する | +| [star count](/backlog-cli/commands/star/count/) | スター数を表示する | diff --git a/docs/src/content/docs/commands/star/list.md b/docs/src/content/docs/commands/star/list.md new file mode 100644 index 0000000..4b6d6b6 --- /dev/null +++ b/docs/src/content/docs/commands/star/list.md @@ -0,0 +1,28 @@ +--- +title: backlog star list +description: スターの一覧を表示する +--- + +``` +backlog star list [user-id] [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `[user-id]` | number | No | ユーザー ID(省略時は自分) | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--order` | | string | `desc` | 並び順(`asc` / `desc`) | + +## 使用例 + +```bash +backlog star list +backlog star list 12345 +``` diff --git a/docs/src/content/docs/commands/status-type/create.md b/docs/src/content/docs/commands/status-type/create.md new file mode 100644 index 0000000..4430c37 --- /dev/null +++ b/docs/src/content/docs/commands/status-type/create.md @@ -0,0 +1,22 @@ +--- +title: backlog status-type create +description: ステータスを作成する +--- + +``` +backlog status-type create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes | ステータス名 | +| `--color` | | string | Yes | 表示色(`#hex` 形式) | + +## 使用例 + +```bash +backlog status-type create --project PROJ --name "レビュー中" --color "#0000ff" +``` diff --git a/docs/src/content/docs/commands/status-type/delete.md b/docs/src/content/docs/commands/status-type/delete.md new file mode 100644 index 0000000..33ca1bf --- /dev/null +++ b/docs/src/content/docs/commands/status-type/delete.md @@ -0,0 +1,30 @@ +--- +title: backlog status-type delete +description: ステータスを削除する +--- + +``` +backlog status-type delete [flags] +``` + +削除するステータスに紐づく課題の移行先として、代替のステータス ID を指定する必要があります。 + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ステータス ID | + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--substitute-status-id` | | number | Yes | 代替ステータス ID | +| `--confirm` | | boolean | No | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog status-type delete 12345 --project PROJ --substitute-status-id 67890 +``` diff --git a/docs/src/content/docs/commands/status-type/edit.md b/docs/src/content/docs/commands/status-type/edit.md new file mode 100644 index 0000000..d093c33 --- /dev/null +++ b/docs/src/content/docs/commands/status-type/edit.md @@ -0,0 +1,28 @@ +--- +title: backlog status-type edit +description: ステータスを編集する +--- + +``` +backlog status-type edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ステータス ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--name` | `-n` | string | ステータス名 | +| `--color` | | string | 表示色(`#hex` 形式) | + +## 使用例 + +```bash +backlog status-type edit 12345 --project PROJ --name "確認待ち" +``` diff --git a/docs/src/content/docs/commands/status-type/index.md b/docs/src/content/docs/commands/status-type/index.md new file mode 100644 index 0000000..758cc68 --- /dev/null +++ b/docs/src/content/docs/commands/status-type/index.md @@ -0,0 +1,15 @@ +--- +title: backlog status-type +description: 課題ステータスを管理します +--- + +プロジェクトの課題ステータスを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [status-type list](/backlog-cli/commands/status-type/list/) | ステータスの一覧を表示する | +| [status-type create](/backlog-cli/commands/status-type/create/) | ステータスを作成する | +| [status-type edit](/backlog-cli/commands/status-type/edit/) | ステータスを編集する | +| [status-type delete](/backlog-cli/commands/status-type/delete/) | ステータスを削除する | diff --git a/docs/src/content/docs/commands/status-type/list.md b/docs/src/content/docs/commands/status-type/list.md new file mode 100644 index 0000000..29a3acd --- /dev/null +++ b/docs/src/content/docs/commands/status-type/list.md @@ -0,0 +1,20 @@ +--- +title: backlog status-type list +description: ステータスの一覧を表示する +--- + +``` +backlog status-type list [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog status-type list --project PROJ +``` diff --git a/docs/src/content/docs/commands/status.md b/docs/src/content/docs/commands/status.md new file mode 100644 index 0000000..6e99fe1 --- /dev/null +++ b/docs/src/content/docs/commands/status.md @@ -0,0 +1,22 @@ +--- +title: backlog status +description: ダッシュボードサマリーを表示する +--- + +``` +backlog status +``` + +自分に割り当てられた課題、未読通知、最近の更新のサマリーを表示します。 + +## 使用例 + +```bash +backlog status +``` + +## 関連コマンド + +- [issue list](/backlog-cli/commands/issue/list/) +- [issue status](/backlog-cli/commands/issue/status/) +- [notification list](/backlog-cli/commands/notification/list/) diff --git a/docs/src/content/docs/commands/team/create.md b/docs/src/content/docs/commands/team/create.md new file mode 100644 index 0000000..84ec5f9 --- /dev/null +++ b/docs/src/content/docs/commands/team/create.md @@ -0,0 +1,22 @@ +--- +title: backlog team create +description: チームを作成する +--- + +``` +backlog team create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--name` | `-n` | string | Yes | チーム名 | +| `--members` | | string | No | メンバー ID(カンマ区切り) | + +## 使用例 + +```bash +backlog team create --name "開発チーム" +backlog team create --name "開発チーム" --members 123,456,789 +``` diff --git a/docs/src/content/docs/commands/team/delete.md b/docs/src/content/docs/commands/team/delete.md new file mode 100644 index 0000000..f6815b3 --- /dev/null +++ b/docs/src/content/docs/commands/team/delete.md @@ -0,0 +1,27 @@ +--- +title: backlog team delete +description: チームを削除する +--- + +``` +backlog team delete [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | チーム ID | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--confirm` | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog team delete 12345 +backlog team delete 12345 --confirm +``` diff --git a/docs/src/content/docs/commands/team/edit.md b/docs/src/content/docs/commands/team/edit.md new file mode 100644 index 0000000..76f612e --- /dev/null +++ b/docs/src/content/docs/commands/team/edit.md @@ -0,0 +1,27 @@ +--- +title: backlog team edit +description: チームを編集する +--- + +``` +backlog team edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | チーム ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--name` | `-n` | string | チーム名 | +| `--members` | | string | メンバー ID(カンマ区切り) | + +## 使用例 + +```bash +backlog team edit 12345 --name "新チーム名" +``` diff --git a/docs/src/content/docs/commands/team/index.md b/docs/src/content/docs/commands/team/index.md new file mode 100644 index 0000000..ecb6ac0 --- /dev/null +++ b/docs/src/content/docs/commands/team/index.md @@ -0,0 +1,16 @@ +--- +title: backlog team +description: チームを管理します +--- + +Backlog のチームを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [team list](/backlog-cli/commands/team/list/) | チームの一覧を表示する | +| [team view](/backlog-cli/commands/team/view/) | チームの詳細を表示する | +| [team create](/backlog-cli/commands/team/create/) | チームを作成する | +| [team edit](/backlog-cli/commands/team/edit/) | チームを編集する | +| [team delete](/backlog-cli/commands/team/delete/) | チームを削除する | diff --git a/docs/src/content/docs/commands/team/list.md b/docs/src/content/docs/commands/team/list.md new file mode 100644 index 0000000..34fc1e0 --- /dev/null +++ b/docs/src/content/docs/commands/team/list.md @@ -0,0 +1,23 @@ +--- +title: backlog team list +description: チームの一覧を表示する +--- + +``` +backlog team list [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--order` | | string | `desc` | 並び順(`asc` / `desc`) | +| `--offset` | | number | `0` | オフセット | +| `--limit` | `-L` | number | `20` | 取得件数 | + +## 使用例 + +```bash +backlog team list +backlog team list --limit 50 +``` diff --git a/docs/src/content/docs/commands/team/view.md b/docs/src/content/docs/commands/team/view.md new file mode 100644 index 0000000..78f01da --- /dev/null +++ b/docs/src/content/docs/commands/team/view.md @@ -0,0 +1,20 @@ +--- +title: backlog team view +description: チームの詳細を表示する +--- + +``` +backlog team view +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | チーム ID | + +## 使用例 + +```bash +backlog team view 12345 +``` diff --git a/docs/src/content/docs/commands/user/activities.md b/docs/src/content/docs/commands/user/activities.md new file mode 100644 index 0000000..297264e --- /dev/null +++ b/docs/src/content/docs/commands/user/activities.md @@ -0,0 +1,28 @@ +--- +title: backlog user activities +description: ユーザーのアクティビティを表示する +--- + +``` +backlog user activities [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ユーザー ID | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--activity-type` | | string | — | アクティビティタイプ ID(カンマ区切り) | + +## 使用例 + +```bash +backlog user activities 12345 +backlog user activities 12345 --limit 50 +``` diff --git a/docs/src/content/docs/commands/user/index.md b/docs/src/content/docs/commands/user/index.md new file mode 100644 index 0000000..06a3c4c --- /dev/null +++ b/docs/src/content/docs/commands/user/index.md @@ -0,0 +1,15 @@ +--- +title: backlog user +description: ユーザーを管理します +--- + +Backlog のユーザー情報を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [user list](/backlog-cli/commands/user/list/) | ユーザーの一覧を表示する | +| [user view](/backlog-cli/commands/user/view/) | ユーザーの詳細を表示する | +| [user me](/backlog-cli/commands/user/me/) | 自分のユーザー情報を表示する | +| [user activities](/backlog-cli/commands/user/activities/) | ユーザーのアクティビティを表示する | diff --git a/docs/src/content/docs/commands/user/list.md b/docs/src/content/docs/commands/user/list.md new file mode 100644 index 0000000..d568d06 --- /dev/null +++ b/docs/src/content/docs/commands/user/list.md @@ -0,0 +1,16 @@ +--- +title: backlog user list +description: ユーザーの一覧を表示する +--- + +``` +backlog user list +``` + +スペースのユーザー一覧を表示します。 + +## 使用例 + +```bash +backlog user list +``` diff --git a/docs/src/content/docs/commands/user/me.md b/docs/src/content/docs/commands/user/me.md new file mode 100644 index 0000000..7fab939 --- /dev/null +++ b/docs/src/content/docs/commands/user/me.md @@ -0,0 +1,16 @@ +--- +title: backlog user me +description: 自分のユーザー情報を表示する +--- + +``` +backlog user me +``` + +認証済みの自分のユーザー情報を表示します。 + +## 使用例 + +```bash +backlog user me +``` diff --git a/docs/src/content/docs/commands/user/view.md b/docs/src/content/docs/commands/user/view.md new file mode 100644 index 0000000..b18640f --- /dev/null +++ b/docs/src/content/docs/commands/user/view.md @@ -0,0 +1,20 @@ +--- +title: backlog user view +description: ユーザーの詳細を表示する +--- + +``` +backlog user view +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ユーザー ID | + +## 使用例 + +```bash +backlog user view 12345 +``` diff --git a/docs/src/content/docs/commands/watching/add.md b/docs/src/content/docs/commands/watching/add.md new file mode 100644 index 0000000..3e283e5 --- /dev/null +++ b/docs/src/content/docs/commands/watching/add.md @@ -0,0 +1,22 @@ +--- +title: backlog watching add +description: ウォッチを追加する +--- + +``` +backlog watching add [flags] +``` + +## オプション + +| フラグ | 型 | 必須 | 説明 | +|--------|------|------|------| +| `--issue` | string | Yes | 課題キー | +| `--note` | string | No | メモ | + +## 使用例 + +```bash +backlog watching add --issue PROJECT-123 +backlog watching add --issue PROJECT-123 --note "進捗を確認する" +``` diff --git a/docs/src/content/docs/commands/watching/delete.md b/docs/src/content/docs/commands/watching/delete.md new file mode 100644 index 0000000..3bbdf5e --- /dev/null +++ b/docs/src/content/docs/commands/watching/delete.md @@ -0,0 +1,27 @@ +--- +title: backlog watching delete +description: ウォッチを削除する +--- + +``` +backlog watching delete [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ウォッチ ID | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--confirm` | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog watching delete 12345 +backlog watching delete 12345 --confirm +``` diff --git a/docs/src/content/docs/commands/watching/index.md b/docs/src/content/docs/commands/watching/index.md new file mode 100644 index 0000000..3dc8463 --- /dev/null +++ b/docs/src/content/docs/commands/watching/index.md @@ -0,0 +1,16 @@ +--- +title: backlog watching +description: ウォッチを管理します +--- + +課題のウォッチを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [watching list](/backlog-cli/commands/watching/list/) | ウォッチの一覧を表示する | +| [watching add](/backlog-cli/commands/watching/add/) | ウォッチを追加する | +| [watching view](/backlog-cli/commands/watching/view/) | ウォッチの詳細を表示する | +| [watching delete](/backlog-cli/commands/watching/delete/) | ウォッチを削除する | +| [watching read](/backlog-cli/commands/watching/read/) | ウォッチを既読にする | diff --git a/docs/src/content/docs/commands/watching/list.md b/docs/src/content/docs/commands/watching/list.md new file mode 100644 index 0000000..9c80bc2 --- /dev/null +++ b/docs/src/content/docs/commands/watching/list.md @@ -0,0 +1,29 @@ +--- +title: backlog watching list +description: ウォッチの一覧を表示する +--- + +``` +backlog watching list [user-id] [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `[user-id]` | number | No | ユーザー ID(省略時は自分) | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--order` | | string | `desc` | 並び順(`asc` / `desc`) | +| `--sort` | | string | — | ソートキー | + +## 使用例 + +```bash +backlog watching list +backlog watching list --limit 50 +``` diff --git a/docs/src/content/docs/commands/watching/read.md b/docs/src/content/docs/commands/watching/read.md new file mode 100644 index 0000000..d2769f4 --- /dev/null +++ b/docs/src/content/docs/commands/watching/read.md @@ -0,0 +1,20 @@ +--- +title: backlog watching read +description: ウォッチを既読にする +--- + +``` +backlog watching read +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ウォッチ ID | + +## 使用例 + +```bash +backlog watching read 12345 +``` diff --git a/docs/src/content/docs/commands/watching/view.md b/docs/src/content/docs/commands/watching/view.md new file mode 100644 index 0000000..bb1d3cf --- /dev/null +++ b/docs/src/content/docs/commands/watching/view.md @@ -0,0 +1,20 @@ +--- +title: backlog watching view +description: ウォッチの詳細を表示する +--- + +``` +backlog watching view +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ウォッチ ID | + +## 使用例 + +```bash +backlog watching view 12345 +``` diff --git a/docs/src/content/docs/commands/webhook/create.md b/docs/src/content/docs/commands/webhook/create.md new file mode 100644 index 0000000..6bdafb1 --- /dev/null +++ b/docs/src/content/docs/commands/webhook/create.md @@ -0,0 +1,28 @@ +--- +title: backlog webhook create +description: Webhook を作成する +--- + +``` +backlog webhook create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes | Webhook 名 | +| `--hook-url` | | string | Yes | 通知先 URL | +| `--description` | `-d` | string | No | 説明 | +| `--all-event` | | boolean | No | 全イベント対象 | +| `--activity-type-ids` | | string | No | 対象イベントタイプ ID(カンマ区切り) | + +## 使用例 + +```bash +backlog webhook create --project PROJ \ + --name "Slack通知" \ + --hook-url "https://hooks.slack.com/services/xxx" \ + --all-event +``` diff --git a/docs/src/content/docs/commands/webhook/delete.md b/docs/src/content/docs/commands/webhook/delete.md new file mode 100644 index 0000000..0653ac7 --- /dev/null +++ b/docs/src/content/docs/commands/webhook/delete.md @@ -0,0 +1,28 @@ +--- +title: backlog webhook delete +description: Webhook を削除する +--- + +``` +backlog webhook delete [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | Webhook ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--confirm` | | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog webhook delete 12345 --project PROJ +backlog webhook delete 12345 --project PROJ --confirm +``` diff --git a/docs/src/content/docs/commands/webhook/edit.md b/docs/src/content/docs/commands/webhook/edit.md new file mode 100644 index 0000000..b76bdfb --- /dev/null +++ b/docs/src/content/docs/commands/webhook/edit.md @@ -0,0 +1,31 @@ +--- +title: backlog webhook edit +description: Webhook を編集する +--- + +``` +backlog webhook edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | Webhook ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | +| `--name` | `-n` | string | Webhook 名 | +| `--hook-url` | | string | 通知先 URL | +| `--description` | `-d` | string | 説明 | +| `--all-event` | | boolean | 全イベント対象 | +| `--activity-type-ids` | | string | イベントタイプ ID(カンマ区切り) | + +## 使用例 + +```bash +backlog webhook edit 12345 --project PROJ --name "新しい名前" +``` diff --git a/docs/src/content/docs/commands/webhook/index.md b/docs/src/content/docs/commands/webhook/index.md new file mode 100644 index 0000000..78751e9 --- /dev/null +++ b/docs/src/content/docs/commands/webhook/index.md @@ -0,0 +1,16 @@ +--- +title: backlog webhook +description: Webhook を管理します +--- + +プロジェクトの Webhook を管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [webhook list](/backlog-cli/commands/webhook/list/) | Webhook の一覧を表示する | +| [webhook view](/backlog-cli/commands/webhook/view/) | Webhook の詳細を表示する | +| [webhook create](/backlog-cli/commands/webhook/create/) | Webhook を作成する | +| [webhook edit](/backlog-cli/commands/webhook/edit/) | Webhook を編集する | +| [webhook delete](/backlog-cli/commands/webhook/delete/) | Webhook を削除する | diff --git a/docs/src/content/docs/commands/webhook/list.md b/docs/src/content/docs/commands/webhook/list.md new file mode 100644 index 0000000..37a47b9 --- /dev/null +++ b/docs/src/content/docs/commands/webhook/list.md @@ -0,0 +1,20 @@ +--- +title: backlog webhook list +description: Webhook の一覧を表示する +--- + +``` +backlog webhook list [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog webhook list --project PROJ +``` diff --git a/docs/src/content/docs/commands/webhook/view.md b/docs/src/content/docs/commands/webhook/view.md new file mode 100644 index 0000000..58e76e4 --- /dev/null +++ b/docs/src/content/docs/commands/webhook/view.md @@ -0,0 +1,26 @@ +--- +title: backlog webhook view +description: Webhook の詳細を表示する +--- + +``` +backlog webhook view [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | Webhook ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog webhook view 12345 --project PROJ +``` diff --git a/docs/src/content/docs/commands/wiki/attachments.md b/docs/src/content/docs/commands/wiki/attachments.md new file mode 100644 index 0000000..28125c8 --- /dev/null +++ b/docs/src/content/docs/commands/wiki/attachments.md @@ -0,0 +1,20 @@ +--- +title: backlog wiki attachments +description: Wiki ページの添付ファイル一覧を表示する +--- + +``` +backlog wiki attachments +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ページ ID | + +## 使用例 + +```bash +backlog wiki attachments 12345 +``` diff --git a/docs/src/content/docs/commands/wiki/count.md b/docs/src/content/docs/commands/wiki/count.md new file mode 100644 index 0000000..adc40ce --- /dev/null +++ b/docs/src/content/docs/commands/wiki/count.md @@ -0,0 +1,22 @@ +--- +title: backlog wiki count +description: Wiki ページ数を表示する +--- + +``` +backlog wiki count [flags] +``` + +プロジェクトの Wiki ページ数を表示します。 + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog wiki count --project PROJ +``` diff --git a/docs/src/content/docs/commands/wiki/create.md b/docs/src/content/docs/commands/wiki/create.md new file mode 100644 index 0000000..c9a78fd --- /dev/null +++ b/docs/src/content/docs/commands/wiki/create.md @@ -0,0 +1,23 @@ +--- +title: backlog wiki create +description: Wiki ページを作成する +--- + +``` +backlog wiki create [flags] +``` + +## オプション + +| フラグ | 短縮 | 型 | 必須 | 説明 | +|--------|------|------|------|------| +| `--project` | `-p` | string | Yes | プロジェクトキー | +| `--name` | `-n` | string | Yes* | ページ名 | +| `--body` | `-b` | string | Yes* | 本文 | +| `--notify` | | boolean | No | メール通知 | + +## 使用例 + +```bash +backlog wiki create --project PROJ --name "設計ドキュメント" --body "# 概要" +``` diff --git a/docs/src/content/docs/commands/wiki/delete.md b/docs/src/content/docs/commands/wiki/delete.md new file mode 100644 index 0000000..bdae1bf --- /dev/null +++ b/docs/src/content/docs/commands/wiki/delete.md @@ -0,0 +1,27 @@ +--- +title: backlog wiki delete +description: Wiki ページを削除する +--- + +``` +backlog wiki delete [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ページ ID | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--confirm` | boolean | 確認プロンプトをスキップ | + +## 使用例 + +```bash +backlog wiki delete 12345 +backlog wiki delete 12345 --confirm +``` diff --git a/docs/src/content/docs/commands/wiki/edit.md b/docs/src/content/docs/commands/wiki/edit.md new file mode 100644 index 0000000..db2f6c8 --- /dev/null +++ b/docs/src/content/docs/commands/wiki/edit.md @@ -0,0 +1,29 @@ +--- +title: backlog wiki edit +description: Wiki ページを編集する +--- + +``` +backlog wiki edit [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ページ ID | + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--name` | `-n` | string | ページ名 | +| `--body` | `-b` | string | 本文 | +| `--notify` | | boolean | メール通知 | + +## 使用例 + +```bash +backlog wiki edit 12345 --name "新しいタイトル" +backlog wiki edit 12345 --body "更新された内容" +``` diff --git a/docs/src/content/docs/commands/wiki/history.md b/docs/src/content/docs/commands/wiki/history.md new file mode 100644 index 0000000..3c75d1f --- /dev/null +++ b/docs/src/content/docs/commands/wiki/history.md @@ -0,0 +1,28 @@ +--- +title: backlog wiki history +description: Wiki ページの編集履歴を表示する +--- + +``` +backlog wiki history [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | ページ ID | + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--limit` | `-L` | number | `20` | 取得件数 | +| `--offset` | | number | `0` | オフセット | + +## 使用例 + +```bash +backlog wiki history 12345 +backlog wiki history 12345 --limit 50 +``` diff --git a/docs/src/content/docs/commands/wiki/index.md b/docs/src/content/docs/commands/wiki/index.md new file mode 100644 index 0000000..ab09320 --- /dev/null +++ b/docs/src/content/docs/commands/wiki/index.md @@ -0,0 +1,20 @@ +--- +title: backlog wiki +description: Wiki ページを管理します +--- + +Backlog の Wiki ページを管理するコマンド群です。 + +## サブコマンド + +| コマンド | 説明 | +|----------|------| +| [wiki list](/backlog-cli/commands/wiki/list/) | Wiki ページの一覧を表示する | +| [wiki view](/backlog-cli/commands/wiki/view/) | Wiki ページの詳細を表示する | +| [wiki create](/backlog-cli/commands/wiki/create/) | Wiki ページを作成する | +| [wiki edit](/backlog-cli/commands/wiki/edit/) | Wiki ページを編集する | +| [wiki delete](/backlog-cli/commands/wiki/delete/) | Wiki ページを削除する | +| [wiki count](/backlog-cli/commands/wiki/count/) | Wiki ページ数を表示する | +| [wiki tags](/backlog-cli/commands/wiki/tags/) | Wiki タグの一覧を表示する | +| [wiki history](/backlog-cli/commands/wiki/history/) | Wiki ページの編集履歴を表示する | +| [wiki attachments](/backlog-cli/commands/wiki/attachments/) | Wiki ページの添付ファイル一覧を表示する | diff --git a/docs/src/content/docs/commands/wiki/list.md b/docs/src/content/docs/commands/wiki/list.md new file mode 100644 index 0000000..dcd8028 --- /dev/null +++ b/docs/src/content/docs/commands/wiki/list.md @@ -0,0 +1,28 @@ +--- +title: backlog wiki list +description: Wiki ページの一覧を表示する +--- + +``` +backlog wiki list [flags] +``` + +Wiki ページの一覧を取得します。 + +## オプション + +| フラグ | 短縮 | 型 | デフォルト | 説明 | +|--------|------|------|------------|------| +| `--project` | `-p` | string | — | プロジェクトキー | +| `--keyword` | `-k` | string | — | キーワード検索 | +| `--sort` | | string | `updated` | ソートキー | +| `--order` | | string | `desc` | 並び順(`asc` / `desc`) | +| `--offset` | | number | `0` | オフセット | +| `--limit` | `-L` | number | `20` | 取得件数 | + +## 使用例 + +```bash +backlog wiki list --project PROJ +backlog wiki list --project PROJ --keyword "設計" +``` diff --git a/docs/src/content/docs/commands/wiki/tags.md b/docs/src/content/docs/commands/wiki/tags.md new file mode 100644 index 0000000..f43f48c --- /dev/null +++ b/docs/src/content/docs/commands/wiki/tags.md @@ -0,0 +1,22 @@ +--- +title: backlog wiki tags +description: Wiki タグの一覧を表示する +--- + +``` +backlog wiki tags [flags] +``` + +プロジェクトの Wiki タグ一覧を表示します。 + +## オプション + +| フラグ | 短縮 | 型 | 説明 | +|--------|------|------|------| +| `--project` | `-p` | string | プロジェクトキー | + +## 使用例 + +```bash +backlog wiki tags --project PROJ +``` diff --git a/docs/src/content/docs/commands/wiki/view.md b/docs/src/content/docs/commands/wiki/view.md new file mode 100644 index 0000000..24a327f --- /dev/null +++ b/docs/src/content/docs/commands/wiki/view.md @@ -0,0 +1,27 @@ +--- +title: backlog wiki view +description: Wiki ページの詳細を表示する +--- + +``` +backlog wiki view [flags] +``` + +## 引数 + +| 引数 | 型 | 必須 | 説明 | +|------|------|------|------| +| `` | number | Yes | Wiki ページ ID | + +## オプション + +| フラグ | 型 | 説明 | +|--------|------|------| +| `--web` | boolean | ブラウザで開く | + +## 使用例 + +```bash +backlog wiki view 12345 +backlog wiki view 12345 --web +``` diff --git a/docs/src/content/docs/getting-started/installation.md b/docs/src/content/docs/getting-started/installation.md new file mode 100644 index 0000000..1e6b81f --- /dev/null +++ b/docs/src/content/docs/getting-started/installation.md @@ -0,0 +1,34 @@ +--- +title: インストール +description: Backlog CLI のインストール方法 +--- + +## 前提条件 + +Backlog CLI の実行には [Bun](https://bun.sh/) ランタイムが必要です。 + +```bash +curl -fsSL https://bun.sh/install | bash +``` + +## インストール + +```bash +bun install -g @simochee/backlog-cli +``` + +## アップデート + +```bash +bun install -g @simochee/backlog-cli@latest +``` + +## バージョン確認 + +```bash +backlog --version +``` + +## 次のステップ + +インストールが完了したら、[クイックスタート](/backlog-cli/getting-started/quickstart/)に進んで認証を設定しましょう。 diff --git a/docs/src/content/docs/getting-started/quickstart.md b/docs/src/content/docs/getting-started/quickstart.md new file mode 100644 index 0000000..715c6ed --- /dev/null +++ b/docs/src/content/docs/getting-started/quickstart.md @@ -0,0 +1,83 @@ +--- +title: クイックスタート +description: Backlog CLI を使い始めるための基本的な手順 +--- + +## 認証 + +まず Backlog スペースに認証します。 + +```bash +backlog auth login +``` + +対話形式でホスト名と認証方式を選択できます。API キーを使う場合は以下のように指定します。 + +```bash +backlog auth login --hostname your-space.backlog.com --method api-key +``` + +認証状態を確認するには: + +```bash +backlog auth status +``` + +## 基本操作 + +### 課題の一覧 + +```bash +backlog issue list --project YOUR_PROJECT +``` + +### 課題の作成 + +```bash +backlog issue create --project YOUR_PROJECT --title "新しい課題" --type バグ --priority 高 +``` + +### 課題の詳細 + +```bash +backlog issue view PROJECT-123 +``` + +### プロジェクトの一覧 + +```bash +backlog project list +``` + +### 通知の確認 + +```bash +backlog notification list +``` + +### ダッシュボード + +自分に割り当てられた課題や未読通知の概要を表示します。 + +```bash +backlog status +``` + +## 出力形式 + +デフォルトではテーブル形式で出力されます。JSON 形式で取得する場合は `--json` フラグを使用します。 + +```bash +backlog issue list --project YOUR_PROJECT --json +``` + +詳しくは[出力形式](/backlog-cli/guides/output-formatting/)を参照してください。 + +## ヘルプ + +各コマンドのヘルプは `--help` フラグで表示できます。 + +```bash +backlog issue --help +backlog issue create --help +``` diff --git a/docs/src/content/docs/guides/authentication.md b/docs/src/content/docs/guides/authentication.md new file mode 100644 index 0000000..1ba548c --- /dev/null +++ b/docs/src/content/docs/guides/authentication.md @@ -0,0 +1,100 @@ +--- +title: 認証 +description: Backlog CLI の認証設定と複数スペースの管理 +--- + +Backlog CLI は API キーと OAuth 2.0 の2つの認証方式をサポートしています。 + +## 認証方式 + +### API キー + +最もシンプルな認証方式です。Backlog の個人設定から API キーを発行して使用します。 + +```bash +backlog auth login --method api-key +``` + +パイプで API キーを渡すこともできます。 + +```bash +echo "YOUR_API_KEY" | backlog auth login --with-token +``` + +### OAuth 2.0 + +OAuth 2.0 による認証も利用可能です。 + +```bash +backlog auth login --method oauth +``` + +OAuth トークンの有効期限が切れた場合はリフレッシュできます。 + +```bash +backlog auth refresh +``` + +## 認証状態の確認 + +```bash +backlog auth status +``` + +特定のスペースの認証状態を確認する場合: + +```bash +backlog auth status --hostname your-space.backlog.com +``` + +トークンを表示する場合: + +```bash +backlog auth status --show-token +``` + +## 複数スペースの管理 + +複数の Backlog スペースに認証することができます。 + +```bash +# スペース A に認証 +backlog auth login --hostname space-a.backlog.com + +# スペース B に認証 +backlog auth login --hostname space-b.backlog.com +``` + +### デフォルトスペースの切り替え + +```bash +backlog auth switch --hostname space-b.backlog.com +``` + +### コマンド実行時のスペース指定 + +`--space` グローバルフラグで一時的にスペースを切り替えられます。 + +```bash +backlog issue list --project PROJ --space space-b.backlog.com +``` + +### スペース解決の優先順位 + +1. `--space` フラグ +2. `BACKLOG_SPACE` 環境変数 +3. 設定ファイルの `defaultSpace` + +## 認証情報の保存場所 + +認証情報は `~/.backlogrc` ファイルに保存されます。 + +## ログアウト + +```bash +# デフォルトスペースからログアウト +backlog auth logout + +# 特定のスペースからログアウト +backlog auth logout --hostname your-space.backlog.com +``` diff --git a/docs/src/content/docs/guides/configuration.md b/docs/src/content/docs/guides/configuration.md new file mode 100644 index 0000000..1ea8e0f --- /dev/null +++ b/docs/src/content/docs/guides/configuration.md @@ -0,0 +1,53 @@ +--- +title: 設定 +description: Backlog CLI の設定管理 +--- + +Backlog CLI の設定は `~/.backlogrc` ファイルで管理されます。 + +## 設定の表示 + +すべての設定を表示: + +```bash +backlog config list +``` + +特定の値を取得: + +```bash +backlog config get default_space +``` + +## 設定の変更 + +```bash +backlog config set default_space your-space.backlog.com +``` + +## 設定キー + +| キー | 説明 | +|------|------| +| `default_space` | デフォルトの Backlog スペースホスト名 | + +## スペース固有の設定 + +`--hostname` フラグで特定のスペースに対する設定を管理できます。 + +```bash +# スペース固有の設定を取得 +backlog config get pager --hostname your-space.backlog.com + +# スペース固有の設定を変更 +backlog config set pager less --hostname your-space.backlog.com + +# スペース固有の設定を一覧 +backlog config list --hostname your-space.backlog.com +``` + +## 環境変数 + +| 環境変数 | 説明 | +|----------|------| +| `BACKLOG_SPACE` | 使用するスペースのホスト名(`--space` フラグと同等) | diff --git a/docs/src/content/docs/guides/output-formatting.md b/docs/src/content/docs/guides/output-formatting.md new file mode 100644 index 0000000..37c588a --- /dev/null +++ b/docs/src/content/docs/guides/output-formatting.md @@ -0,0 +1,57 @@ +--- +title: 出力形式 +description: Backlog CLI の出力形式のカスタマイズ方法 +--- + +Backlog CLI はさまざまな出力形式をサポートしています。 + +## テーブル形式(デフォルト) + +フラグを指定しない場合、人間が読みやすいテーブル形式で出力されます。 + +```bash +backlog issue list --project PROJ +``` + +## JSON 形式 + +`--json` フラグで JSON 形式の出力を取得できます。 + +```bash +# 全フィールドを JSON で出力 +backlog issue list --project PROJ --json + +# 特定のフィールドのみ出力 +backlog issue list --project PROJ --json issueKey,summary,status +``` + +## jq フィルタ + +`--jq` フラグで jq 式を使って出力をフィルタリングできます。 + +```bash +# 課題キーだけを抽出 +backlog issue list --project PROJ --jq '.[].issueKey' + +# 条件付きフィルタ +backlog issue list --project PROJ --jq '[.[] | select(.priority.name == "高")]' +``` + +## Go テンプレート + +`--template` フラグで Go テンプレート形式のカスタムフォーマットを指定できます。 + +```bash +backlog issue list --project PROJ --template '{{.Key}} {{.Summary}}' +``` + +## スクリプトでの利用 + +JSON 出力とシェルのパイプを組み合わせることで、スクリプトから活用できます。 + +```bash +# 課題キーの一覧を取得 +backlog issue list --project PROJ --jq '.[].issueKey' | while read key; do + echo "Processing $key" +done +``` diff --git a/docs/src/content/docs/guides/shell-completion.md b/docs/src/content/docs/guides/shell-completion.md new file mode 100644 index 0000000..6e3cc50 --- /dev/null +++ b/docs/src/content/docs/guides/shell-completion.md @@ -0,0 +1,48 @@ +--- +title: シェル補完 +description: Backlog CLI のシェル補完の設定方法 +--- + +Backlog CLI は Bash、Zsh、Fish のシェル補完をサポートしています。 + +## Bash + +```bash +# 補完スクリプトを生成 +backlog completion bash > /etc/bash_completion.d/backlog + +# または現在のシェルに直接読み込み +eval "$(backlog completion bash)" +``` + +`~/.bashrc` に追加して永続化する場合: + +```bash +echo 'eval "$(backlog completion bash)"' >> ~/.bashrc +``` + +## Zsh + +```bash +# 補完スクリプトを生成 +backlog completion zsh > "${fpath[1]}/_backlog" + +# または現在のシェルに直接読み込み +eval "$(backlog completion zsh)" +``` + +`~/.zshrc` に追加して永続化する場合: + +```bash +echo 'eval "$(backlog completion zsh)"' >> ~/.zshrc +``` + +## Fish + +```bash +# 補完スクリプトを生成 +backlog completion fish > ~/.config/fish/completions/backlog.fish + +# または現在のシェルに直接読み込み +backlog completion fish | source +``` diff --git a/docs/src/content/docs/index.md b/docs/src/content/docs/index.md new file mode 100644 index 0000000..8821fe8 --- /dev/null +++ b/docs/src/content/docs/index.md @@ -0,0 +1,16 @@ +--- +title: Backlog CLI +description: Backlog をコマンドラインから操作する CLI ツール +template: splash +hero: + title: Backlog CLI + tagline: Backlog をコマンドラインから操作する CLI ツール。gh CLI のインターフェースを参考に設計されています。 + actions: + - text: はじめる + link: /backlog-cli/getting-started/installation/ + icon: right-arrow + variant: primary + - text: コマンドリファレンス + link: /backlog-cli/commands/auth/ + icon: open-book +---