Skip to content

ATProtocol and Bluesky framework for Elixir, make bots, labelers, app views and more (WIP)

License

Notifications You must be signed in to change notification settings

zoedsoupe/proto_rune

Repository files navigation

ProtoRune

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

Installation

def deps do
  [
    {:proto_rune, "~> 0.1.0"}
  ]
end

Quick Start

# 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()

Examples

Architecture

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 support
  • XRPC - Low-level XRPC client
  • Lexicons - Generated code from AT Protocol lexicons

Other submodules do exist like ProtoRune.HTTPClient but it are to be used internally

Documentation

Full documentation is available at hexdocs.pm/proto_rune.

The guide covers:

Contributing

Pull requests welcome! See our Contributing Guide.

Inspirations

  1. Skyware
  2. atcute
  3. Python AT Proto SDK

License

MIT License - see LICENSE for details.

About

ATProtocol and Bluesky framework for Elixir, make bots, labelers, app views and more (WIP)

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Sponsor this project

  •  

Languages