Open-source record & replay proxy for HTTP APIs

Record your API once. Work offline forever.

Mynah sits in front of any HTTP API, records real responses to plain JSON tapes, and replays them byte-for-byte — on a plane, in CI, or two years from now.

Install it now

npm install -g mynah

Install

One binary, no daemon, no account. Pick the package manager you already use.

npm

npm install -g mynah

Installs the CLI globally. Requires Node.js 18 or newer.

Homebrew

brew install mynah-dev/tap/mynah

macOS and Linux. Ships a self-contained binary — Node.js not required.

curl

curl -fsSL https://get.mynah.dev/install.sh | sh

Installs the standalone binary to ~/.local/bin. The script is short — read it first if you like.

Then check the install:

mynah --version
mynah 1.4.2

Quickstart

From zero to an offline copy of your API in five steps.

  1. Point Mynah at your API

    mynah init https://api.yourshop.dev

    Writes a commented mynah.toml with the upstream target, the proxy port (9090) and the tape directory.

  2. Start recording

    mynah record

    Starts the proxy on localhost:9090 — every request is forwarded upstream and every response is written to tapes/ as pretty-printed JSON.

  3. Run your app through the proxy

    BASE_URL=http://localhost:9090 npm run dev

    One environment variable, zero code changes — click through the flows you care about once and they are on tape.

  4. Go offline

    mynah replay

    Serves the recorded tapes on the same port; requests without a tape get a 501 and the closest recorded route, so you know exactly what to re-record.

  5. Commit the tapes

    git add tapes/ mynah.toml && git commit -m "Record shop API"

    Tapes are plain JSON, so every teammate and CI job now replays exactly the API you recorded.

Questions, answered

The five things people ask before their first recording.

How is this different from hand-written mocks?

Mocks encode what you think the API returns. Tapes are what it actually returned — status codes, headers, pagination quirks and all — captured once and replayed byte-for-byte.

Do secrets end up in my tapes?

No. Authorization, Cookie and Set-Cookie headers are replaced with placeholders before a tape is written, and you can list any other header or JSON field under [redact] in mynah.toml.

What happens when a request has no tape?

In replay mode Mynah answers 501 with the method, the path and the closest recorded match, so you immediately know what to re-record. Pass --fallthrough to send unmatched requests to the real API instead.

Can I edit a tape by hand?

Yes. Tapes are pretty-printed JSON, one file per request — tweak a price or an error body in your editor and the next replay serves your edit.

Does it only work with Node.js?

No. Mynah is a plain HTTP proxy in front of your app, so anything that can change its API base URL can record and replay: Node, Python, Go, Rails, mobile emulators, even curl.