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
*Serviceclasses. -
oauth — OAuth 2.0 with PAR + PKCE + DPoP for public clients (Android / JVM).
-
compose — Jetpack Compose helpers for rendering Bluesky post text + facet annotations as an
AnnotatedString. No Material dependency. -
compose-material3 —
rememberBlueskyAnnotatedStringcomposable with Material 3 defaults. Optional add-on layered on top ofcompose.
For LLM agents consuming this library, fetch task-oriented skills from skills/ instead of browsing this API reference.
All modules:
Jetpack Compose helpers for the AT Protocol Kotlin SDK. Renders Bluesky post text + app.bsky.richtext.facet annotations as a correctly-styled AnnotatedString, with bullet-proof UTF-8 byte → UTF-16 char mapping across emoji, multi-byte CJK, and combining marks.
Material 3 styling defaults for the AT Protocol Compose helpers. Optional add-on layered on top of :compose — pull this module when your app uses androidx.compose.material3:material3 and you want a one-line default.
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.
Hand-written base module for the AT Protocol Kotlin SDK. Kotlin Multiplatform (JVM + iOS) library that every generated model and service depends on.