|
1 | | -# Gorkit Bot |
| 1 | +## Gorkit Bot |
2 | 2 |
|
3 | | -Gorkit is a Bluesky (AT Protocol) bot written in Rust. It monitors the network for specific mentions and automatically replies to them. |
| 3 | +Gorkit is a Bluesky (AT Protocol) bot written in Rust. Monitors specific posts and replies automatically. |
4 | 4 |
|
5 | | -## Features |
| 5 | +### Features |
6 | 6 |
|
7 | | -* Listens to the AT Protocol's event stream (Jetstream) for new posts. |
8 | | -* Specifically filters for posts on the `app.bsky.feed.post` collection. |
9 | | -* Identifies posts that contain the exact text "@gork is this true". |
10 | | -* Replies to these mentions with the text "yeh". |
11 | | -* Persists its progress (cursor) to avoid reprocessing old messages on restart. |
12 | | -* Includes basic setup for tracing (logging) and Prometheus metrics. |
| 7 | +* Subscribes to the AT Protocol event stream (Jetstream). |
| 8 | +* Filters for posts in `app.bsky.feed.post`. |
| 9 | +* Detects exact match: `@gork.bluesky.bot is this true`. |
| 10 | +* Replies with `yeh`. |
| 11 | +* Saves cursor to avoid duplicate processing on restart. |
| 12 | +* Includes basic setup for tracing and Prometheus metrics. |
13 | 13 |
|
14 | | -## Prerequisites |
| 14 | +### Requirements |
15 | 15 |
|
16 | | -* Rust toolchain installed. |
17 | | -* A Bluesky account. |
| 16 | +* Rust toolchain installed. |
| 17 | +* Bluesky account. |
18 | 18 |
|
19 | | -## Setup |
| 19 | +### Setup |
20 | 20 |
|
21 | | -1. **Clone the repository (if applicable)** |
22 | | - ```bash |
23 | | - # git clone <your-repo-url> |
24 | | - # cd gorkit |
25 | | - ``` |
| 21 | +1. **Clone the repository (if needed)** |
26 | 22 |
|
27 | | -2. **Set Environment Variables**: |
28 | | - The bot requires your Bluesky credentials to log in and post replies. Create a `.env` file in the root of the project directory with the following content: |
| 23 | + ```bash |
| 24 | + git clone <your-repo-url> |
| 25 | + cd gorkit |
| 26 | + ``` |
29 | 27 |
|
30 | | - ```env |
31 | | - ATP_USER="your-bluesky-username" |
32 | | - ATP_PASSWORD="your-bluesky-app-password" |
33 | | - ``` |
34 | | - Replace `your-bluesky-username` with your Bluesky handle (e.g., `example.bsky.social`) and `your-bluesky-app-password` with an app password you generate from your Bluesky account settings. **Do not use your main account password.** |
| 28 | +2. **Set environment variables** |
35 | 29 |
|
36 | | -## Running the Bot |
| 30 | + Create a `.env` file in the project root: |
37 | 31 |
|
38 | | -Once the environment variables are set up, you can run the bot using Cargo: |
| 32 | + ```env |
| 33 | + ATP_USER="your-bluesky-username" |
| 34 | + ATP_PASSWORD="your-bluesky-app-password" |
| 35 | + ``` |
| 36 | + |
| 37 | + Replace values accordingly. |
| 38 | + Use an app password, not your main account password. |
| 39 | + |
| 40 | +### Run |
39 | 41 |
|
40 | 42 | ```bash |
41 | 43 | cargo run |
42 | 44 | ``` |
43 | 45 |
|
44 | | -The bot will start, log in to Bluesky, and begin listening for mentions. |
| 46 | +Starts the bot, logs in, and listens for mentions. |
0 commit comments