Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mockcat

Mockcat is a Kotlin Multiplatform toolkit for HTTP mocking, traffic inspection, and interactive mock rule editing — without touching your production code.

📖 Full documentation →


What it does

  • Intercept — Return saved responses or redirect requests at runtime. Rules are stored in a local database, editable in a built-in Compose UI.
  • Log — Capture every HTTP call (headers, body, timing) and inspect it in-app without a proxy.
  • Push mocks over ADB — The Gradle plugin reads JSON files from your project and loads them into a connected device in one command.

Supports Android (OkHttp, Ktor) and iOS (URLSession).


Screenshots

HTTP Logger

Log List Overview Request Response

Mock Intercept

Mock Rules Edit Rule

Quick start

dependencies {
    debugImplementation("com.mockcat:mockcat-intercept-okhttp:0.1.0")
    debugImplementation("com.mockcat:mockcat-intercept-ui:0.1.0")
    debugImplementation("com.mockcat:mockcat-logger-okhttp:0.1.0")
    debugImplementation("com.mockcat:mockcat-logger-ui:0.1.0")
    releaseImplementation("com.mockcat:mockcat-noop-android:0.1.0")
}
val mockcatIntercept = MockcatIntercept(context)
val mockcatLogger = MockcatLogging(context)

val client = OkHttpClient.Builder()
    .addInterceptor(mockcatLogger)
    .addInterceptor(mockcatIntercept)
    .build()
    .also { mockcatIntercept.bindClient(it) }
./gradlew mockcatImport   # push mocks from app/mocks/*.json to connected device

See the Quick Start guide for the full walkthrough.


Documentation

Full docs at surajbichkunde39.github.io/Mockcat-KMP — installation, guides for OkHttp/Ktor/URLSession, mock file format, Gradle plugin, architecture, and more.


Requirements

  • JDK 17+, Android Gradle Plugin 9.x, Kotlin 2.x, minSdk 24+
  • iOS: Xcode 15+, iosArm64 / iosSimulatorArm64

Contributing

Prefer small, focused changes. Keep commonMain free of platform types in mockcat-api. After Kotlin edits, run ./gradlew ktlintCheck detekt. Open issues or pull requests against the default branch.

About

Kotlin Multiplatform toolkit for HTTP mocking & traffic inspection — no proxy, no production code changes. Supports Android (OkHttp, Ktor) and iOS (URLSession).

Topics

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages