A type-safe, well-documented AT Protocol SDK and bot framework for Elixir
Warning
This library is under active development and isn't production ready, expect breaking chnages
def deps do
[
{:proto_rune, "~> 0.1.0"}
]
end
# Create a session
{:ok, session} = ProtoRune.create_session("handle.bsky.social", "app-password")
# Post something
{:ok, post} = ProtoRune.Client.create_post(session, "Hello from Elixir!")
# Create a bot
defmodule MyBot do
use ProtoRune.Bot, name: :my_bot, strategy: :polling
@impl true
def handle_event(:like, %{uri: uri, user: user}) do
# Handle like event
end
end
MyBot.start_link()
- Simple bot with event handling
- Post with rich text and embeds
- Custom feed generator
- Firehose subscription
ProtoRune is organized into focused modules:
ATProto
- Core protocol implementation (repo, identity, etc)Bsky
- Bluesky-specific features (feed, graph, notifications)Bot
- Bot framework with polling/firehose supportXRPC
- Low-level XRPC clientLexicons
- Generated code from AT Protocol lexicons
Other submodules do exist like
ProtoRune.HTTPClient
but it are to be used internally
Full documentation is available at hexdocs.pm/proto_rune.
The guide covers:
Pull requests welcome! See our Contributing Guide.
MIT License - see LICENSE for details.