Installing Keploy on macOS
Keploy now runs natively on macOS (Apple Silicon) — you can record and replay an app that runs directly on your Mac, with no Lima VM and no Docker. Native macOS support intercepts traffic in userspace (there is no eBPF on macOS), so it needs no root and installs nothing system-wide.
Native macOS support covers Go, Node.js, Python and Java apps, including their HTTPS traffic, and understands their HTTP/HTTPS, MySQL and MongoDB calls; calls to other services — PostgreSQL, Redis, Kafka, gRPC and the like — are captured only as raw bytes and usually don't replay. If your app runs in containers, or depends on one of those other services, use Docker. On an Intel Mac, use Lima.
keploy record and keploy test sign you in before they run. The first time you use either, Keploy prints a URL and opens your browser at app.keploy.io to sign in; the session is then cached in ~/.keploy/tokens.yaml and reused.
- No browser available (a remote shell, a container): run with
--manual-loginand paste an API key from your Keploy dashboard when prompted. - CI, or any non-interactive run: set
KEPLOY_API_KEY(or pass--api-key) and Keploy skips the sign-in prompt entirely. - Offline: the local mock loop —
keploy mock record --localandkeploy mock replay --local— is the one pair that runs without signing in. While you are signed out it logs a harmlessfailed to validate user roleline and then runs normally. This is the mock loop, not a replacement forkeploy recordandkeploy test— see Mock your tests.
A free account is enough to record and replay. Free-tier runs are subject to a usage allowance.
👉 Choose your preferred method:
Option 1: Run Keploy natively
The native macOS build is Apple Silicon (arm64) only. On an Intel Mac the installer, the Homebrew formula and keploy update refuse to install rather than fetch a binary that cannot run there. If one of them sent you here, use Option 2 (Lima), which installs the Linux build inside the VM. Option 3 (Docker) is not an Intel route either: it starts your app and Keploy's agent in containers, but the keploy CLI that drives it is the same native build running on your Mac.
-
Install Keploy
curl --silent -O -L https://keploy.io/install.sh && source install.sh -
Record your app — pass the command that starts it, exactly as you run it yourself:
keploy record -c "<your app command>"For example, a Go binary, a Node server, a Python app or a Java jar:
keploy record -c "./myapp" # Go
keploy record -c "node server.js" # Node.js
keploy record -c ".venv/bin/python app.py" # Python, from a virtualenv
keploy record -c "${JAVA_HOME:-$(/usr/libexec/java_home)}/bin/java -jar target/app.jar" # Java -
Replay the recorded tests:
keploy test -c "<your app command>" --delay 10
- No password prompt. Native macOS interception needs no privileges, so
keploy record/testdo not ask forsudo. - Use your own Python and Java. Apple's
/usr/bin/python3and/usr/bin/javaare protected by macOS and record nothing. Use a Homebrew or uv Python, or a virtualenv built on one — with pyenv, its real interpreter ($(pyenv which python3)), not the shim — and your JDK's ownjava:"${JAVA_HOME:-$(/usr/libexec/java_home)}/bin/java" -jar target/<your-app>.jar(anyjavaon yourPATHother than Apple's/usr/bin/java, such as SDKMAN's or Homebrew's, works as it is). - Run the real executable, not a launcher. macOS strips the interception from
npm start, amakerecipe, or a wrapper shell script (it is dropped when the OS runs a protected system binary). Run the app's actual command —node server.jsrather thannpm start, or build first and run the binary. Keploy warns you if it never got loaded. - Go HTTPS on macOS. Go verifies TLS through the macOS Security framework; Keploy makes its interception CA trusted for your app's process only, so recording an HTTPS Go app works without touching your system keychain. Apps that pin a certificate (an explicit root pool) are the exception.
Option 2: Install Keploy with Lima
-
Check if Lima is installed
If you already have a Lima instance, make it writable (see step 3) and go to Step 5, using its name in place ofdebian-12. -
Install Lima
brew install lima -
Create a Debian instance
limactl create --mount-writable template://debian-12Lima mounts your Mac's home folder read-only by default;
--mount-writablelets Keploy write its test files into your project. If you already have an instance, stop it if it's running (limactl stop <name>), then make it writable withlimactl edit <name> --mount-writable --start. -
Start the instance
limactl start debian-12 -
Enter the Linux shell
limactl shell debian-12 -
Install Keploy inside Lima, from the VM's own home directory
cd ~ && curl --silent -O -L https://keploy.io/install.sh && source install.shThen
cdinto your project under/Users/<you>/…to record it. -
Verify the installation
keploy --version
✅ If the version shows up, Keploy is installed successfully!
What's Next?
🎬 Start Capturing Test Cases
Begin recording your API calls and automatically generate test cases with Keploy.
Option 3: Install Keploy with Docker
With this option your application and Keploy's agent run in containers, but the keploy CLI installed in step 3 — which starts them both — is the native macOS build, which is Apple Silicon (arm64) only. On an Intel Mac use Option 2 (Lima) instead.
-
Make sure Docker is installed You’ll need Docker Desktop running on macOS.
-
Create a Docker bridge network
docker network create keploy-network -
Install Keploy
curl --silent -O -L https://keploy.io/install.sh && source install.sh -
Verify the installation
keploy --version
✅ If the version shows up, Keploy is installed successfully!
What's Next?
🎬 Start Capturing Test cases
▶️ Record
keploy record -c "docker run -p 8080:8080 --name <containerName> --network keploy-network <applicationImage>" \
--container-name "<containerName>" --buildDelay 60
🧪 Test
keploy test -c "docker run -p 8080:8080 --name <containerName> --network keploy-network <applicationImage>" \
--delay 10 --buildDelay 60
🎉 Congratulations!
You’ve successfully set up Keploy on macOS — natively, or with Lima or Docker.