Full-featured CLI for Bluesky/AT Protocol.
First check auth:
bsky whoami
Safety rules:
bsky login --handle THEIR_HANDLE.bsky.social locally so the app password goes into the hidden prompt.--dry-run first unless the user already gave final text.--yes only after the user has clearly confirmed the action or when opt-in mutation confirmations are enabled.Common tasks:
bsky post "text"bsky timelinebsky like bsky follow @alice.bsky.social --yesIf bsky whoami shows "Not logged in", guide the user through setup.
Getting an app password:
Tell the user:
> Go to bsky.app -> click your avatar -> Settings -> Privacy and Security -> App Passwords -> Add App Password. Name it "OpenClaw". Do not paste the password into chat; keep it for the hidden CLI prompt.
Have them run this locally:
bsky login --handle THEIR_HANDLE.bsky.social
Security: the app password is used once to get a session token, then discarded. The CLI stores only the session token at ~/.config/bsky/config.json with owner-only permissions.
Legacy --password still works for backward compatibility, but it is intentionally hidden from help and warns if used.
bsky timeline or bsky tlbsky post "text"bsky post "text" --image photo.jpg --alt "description"bsky reply "text" bsky quote "text" bsky thread bsky create-thread "Post 1" "Post 2" "Post 3" or bsky ctbsky like bsky repost --yes bsky follow @alice.bsky.social --yesbsky block @alice.bsky.social --yesbsky mute @alice.bsky.social --yesbsky search "query"bsky notifications or bsky nbsky delete --yes bsky timeline # 10 posts
bsky timeline -n 20 # 20 posts
bsky timeline --json # JSON output
bsky post "Hello world!" # Basic post
bsky post "Check this!" --image pic.jpg --alt "A photo" # With image
bsky post "Test" --dry-run # Preview only
bsky reply <post-url> "Your reply"
bsky quote <post-url> "Your take on this"
bsky thread <post-url> # View conversation
bsky thread <url> --depth 10 # More replies
bsky thread <url> --json # JSON output
bsky create-thread "First post" "Second post" "Third post" # Create a thread
bsky ct "Post 1" "Post 2" "Post 3" # Short alias
bsky create-thread "Hello!" "More thoughts" --dry-run # Preview only
bsky create-thread "Look!" "Nice" --image pic.jpg --alt "A photo" # Image on first post
bsky like <post-url> # ❤️ Like
bsky unlike <post-url> # Remove like
bsky repost <post-url> --yes # 🔁 Repost after verifying target
bsky unrepost <post-url> --yes # Remove repost after verifying target
bsky follow @someone.bsky.social --yes # Follow user after verifying target
bsky unfollow @someone.bsky.social --yes # Unfollow user after verifying target
bsky profile @someone.bsky.social # View profile
bsky profile --json # JSON output
bsky block @someone.bsky.social --yes # 🚫 Block user after verifying target
bsky unblock @someone.bsky.social --yes # Unblock after verifying target
bsky mute @someone.bsky.social --yes # 🔇 Mute user after verifying target
bsky unmute @someone.bsky.social --yes # Unmute after verifying target
bsky search "query" # Search posts
bsky search "topic" -n 20 # More results
bsky notifications # Recent notifications
bsky n -n 30 # More notifications
bsky delete <post-url> --yes # Delete your post after verifying target
bsky delete <post-id> --yes # By ID, after verifying target
Add --json to read commands for structured output:
bsky timeline --json
bsky search "topic" --json
bsky notifications --json
bsky profile @someone --json
bsky thread <url> --json
bsky login --handle your.handle again.bsky login --handle your.handle.--yes if the user confirmed. parameters accept either https://bsky.app/... URLs or at:// URIs@ is optional; use the full handle, such as alice.bsky.social--alt for accessibility (Bluesky requirement)共 2 个版本