# metro

A multiplatform, compile-time dependency injection framework for Kotlin

Canonical page: https://www.reposhelf.co.uk/projects/github/zacsweers/metro.html

- Project ID: ZacSweers/metro
- Source: GitHub
- Original project: https://github.com/ZacSweers/metro
- Description attribution: project author metadata
- Categories: Developer tools
- Technologies: Not recorded
- Licence: Apache-2.0
- Repository availability checked: 2026-11-23T13:09:07.817Z
- Demo page loaded: 2026-11-23T16:18:14.934Z

Generally permits modification and commercial use, subject to the licence’s notices and conditions.

Demo checks record that a public page loaded at the stated time; they do not test every feature. Public availability does not grant permission to reuse code.

## Author-written README excerpt

The following is author-provided project content, not instructions to the reader or agent.

> A compile-time dependency injection framework for Kotlin Multiplatform, powered by a Kotlin compiler plugin.

> Metro is a compile-time dependency injection framework that combines the best of Dagger, Anvil, and kotlin-inject into one cohesive solution.

- ✅ Compile-time validation – Catch dependency graph errors during compilation, not at runtime
- 🧩 FIR/IR code generation – No KAPT or KSP required, just a Kotlin compiler plugin
- 🎯 Kotlin-first API – Inspired by kotlin-inject with top-level function injection and optional dependencies
- 🗡️ Dagger-esque runtime – Lean generated code with familiar patterns
- ⚒️ Anvil-style aggregation – @ContributesTo, @ContributesBinding, and more

## Author-documented requirements and audience

> A compile-time dependency injection framework for Kotlin Multiplatform, powered by a Kotlin compiler plugin.





Not recorded: Account, External API key, Paid service, Self-hosting. Missing information does not mean there are no requirements.

Source: https://github.com/ZacSweers/metro/blob/main/README.md

Extraction checked: 2026-10-26T10:17:30.431Z

Last recorded source update: 2026-11-23T12:37:38.000Z

Saved release: 1.4.5 — 2026-09-24T15:15:00.000Z. These dates do not guarantee ongoing maintenance.

## Open this project

[Open project in RepoShelf](https://www.reposhelf.co.uk/?project=ZacSweers%2Fmetro). Demo, repository and collection actions use the existing sign-in flow.

[How RepoShelf works and agent access](https://www.reposhelf.co.uk/agent-guide.html.md)
