mimic captures traffic from any iOS or web app and automatically generates a Python client library that lets you call the app's API like a regular library.

Stars

1,482

7-day growth

No data

Forks

96

Open issues

0

License

MIT

Last updated

2026-07-26

AI repository intelligence
FR-AI / ANALYSIS

Why it is worth attention

It eliminates the need to reverse-engineer private APIs or manually extract auth tokens by using mitmproxy, cURL replication, or HAR files, then generating a typed Python client with AI assistance.

Who it is for

  • Developers who want to automate or integrate with mobile apps that have no public API
  • Security researchers analyzing app traffic and authentication flows
  • QA engineers needing to script end-to-end tests against live app backends
  • Data scientists or hobbyists scraping app data without writing custom proxy handlers

Use cases

  • Automating interactions with dating apps (e.g., Hinge) like liking profiles or sending messages
  • Extracting recommendations, feed data, or analytics from any mobile app
  • Building custom integrations for apps that lack official SDKs or APIs
  • Replaying and modifying authenticated requests for testing or debugging

Strengths

  • Automatically captures auth tokens, session IDs, and cookies from real traffic and replays them across calls
  • Generates a human-editable Python client with named methods and body templates via Claude
  • Supports three capture backends (mitmproxy, cURL, HAR) covering iOS apps, web apps, and browser devtools
  • Handles token rotation by automatically re-pulling from mitmweb on 401 for idempotent requests

Considerations

  • Certificate pinning (common in banking apps, Instagram) blocks traffic capture, though a Frida-based bypass is available
  • DPoP/sender-constrained tokens break the replay model entirely with no clean workaround
  • Code generation depends on Claude, an external AI service, which may introduce latency or require API keys

README quick start

mimic

Intercept any app, then call it from Python like a library.

from hinge_client import Hinge

acc = Hinge()                 # reuses your captured session
recs = acc.get_recommendations()
acc.like(subject_id, comment="hi lol")

You don't write hinge_client.py. mimic captures your own app traffic and an AI generates the client from it.

How it works

Most apps authenticate every request with the same bundle of values: a bearer token, some device ids, a session id, cookies. They're stable across calls. Capture them once from a real request you made, and you can replay them on new requests to the same API.

capture traffic   ->   extract auth   ->   generate client
  (mitmproxy)         (mimic.Session)      (claude reads the
                                            captured endpoints)

The generated client is plain Python on top of mimic.App, and you edit it like any other file. It gives you named methods, body templates, and the multi-step call chaining mobile APIs tend to need (fetch a token in one call, spend it in the next).

Install

sh install.sh

Installs uv if you don't have it, then mimic in an isolated tool env. mitmproxy isn't a separate install; mimic launches it via uvx on first record. (Manual: uv tool install mimic-client.)

mimic doctor                    # confirm proxy + claude are ready

Use it (iPhone)

mimic record                    # starts the proxy, prints the iPhone steps

record fills in your Mac's LAN IP and walks you through it:

  1. iPhone -> Wi-Fi -> Configure Proxy -> Manual -> :8080
  2. Safari -> http://mitm.it -> install the Apple profile
  3. Settings -> General -> About -> Certificate Trust Settings -> turn on full trust for mitmproxy. This step is easy to miss and nothing works without it.
  4. open the app, use it normally

Then:

mimic hosts                     # list captured hosts; pick your API host
mimic learn  prod-api.hingeaws.net    # see the endpoints mimic saw
mimic gen    prod-api.hingeaws.net    # generate hinge_client.py

Then from hinge_client import Hinge; Hinge().get_recommendations().

The library

Three ways to build a session by hand, if you don't want codegen:

from mimic import Session

Session.from_mitm("prod-api.hingeaws.net")        # pull auth from mitmweb
S

Description

Intercept any app, then call it from Python like a library

Related repositories

Similar projects matched by category, topics, and programming language.

lopopolo
Featured
lopopolo GitHub avatar

harness-engineering

Harness Engineering is a methodology for improving coding agent outputs by carefully crafting the environment around them—providing curated context, tools, and executable constraints that encode an organization’s nonfunctional requirements and cumulative lessons.

AI & Machine LearningAI Agents
2,390
slvDev
Featured
slvDev GitHub avatar

esp32-ai

A 28.9 million parameter language model runs on an $8 ESP32-S3 microcontroller entirely on-device, generating simple stories at about 9.5 tokens per second.

AI & Machine LearningLarge Language Models
1,960
mikiarlo3
Featured
mikiarlo3 GitHub avatar

ai-copywriter

A portable agent skill that writes attention-grabbing copy (headlines, microcopy, subject lines) and then strips out all signs of AI-generated writing, based on Wikipedia's 33 detectable patterns and reader-first research.

AI & Machine Learning
972