An imperative RIBs-style (RIBs · RIBs-iOS)
architecture framework for Kotlin Multiplatform — Router / Interactor / Builder / Presenter + View, with a coroutine-based Workflow
engine for deep-link and cross-tree navigation.
Free, and on Maven Central — one dependency gives you the framework on Android, iOS, macOS, desktop/JVM, and web.
⚠️ Beta (0.x). The API is still stabilizing — expect breaking changes between releases until1.0. Pin an exact version and check the release notes before upgrading.
Inspired by Uber's RIBs, independently reimplemented and substantially extended for Kotlin Multiplatform. Not affiliated with or endorsed by Uber. See THIRD-PARTY-NOTICES.
mavenCentral() is already in most projects. Add the dependency to your shared module (commonMain):
commonMain.dependencies {
implementation("io.mobileengineer:ribs:0.1.0") // the framework
implementation("io.mobileengineer:ribs-compose:0.1.0") // only if you render with Compose
}That one coordinate covers Android (AAR), JVM/desktop, iOS, macOS, and JS — Gradle picks the
right target automatically. Imports are com.ribs.*:
import com.ribs.Router
import com.ribs.InteractorBrowse the artifact: https://central.sonatype.com/artifact/io.mobileengineer/ribs
Two layers, as in any KMP + native app:
-
Shared logic — your shared Kotlin module depends on
ribsfrom Maven Central (above); your Gradle build compiles it into the framework Xcode embeds. You do not addribsto Xcode directly. -
Native view bridges (
RibsUIKit/RibsSwiftUI) — a Swift package. In Xcode: File → Add Package Dependencies →https://github.com/The-Mobile-Engineer/RIBs-KMP→ pickRibsUIKitand/orRibsSwiftUI. Or inPackage.swift:.package(url: "https://github.com/The-Mobile-Engineer/RIBs-KMP.git", from: "0.1.0")
These are pure Swift (no Kotlin dependency); you implement the KMP-defined view interfaces against them via DI.
ribs is a small native CLI (no JVM) that generates a RIB — Builder / Router / Interactor /
Presenter / View, one class per file, matching the framework conventions.
Install (macOS + Linux):
curl -fsSL https://raw.githubusercontent.com/The-Mobile-Engineer/RIBs-KMP/main/install.sh | shThen, from inside your source tree:
ribs new FooIt infers the package from the current directory (override with --package / --dir) and writes a
foo/ folder with the six files ready to fill in.
The installer also drops two Claude Code skills into ~/.claude/skills — create-rib (scaffold
and fill a RIB by the conventions) and review-rib (check a RIB against them). See
skills/.
ribs keeps itself up to date: once a day it checks for a newer signed release in the background and
applies it (Ed25519-verified), so you stay current without doing anything. Force it any time with
ribs self-update. To turn it off:
ribs config set auto-update false # persistent
RIBS_AUTO_UPDATE=false ribs new Foo # one-offSettings live in ~/.config/ribs/config.json; run ribs config to see them.
| Platform | How you consume it |
|---|---|
| Android | io.mobileengineer:ribs (AAR) from Maven Central |
| JVM / Desktop | io.mobileengineer:ribs (jar) from Maven Central |
| iOS / macOS (Kotlin) | io.mobileengineer:ribs (klib) from Maven Central |
| iOS / macOS (native views) | RibsUIKit / RibsSwiftUI Swift package (SPM, this repo) |
| Web (JS/TS) | @mobileengineer/ribs-web on npm (planned) |
- Consuming guide — which package for which target, and when.
- Leaf embedding — adopt one screen at a time inside a non-RIBs host.
Free to use — see LICENSE. Includes components derived from Uber's RIBs (Apache-2.0); see THIRD-PARTY-NOTICES.