Ruby SDK for AT Protocol
The ATProto Ruby SDK is a set of Ruby gems for interacting with and building on the Bluesky APIs and the AT Protocol it's built on. It isn't really a single consistent SDK, but rather a group of independent gems built for handling different aspects of the protocol, and this website just puts it all in one place for easy access.
💎 Currently available gems:
- Minisky – a basic XRPC client for making GET/POST calls to the various API endpoints on PDSes, AppViews and relays, including authenticated calls (using app passwords)
- Skyfall – a websocket client built on EventMachine with a CBOR/CAR parser for streaming data from the firehose & Jetstream servers
- DIDKit – a set of tools for resolving ATProto @handles to DIDs and fetching info (DID document) about a given DID, and for loading data from plc.directory
- BlueFactory – a Sinatra-based server for hosting feed generator services (custom feeds)
In the sidebar on the left you can also see links to a few sample projects that make use of these gems, including a template of a feed generator service. I've been using the above gems in all my Ruby projects since 2023, and they're all pretty battle tested at this point (though not really literally tested…).
Ruby versions
All of the gems will likely work on older Rubies like 2.6-2.7 (including ones shipped with macOS), but of course it's recommended to use a more recent one that's still maintained (e.g. 3.2+).
To do list
🚫 What is currently not implemented yet:
- OAuth support – Minisky currently only supports app passwords for auth
- user-friendly APIs mapping all lexicon endpoints, like getProfile, getPosts – Minisky only includes basic GET/HTTP request methods, to which you need to pass a full endpoint NSID and a parameter hash
- rich record models – data in Minisky and Skyfall is returned as plain Ruby hashes
- lexicon code generator tooling
- helpers for cryptographic operations like signature/token validation
- general tooling for building any XRPC servers
- tests and full RDoc documentation
