Overview
cli-anything-wiremock is a command-line interface that wraps the WireMock Admin REST API (/__admin/). It allows agents and developers to manage HTTP stub mappings, inspect served requests, control stateful scenarios, and record real backend traffic — all from the terminal or from agent tool calls.
WireMock is commonly used in integration testing environments to replace real HTTP backends with controllable mock responses.
Command Groups
stub — Manage HTTP stub mappings
request — Inspect served requests
scenario — Stateful scenario management
record — Record traffic from a real backend
settings — Global server settings
Top-level commands
Key Examples
Agent Guidance
Always use --json in agent contexts
Use --json for all invocations in scripts or agent tool calls. JSON output varies by command type (these are distinct response types, not an envelope wrapping all responses):
Connection via environment
Set connection params via environment variables before calling any command:
Workflow pattern for test verification
- Set up stubs before running the system under test:
- Run the system under test.
- Verify interactions:
- Clean up:
Error handling
Non-zero exit code on all errors. In --json mode, errors return {"status": "error", "message": "..."}. Success returns the raw WireMock API response.


