The sources/__init__.py docstring promised "cURL/HAR paste" but HAR was
never implemented. This adds it, so mimic works with browser devtools
exports (Chrome, Firefox, Safari) and desktop proxies (Charles, Proxyman)
with no mitmproxy or iPhone setup.
- new mimic/sources/har.py parses HAR JSON into mimic's flow dicts, with
inline request/response bodies (base64 decoded) for codegen
- Session.from_har(path, host) constructor; host defaults to the
most-requested one
- --har flag on the hosts, learn, and gen commands
- tests/test_har.py with a small fixture
The HAR-to-flow conversion produces the same dict shape extract.py and
codegen.py already consume, so those modules are untouched.
Signed-off-by: ZhYGuoL <zguoliau@andrew.cmu.edu>
* Add opencode as an AI generator option
Support to use OpenCode
(https://opencode.ai) instead of Claude Code for client generation.
- Adds --generator flag (claude|opencode, default: claude)
- OpenCode uses its own configured default model (--model is ignored)
- mimc doctor checks for either claude or opencode on PATH
- Minimal diff: one if/else branch in generate(), one new CLI flag
* docs: clean up comments
* Restore AI generator check in mimc doctor
Capture your own session with mitmproxy, reuse your real auth, and let
claude -p write an ergonomic client from the captured endpoints.
- Session/App runtime with mitm + cURL sources and token auto-refresh
- CLI: record / doctor / hosts / learn / gen
- one-command install via uv; mitmproxy launched on demand via uvx
- MIT licensed, own-accounts-only framing