ターミナルから Bluesky を使う:CLI の選び方

Bluesky.bot ハンドルの管理には bsbot、AT Protocol 全般の操作には goat、タイムラインや投稿には投稿クライアントを選べます。記録には実行したバージョンと、ローカルのヘルプか公開データの読み取りかを明記しています。

著者:Bluesky.botチーム

公開日:
更新日:
確認日:

作業に合わせて選ぶ

自分の bot の name.bluesky.bot ハンドルには bsbot と CLI リファレンスを参照してください。公開 ID の解決、リポジトリのエクスポート、CAR ファイル、PLC 履歴、アカウント移行には goat が候補です。タイムラインや投稿には mattn/bsky または AT Protocol SDK を検討できます。用途と権限はそれぞれ異なります。

バージョンと出典の確認日:2026年11月16日。ヘルプと公開データの読み取りでは、認証後の変更操作を検証していません。
ツールとバージョン用途認証と変更操作インストールとライセンス出典と確認日

bsbot

0.1.0

TypeScript / Node.js ≥ 22

公開日:2026/11/12

Bluesky.bot ハンドルの管理、名前の空き状況と公開ディレクトリの確認。投稿やタイムラインの取得は行いません。アカウント操作にはブラウザで OAuth 認証。ハンドル管理用トークンは Bluesky のアプリパスワードとは別です。npm install --global @blueskydotbot/[email protected]

MIT

バージョン別の出典

確認日:2026/11/16

goat

0.2.9

Go

公開日:2026/11/06

ID 解決、リポジトリと CAR ファイルの調査、PLC 履歴、データのエクスポート、アカウント管理と移行。多くの読み取りに認証は不要です。変更操作にはアプリパスワードでログインします。認証情報をディスクに保存する仕様が文書化されています。go install github.com/bluesky-social/[email protected]

MIT / Apache-2.0

バージョン別の出典

確認日:2026/11/16

mattn/bsky

0.0.82

Go

公開日:2026/08/19

投稿やタイムライン取得用の Bluesky クライアント。プロフィール、フォロー、モデレーションなどの操作も提供します。文書化されたログインはハンドルとパスワードを受け取ります。アプリパスワードを使ってください。認証後のコマンドはアカウントを変更できます。go install github.com/mattn/[email protected]

MIT

バージョン別の出典

確認日:2026/11/16

比較の対象は確認したリリースで、未公開コードではありません。bsbot と bsky のローカルヘルプ、bsbot の公開の名前照会、goat の公開 DID 解決を実行しました。認証を伴う投稿、移行、ハンドル変更は実行していません。

インストールとバージョン確認

bash
npm install --global @blueskydotbot/[email protected]
bsbot --version
bsbot --help

固定したバージョンは記録と一致します。一度だけ使う場合は npx @blueskydotbot/[email protected] --help を使えます。新しいバージョンを選ぶ前にリリースノートを確認してください。文書化された要件は macOS または Linux と Node.js 22 以降です。記録は Linux と Node.js 24 で実行しました。

bsbot 0.1.0 ·

ローカルコマンド。アカウントへの接続なし · 終了コード:0

bash
bsbot --help
bsbot 0.1.0: manage your Bluesky bots and their name.bluesky.bot handles.

Usage: bsbot <command> [options]

Account
  login [--no-browser] [--name <label>]
                           Sign in through the browser (OAuth, no password);
                           <label> names this machine in your settings
  logout                   Revoke this machine's token and forget it
  whoami                   Show the signed-in account

Handles
  check <name>             Is <name>.bluesky.bot free to claim?
  claim <bot> <name>       Claim <name>.bluesky.bot for a bot and switch to it
  switch <bot>             Ask the bot's server again to use its handle
  verify <bot>             Check that the bot's handle is live on Bluesky
  release <bot> [--yes]    Give the handle up (the bot goes back to its old one)

Bots
  bots                     List your bots
  directory [--q <text>] [--category <c>] [--verified] [--limit <n>] [--cursor <c>]
                           Browse the public directory

<bot> is a bot's DID, its handle, its previous handle, or the name of its
.bluesky.bot handle. Add bots from the dashboard: https://bluesky.bot/manage

Options
  --json                   Machine-readable output (never contains the token)
  --api-url <url>          Another server (or BSBOT_API_URL)
  -h, --help               This help
  -v, --version            The version

まず公開情報を読み取る

check は名前の空き状況を調べます。予約や取得は行いません。記録した名前は当プロジェクトの CLI アカウントのものです。空き状況と候補は後で変わる場合があります。

bsbot 0.1.0 ·

Bluesky.bot 公開 API の読み取り · 終了コード:0

bash
bsbot check cli --json
{
  "name": "cli",
  "handle": "cli.bluesky.bot",
  "available": false,
  "reason": "taken",
  "suggestions": [
    "cli2",
    "cli-24",
    "cli3"
  ]
}

ログインして自分の bot を管理する

以下は操作手順で、認証済みセッションの記録ではありません。最初にダッシュボードで bot を追加します。bsbot login を実行し、ブラウザでアカウントと端末名を確認して許可します。Bluesky のパスワードは bsbot を通りません。トークンは Bluesky.bot 用で、Bluesky への投稿権限はありません。

bash
bsbot login
bsbot whoami
bsbot bots

自分の bot の DID と空いている名前を選んだら、公開版の構文は次のとおりです。

bash
bsbot claim BOT_DID chosen-name
bsbot switch BOT_DID
bsbot verify BOT_DID

プレースホルダーを置き換えてください。claim は名前を取得し、bot のサーバーにハンドルの変更を依頼します。switch はその変更を再試行します。verify はハンドルが有効かを確認します。再試行する前に返された状態を読んでください。pending は待機が必要な場合があり、manual は手動の対応が必要です。確認ガイドも参照してください。

Doctor と CI:サーバーと公開版 CLI を区別する

確認した npm 版は 0.1.0 です。ソースリポジトリにその後の作業が記載されていても、この版に doctor、listing、BSBOT_TOKEN のサポートはありません。次の unknown command は実際の出力で、診断や一覧情報の更新に成功した記録ではありません。

bsbot 0.1.0 ·

ローカルコマンド。アカウントへの接続なし · 終了コード:2

bash
bsbot doctor --json
{"error":{"code":"usage","message":"Unknown command \"doctor\". See bsbot --help."}}

bsbot 0.1.0 ·

ローカルコマンド。アカウントへの接続なし · 終了コード:2

bash
bsbot listing get cli --json
{"error":{"code":"usage","message":"Unknown command \"listing\". See bsbot --help."}}

診断にはダッシュボードを使ってください。API リファレンスには、認証付きの診断・ディレクトリ情報エンドポイントと、ディレクトリ情報に限定したデプロイトークンが記載されています。CI では HTTP 契約に従い、シークレット保管機能を使い、対象の bot にトークンを限定します。HTTP の例だけでは、未公開の bsbot listing set に対応しているとは言えません。コマンドの互換性は CLI リファレンスで確認してください。

goat で AT Protocol を読み取る

このセッションでは bsky.app の公開 DID を解決しています。ログインやアカウント変更は行いません。DID ドキュメントは記録時点のハンドル、公開鍵、サービスエンドポイントを示します。リポジトリのエクスポートと移行は別のコマンドです。使用前にバージョン別の goat の出典を参照してください。

goat goat version 0.2.9 ·

AT Protocol 公開データの読み取り · 終了コード:0

bash
goat resolve did:plc:z72i7hdynmk6r22z27h6tvur
{
  "@context": [
    "https://www.w3.org/ns/did/v1",
    "https://w3id.org/security/multikey/v1",
    "https://w3id.org/security/suites/secp256k1-2019/v1"
  ],
  "id": "did:plc:z72i7hdynmk6r22z27h6tvur",
  "alsoKnownAs": [
    "at://bsky.app"
  ],
  "verificationMethod": [
    {
      "id": "did:plc:z72i7hdynmk6r22z27h6tvur#atproto",
      "type": "Multikey",
      "controller": "did:plc:z72i7hdynmk6r22z27h6tvur",
      "publicKeyMultibase": "zQ3shQo6TF2moaqMTrUZEM1jeuYRQXeHEx4evX9751y2qPqRA"
    }
  ],
  "service": [
    {
      "id": "#atproto_pds",
      "type": "AtprotoPersonalDataServer",
      "serviceEndpoint": "https://puffball.us-east.host.bsky.network"
    }
  ]
}

bsky の投稿とタイムライン

記録したヘルプはダウンロードした mattn/bsky 0.0.82 のものです。タイムライン、投稿、アカウント操作のコマンドを表示しています。ログインや変更操作は行いませんでした。上流の文書は機能の出典であり、すべてのコマンドをこのセッションで試した証拠ではありません。

bsky bsky version 0.0.82 ·

ローカルコマンド。アカウントへの接続なし · 終了コード:0

bash
bsky --help
NAME:
   bsky - bsky

USAGE:
   bsky [global options] command [command options]

VERSION:
   0.0.82

DESCRIPTION:
   A cli application for bluesky

COMMANDS:
   show-profile         Show profile
   update-profile       Update profile
   show-session         Show session
   timeline, tl         Show timeline
   stream               Show timeline as stream
   thread               Show thread
   post                 Post new text
   vote                 Vote the post
   votes                Show votes of the post
   repost               Repost the post
   reposts              Show reposts of the post
   follow               Follow the handle
   unfollow             Unfollow the handle
   follows              Show follows
   followers            Show followers
   block                Block the handle
   unblock              Unblock the handle
   blocks               Show blocks
   mute                 Mute the handle
   unmute               Unmute the handle
   mutes                Show muted users
   report               Report the handle
   moderation-list      Add the handle to a new moderation list
   lists                Show lists
   list                 Show list items
   chat                 Direct messages
   delete               Delete the note
   search               Search Bluesky
   search-actors        Search Actors
   login                Login the social
   notification, notif  Show notifications
   invite-codes         Show invite codes
   list-app-passwords   Show App-passwords
   add-app-password     Add App-password
   revoke-app-password  Revoke App-password
   mcp                  Start MCP server
   help, h              Shows a list of commands or help for one command

GLOBAL OPTIONS:
   -a value       profile name
   -V             verbose (default: false)
   --help, -h     show help
   --version, -v  print the version

認証情報の用途を限定する

bsbot のトークンは ~/.config/bsbot/credentials.json に保存され、ユーザー専用の権限が設定されます。標準の有効期間は30日です。bsbot logout で取り消せます。ダッシュボードでも CLI アクセスを取り消せます。認証情報をログやソースコードに含めないでください。

Bluesky のパスワードを引数に取るクライアントでは、アプリパスワードを作成してください。goat はアプリパスワードとトークンをディスクに保存することを明記しており、ログアウトでその認証ファイルを削除します。投稿クライアントの認証情報は、Bluesky.bot のハンドル用トークンと異なり、投稿やアカウントの変更を許可する場合があります。無人実行を有効にする前に権限、保存先、取り消し方法を確認してください。

Bluesky CLI に関する質問

bsbot で Bluesky に投稿できますか?
できません。確認した npm 版は Bluesky.bot ハンドルを管理し、ディレクトリを読み取ります。投稿には投稿クライアントか AT Protocol SDK を使用してください。
bsbot doctor が unknown command になるのはなぜですか?
記録した npm 0.1.0 には doctor と listing がありません。サーバーのエンドポイントだけでは、インストール済み CLI にコマンドは追加されません。新機能を前提にする前にリリースノートを確認してください。
公開版 bsbot を BSBOT_TOKEN で CI に使えますか?
確認した 0.1.0 はこの環境変数を読み取りません。サーバーにはディレクトリ情報に限定したデプロイトークンがあり、HTTP で直接利用できます。API リファレンスを参照し、CI のシークレット保管機能を使用してください。

出典