Module atproto-kotlin

Code-generated AT Protocol Kotlin Multiplatform SDK for Bluesky and atproto-powered apps. Parses the upstream @atproto/lex lexicon corpus at build time and emits idiomatic Kotlin: immutable data class records, sealed-equivalent open unions with $type dispatch, typed value classes for every string format, and suspend fun XRPC service interfaces ready to drop into a Ktor client.

Quick start

// build.gradle.kts
dependencies {
implementation("io.github.kikin81.atproto:runtime:<version>")
implementation("io.github.kikin81.atproto:models:<version>")
implementation("io.github.kikin81.atproto:oauth:<version>") // optional
implementation("io.ktor:ktor-client-cio:3.x") // or your preferred engine
}
val client = XrpcClient(
baseUrl = "https://bsky.social",
httpClient = HttpClient(CIO),
authProvider = myAuthProvider,
)
val timeline = FeedService(client).getTimeline(GetTimelineRequest(limit = 25L))

See each module's documentation for details:

  • runtime — Hand-written base: value classes, AtField, XrpcClient, AuthProvider, pagination helpers.

  • models — Generated records, requests/responses, open unions, and *Service classes.

  • oauth — OAuth 2.0 with PAR + PKCE + DPoP for public clients (Android / JVM).

For LLM agents consuming this library, fetch task-oriented skills from skills/ instead of browsing this API reference.

All modules:

Link copied to clipboard

Code-generated AT Protocol models and service bindings. Kotlin Multiplatform (JVM + iOS). This is what downstream consumers depend on to call Bluesky and atproto endpoints.

Link copied to clipboard

AT Protocol OAuth 2.0 module for public clients (Android and JVM desktop apps). JVM-only — java.security is used for EC P-256 key generation and signing so no external JWT library is pulled in.

Link copied to clipboard

Hand-written base module for the AT Protocol Kotlin SDK. Kotlin Multiplatform (JVM + iOS) library that every generated model and service depends on.