A Kotlin-based bot for interacting with the Bluesky platform. This bot fetches posts based on specified tags and performs actions such as reposting and following users. The bot leverages Redis for caching and scheduling tasks at specified intervals.
- Fetches posts from Bluesky based on predefined tags.
- Performs actions like reposting, liking, and following users.
- Utilizes Redis for state management and caching.
- Periodically runs tasks using a customizable scheduler.
- JDK 22 or higher
- Redis server
The bot reads configuration from a config.yaml file. Here’s an example:
redis:
host: localhost
port: 6379
username: user
password: pass
bluesky:
api-url: https://bsky.social/xrpc
username: your-bluesky-username
password: your-bluesky-password (Use an API password)
poster:
since: 2024-01-01T00:00:00Z
scheduler:
frequencyminutes: 15
actions:
repost:
enabled: true
like:
enabled: true
follow:
enabled: true
tags:
- java
- javabubble
- SpringBoot
- Kotlin
- anyothertag
since: ISO-8601 timestamp indicating the starting point if it has never run before
./gradlew build
java -jar build/libs/bluesky-reposter-all.jar
Ensure config.yaml is in the same directory as the JAR file under the config folder:
/config/config.yaml
docker build -t bluesky-bot .
docker run --rm \
-v /path/to/config.yaml:/config/config.yaml \
bluesky-bot
You can run the Bluesky Bot directly from the prebuilt Docker image available at raphaeldelio/bluesky-bot.
Download the image from Docker Hub:
docker pull raphaeldelio/bluesky-bot:latest
Ensure you have a config.yaml
file ready with your settings. Place it in a directory on your host machine (e.g., /path/to/config.yaml).
Use the following command to run the bot:
docker run --rm \
-v /path/to/config.yaml:/config/config.yaml \
raphaeldelio/bluesky-bot:latest
Feel free to submit issues or pull requests to improve this bot.
This project is licensed under the MIT License