# bsky_bot Bluesky bot for posting, viewing timelines, fetching profiles, and following users via AT Protocol. ## Usage ``` bsky_bot --user --password [COMMAND] ``` Authentication is required for all operations. Use an App Password from your Bluesky account settings. ## Options | Option | Description | |--------|-------------| | `--pds ` | PDS URL (default: https://bsky.social) | | `-u, --user ` | Handle or email for login | | `-p, --password ` | App password | | `--post ` | Create a post with the given text | | `-t, --timeline` | Show timeline | | `--limit ` | Number of timeline posts (default: 10) | | `--profile ` | Get profile for handle or DID | | `--follow ` | Follow a user by DID | | `-h, --help` | Show help message | ## Examples Post a message: ```bash dune exec examples/bsky_bot/bsky_bot.exe -- \ --user myhandle.bsky.social \ --password xxxx-xxxx-xxxx-xxxx \ --post "Hello from OCaml!" ``` View your timeline: ```bash dune exec examples/bsky_bot/bsky_bot.exe -- \ --user myhandle.bsky.social \ --password xxxx-xxxx-xxxx-xxxx \ --timeline --limit 5 ``` Get a user's profile: ```bash dune exec examples/bsky_bot/bsky_bot.exe -- \ --user myhandle.bsky.social \ --password xxxx-xxxx-xxxx-xxxx \ --profile jay.bsky.social ``` Follow a user: ```bash dune exec examples/bsky_bot/bsky_bot.exe -- \ --user myhandle.bsky.social \ --password xxxx-xxxx-xxxx-xxxx \ --follow did:plc:z72i7hdynmk6r22z27h6tvur ``` ## Output Timeline output: ``` Logged in as myhandle.bsky.social @jay.bsky.social: Just shipped a new feature... @alice.bsky.social: Check out this thread about... ``` Profile output: ``` Handle: @jay.bsky.social DID: did:plc:z72i7hdynmk6r22z27h6tvur Name: Jay Bio: Building things Followers: 12345 Following: 678 Posts: 901 ``` ## Notes - Posts automatically detect and link mentions (@handle.domain) and URLs - The `--post` option supports text up to 300 graphemes (Bluesky limit) - Use App Passwords from Settings > App Passwords, not your main password