Mirror of github.com/ewanc26/bluesky-ollama
  • D 97.3%
  • Python 1.8%
  • Rust 0.6%
  • Makefile 0.2%
Find a file
2026-07-16 18:22:46 +01:00
src rewrite readme to be more direct 2026-06-29 22:13:58 +01:00
target rewrite readme to be more direct 2026-06-29 22:13:58 +01:00
.gitattributes add files 2025-11-16 02:14:10 +00:00
.gitignore add files 2025-11-16 02:14:10 +00:00
.pre-commit-config.yaml docs: add docstrings to source files 2026-06-29 22:00:34 +01:00
AGENTS.md docs: correct agent guidance after source audit 2026-07-16 18:22:46 +01:00
Cargo.lock rewrite readme to be more direct 2026-06-29 22:13:58 +01:00
Cargo.toml rewrite readme to be more direct 2026-06-29 22:13:58 +01:00
CONTRIBUTING.md add files 2025-11-16 02:14:10 +00:00
example.env add files 2025-11-16 02:14:10 +00:00
flake.nix docs: add docstrings to source files 2026-06-29 22:00:34 +01:00
LICENSE Initial commit 2025-11-16 02:10:07 +00:00
README.md rewrite readme to be more direct 2026-06-29 22:15:59 +01:00
requirements.txt add files 2025-11-16 02:14:10 +00:00
test_validation.py docs: add docstrings to source files 2026-06-29 22:00:34 +01:00

Bluesky Ollama Bot

Posts AI-generated content to Bluesky using Ollama. Combines the Bluesky API from bluesky-markov with Ollama LLM from llm-analyser.

Also available on Tangled

Requirements

  • Python 3.x
  • Ollama
  • atproto, python-dotenv, ollama (in requirements.txt)

Install

git clone https://github.com/ewanc26/bluesky-ollama.git
cd bluesky-ollama
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
ollama pull llama3.2

Create .env:

SOURCE_HANDLE=your_source_handle.bsky.social
DESTINATION_HANDLE=your_destination_handle.bsky.social
CHAR_LIMIT=280
SRC_APP_PASS=your_source_app_password
DST_APP_PASS=your_destination_app_password
BSKY_HOST_URL=https://bsky.social
OLLAMA_MODEL=llama3.2

Use app passwords, not your main password.

Usage

python src/main.py

Does this on a loop:

  1. Logs into both accounts
  2. Fetches recent posts from the source
  3. Generates a new post with Ollama
  4. Posts to the destination
  5. Waits 30 min 3 hours, repeats

Options

python src/main.py [-m MODEL_NAME] [--dry-run]
  • -m — Model to use (default: llama3.2)
  • --dry-run — Generate without posting

Project layout

├── log/general.log        # Logs
├── src/
│   ├── bsky_api.py        # Bluesky API
│   ├── clean.py           # Content cleaning
│   ├── ollama_gen.py      # Ollama generation
│   ├── time_utils.py      # Timing
│   └── main.py            # Entry point
├── .env
├── requirements.txt
└── README.md

Troubleshooting

Ollama not respondingollama serve, check ollama list

Login failed — Make sure you're using app passwords and full handles (e.g. user.bsky.social)

No posts generated — Check the source account has posts and look at log/general.log

Licence

AGPLv3 — see LICENCE