Skip to main content
Version: 4.2

Welcome

Koin is a dependency injection framework for Kotlin. You declare how your classes are built in modules, Koin creates and wires the instances at runtime, and the optional Koin Compiler Plugin checks the whole graph when you build. It runs on Android, Compose, Kotlin Multiplatform, Ktor and any Kotlin/JVM application.

This page is a map of the documentation. Each section below says which question it answers and where to start.

class UserRepository(private val api: ApiService)

val appModule = module {
single<ApiService>()
single<UserRepository>()
}

fun main() {
startKoin { modules(appModule) }
}

I want to...​

Where to go​

Get Started​

What is Koin, how does it work, which style should I use?

Setup​

What do I add to my build?

Tutorials​

How do I build a first app with Koin, step by step?

Core​

How do I declare, organize and retrieve dependencies on any platform?

Platforms​

How do I use Koin with a specific platform or framework?

Testing​

How do I test code that uses Koin, and test the configuration itself?

Production & Tooling​

Which tools help me write, inspect and run Koin apps?

Migration​

I use another framework or an older Koin setup. How do I move?

Reference​

What are all the keywords, annotations and options?

Support​

Which version should I use, what changed, where do I get help?

  • Releases: versions, changes and upgrade notes.
  • API Stability: what stable, experimental and internal mean.
  • Support: roadmap, community and support options.
  • What is Koin?: the next page to read if you are new to Koin.
  • Core Concepts: the mental model behind every other page.
  • Setup: install Koin for your platform.