package atproto
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=50ebbbd412c55878005c39eac9493a4a3475882d43d64e685aed2164048320f2
doc/index.html
AT Protocol for OCaml
Atproto is a typed OCaml client for the AT Protocol. Use it to resolve identities, read and write repositories, follow the firehose, and call AppView, Ozone, and hosted Bluesky products (chat, video, Jetstream).
1.0.2 is the packaged surface. Until atproto.1.0.2 lands on opam-repository, pin the GitHub repository; after it is published, opam install atproto. The narrative guide — install, quick start, hosted-product paths, and honest gaps — is the GitHub README. Release notes are in CHANGELOG.md. Public-internet live tests skip unless ATP_PUBLIC=1. Default opam install -t / @runtest stay offline.
Start here
opam pin add atproto git+https://github.com/david-engelmann/atproto.git (* after atproto.1.0.2 is on opam-repository: opam install atproto *)
let did = (Identity.resolve_handle "jay.bsky.team").did
let posts = Feed.search_posts ~q:"atproto" ~limit:5 ()Those two OCaml lines need the public network (no ATP_AUTH). ATP_PUBLIC only gates tests, not this example.
Then (libraries atproto) in dune. Requires OCaml >= 4.14.1 and < 5.4 (CI: 4.14.1 and 5.3.0). Jetstream dict-zstd needs system libzstd (libzstd-dev / Homebrew zstd).
What this library is
A client and protocol library: XRPC, lexicons (pinned at f0d4877a03), CID / CAR / MST, OAuth / DPoP, and typed helpers for AppView, Ozone, chat, and video.
It does not host a PDS, chat backend, video transcoder, Tap, SMS gateway, or APNs/FCM:
Atproto.Oauthbuilds a public HTTPS client-metadata document and drives authorize → code → token. Your application still hosts that URL and the redirect.Atproto.Chattalks to hostedchat.bsky.*onapi.bsky.chat(atproto-proxyor service-auth; DPoP cannot be proxied).Atproto.Videotalks to hostedapp.bsky.video.*onvideo.bsky.app(service-authdid:web:<pds>+uploadBlob).Atproto.Repo_syncis an indexer / backfill toolkit, not a Tap host.Atproto.Jetstreamarchive HTTP needs an operator-suppliedJETSTREAM_API_KEY. Livesubscribestays unauthenticated.Atproto.ContactandAtproto.NotificationregisterPushare clients for hosted SMS / a caller push gateway.
Experimental proposal-0016 modules (Atproto.Lt_hash, Atproto.Space_commit, Atproto.Space_credential, Atproto.Space_xrpc, Atproto.Space_sync) are not a spaces product API. There is no space host in this package.
Public modules
Auth / Session
XRPC
Identity / PLC
MST / CID / CAR / indexer
Experimental permissioned-data (proposal 0016; not a spaces product)
TID / AT URI / syntax
Atproto.TidAtproto.At_uriAT URI scheme (at://) — public records (AT URI spec) and experimental permissioned space URIs from proposal 0016.Atproto.Syntax
Firehose / Jetstream
OAuth / DPoP
AppView
Atproto.ActorAtproto.FeedAtproto.GraphAtproto.BookmarkAtproto.NotificationAtproto.LabelerAtproto.UnspeccedAtproto.VideoAtproto.DraftAtproto.ContactAtproto.AgeassuranceAtproto.SiteAtproto.EmbedAtproto.Facet
Ozone
Admin / temp / moderation
Chat client
Also Atproto.Repo, Atproto.Records, Atproto.Server, Atproto.Sync, Atproto.Label, Atproto.Lexicon, Atproto.Http_client, and Atproto.Germnetwork.