@wiremock/cli on npm) and the
WireMock Runner (wiremock/wiremock-runner on Docker Hub). The CLI and the Runner are released together and share
a version number. Only versions that were published to npm are listed.
To upgrade the CLI, run npm install -g @wiremock/cli@latest. To upgrade the Runner, pull the image tag for the
version you want.
Data sources in local projects
Mock APIs whose stubs use CSV data sources now work end to end in a local project. See Data sources in a project and Data sources in the Runner.wiremock mock-apis pullsaves each data source that the pulled stubs use todata-sources/<key>.csv, and adds adata_sourcesentry towiremock.yaml. In the stubs it writes, it refers to each data source by its local key in place of its WireMock Cloud ID.wiremock runand the Runner serve CSV data sources locally. With--watch, they reload a CSV file when you save it, without a restart.wiremock mock-apis pushcreates or updates the data sources that the pushed stubs use, and writes each one’scloud_idback towiremock.yaml. Your stub files are not changed.- Database data sources are not served locally.
Behaviour changes
- Pushing a stub that uses a data source now needs that data source in
wiremock.yaml. If a project was pulled with an older version, its stubs still refer to data sources by Cloud ID, and the push fails withreferences data source '<id>', which is not defined in wiremock.yaml. To fix this, pull the mock API again with this version. - Stubs that use a database data source can no longer be pushed from a project. Edit those stubs in WireMock Cloud instead.
- Use this version everywhere a project runs once you have pulled with it. Older versions can’t resolve a
data source’s local key, so stubs that use a data source will not match in an older
wiremock runor Runner image. wiremock templates syncnow fails when a service has apathinwiremock.yamland there is nostub-mappings.yamlfile at that path. Before, it published the template with no stubs.
Improvements
wiremock runstarts faster for projects with many services.
Running the CLI in CI
You can now configure the CLI with environment variables, so that a CI job needs no interactive login and no config file.Give each build its own
WMC_CONFIG_DIR and WMC_LOG_DIR to stop concurrent builds on one agent from sharing
settings. wiremock whoami and wiremock config set tell you when the token from the environment is in use.New options
wiremock run --random-portsserves every service on a free port in place of its configured one, so that two runs of the same project don’t clash.wiremock run --exit-on-stdin-closestops the services and exits when stdin is closed, so that a parent process can stop the CLI however it ends.wiremock runprints a message when all services are ready to receive requests.--state-file <path>onwiremock runandwiremock mock-apis pushwrites a JSON file that describes the mock APIs, including their base URLs.--render <source>:<target>on the same commands renders a Handlebars template file with the base URLs of the mock APIs. Use it to generate the config file that your tests read.wiremock templates searchsearches the API templates available to you.
Improvements
- When a command fails, the CLI now prints the error details that WireMock Cloud reported in place of “An unexpected error occurred”. Connection failures print their cause.
- Every tool in the CLI’s MCP server now declares whether it is read-only or destructive. AI clients no longer treat read-only tools as destructive, and clients that require these declarations, such as ChatGPT, accept the tools.
Fixes
- A response body with a non-UTF-8 charset in its
Content-Typeheader is no longer corrupted when its body file is written and read back, for example on a pull followed by a push.
Security
- The CLI and Runner Docker images no longer trust the compromised eMudhra certificate authorities, and now run on Java 27.
- When the npm package downloads its own Java runtime, it now downloads Java 27, replaces any older runtime it downloaded before, and removes trust in the same certificate authorities. A Java installation of your own is not changed.
License files in the Runner
- The Runner now reads a license file, using the same rules as the CLI. It looks for
/etc/wiremock-runner/license.txt, or for the path in the newWMC_LICENSE_FILEenvironment variable. - With an unlimited license, the Runner starts and serves mocks with no connection to WireMock Cloud. It makes no usage checks and reports no usage.
- The Runner refuses to start when
WMC_LICENSE_FILEis blank or names a file that doesn’t exist, or when the license file can’t be read or isn’t a recognisable license.
Fixes
- A garbled or unreadable
license.txtno longer crashes the CLI. It is treated as an invalid license. - When the Runner can’t reach WireMock Cloud at startup, it now exits with a clear message. Switching to
record-manymode while WireMock Cloud is unreachable returns a502response and leaves the current mode running.
Response bodies in separate files
- The CLI now writes each stub’s response body to a file in the service’s
__filesdirectory, and refers to it from the stub withbodyFileName. This keepsstub-mappings.yamlsmall and makes bodies easier to edit and review. Stubs that already have an inline body in an existing file keep it.
Improvements
wiremock mock-apis pullno longer writes WireMock Cloud’s internal metadata orpersistent: trueto the stubs it saves, sostub-mappings.yamlcontains only what you authored. Your own metadata is kept.StubMappingTransformerextensions in the extensions folder are now loaded, and are applied to the stubs created by a local recording.- The npm package is smaller.
Fixes
wiremock runnow exits straight away on a startup error that can’t be recovered from, in place of retrying.