# Foso/Ktorfit

HTTP client generator / KSP plugin for Kotlin Multiplatform (Android, iOS, Js, Jvm, Native, WasmJs)) using KSP and Ktor clients inspired by Retrofit https://foso.github.io/Ktorfit

Repository: https://github.com/Foso/Ktorfit
Canonical: https://ross.abutalabs.com/products/ktorfit
Homepage: https://foso.github.io/Ktorfit
Language: Kotlin
License: Apache-2.0
License Family: permissive
Topics: kotlin-compiler-plugin, annotation-processor, ktor, kotlin, kotlin-multiplatform, kotlin-mpp, ksp, http-client, android, kotlin-native, kotlinjs, kotlin-multiplatform-mobile
Last push: 2026-08-24T03:52:05+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 87, longevity 100
- inputs: {"age_days": 2569, "days_push": 9, "days_rel": 87, "gap_med": 20.0, "n_releases_24m": 17}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2081, forks 79 (observed 2026-08-28T04:06:11.600318+00:00)

## What it is
Ktorfit is an HTTP client generator for Kotlin Multiplatform that uses KSP (Kotlin Symbol Processing) to create type-safe API clients from annotated interfaces, built on top of Ktor clients. It is inspired by Square's Retrofit and supports Android, iOS, JVM, JS, Native, and WasmJs targets.

## Use cases
- generate type-safe HTTP clients from interface definitions in Kotlin
- make REST API calls in a Kotlin Multiplatform app shared between Android and iOS
- replace Retrofit in a Kotlin Multiplatform project
- declarative API request definitions with annotations
- consume JSON APIs from Kotlin Native or JS code

## When to choose
- you are building a Kotlin Multiplatform app and want a Retrofit-like declarative HTTP client
- you want compile-time code generation for API clients instead of runtime reflection
- you need one networking layer shared across Android, iOS, JVM, JS, and Native targets

## When to avoid
- your project is not on Kotlin or Kotlin Multiplatform
- you prefer writing Ktor client calls manually or need full low-level control over requests
- you need a server-side HTTP framework rather than a client

## Facets
- artifact type: library
- maturity: active
- function: http-client, sdk, developer-tools
- domain: web-development, mobile-development, developer-tools, apis, cross-platform
- platform: jvm, cross-platform
- tags: kotlin-multiplatform, ksp, retrofit-inspired, code-generation, ktor, annotation-processor, android, ios, web-server

## Member repositories
- Foso/Ktorfit (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:06:11.600318+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:55:56.624478+00:00, confidence not recorded.
  - readme: https://github.com/Foso/Ktorfit (fetched 2026-08-28T04:06:11.600318+00:00, sha 750465556bb5)
  - homepage: https://foso.github.io/Ktorfit (fetched 2026-08-29T10:35:55.885213+00:00, sha 86e8cfc04c3c)
- Data as of 2026-08-30T08:39:29.467469+00:00.
