Self-host your mocks with Mockoon CLI

Run your mock APIs in your CI/CD pipeline, on your servers or in your cloud environments with Mockoon CLI

Mockoon CLI screenshot

The perfect companion for headless and automated environments

Full Feature Parity

Supports all of Mockoon's features: dynamic templating, response rules, proxy mode, and OpenAPI compatibility.

View all features →

Lightweight & Fast

Deploy lightning-fast mock servers in your CI environment with minimal resource footprint using NPM or Docker.

How to use it →

Run Anywhere

Available as an NPM package, official Docker image, and GitHub Action for any CI/CD platform.

Getting started tutorial →

Automated Testing

Eliminate external dependencies and rate limits from automated integration and regression test suites.

Quick start guides

Run your mock APIs in seconds across your favorite tools and environments

NPM package quick start

Copy
$ npm install -g @mockoon/cli $ mockoon-cli start --data ./data-file.json

Docker image quick start

Copy
$ docker run -d --mount type=bind,source=/home/your-data-file.json,target=/home/mockoon/data/your-data-file.json,readonly -p 3000:3000 mockoon/cli:latest --data /home/mockoon/data/your-data-file.json --port 3000

GitHub Action quick start

Copy
- name: Run Mockoon CLI uses: mockoon/cli-action@v3 with: # Mockoon CLI version, default to 'latest' version: "latest" # Mockoon local data file or URL data-file: "./mockoon-data.json" # port, default to 3000 port: 3000 - name: Make test call run: curl -X GET http://localhost:3000/endpoint